First commit of NewContact

This commit is contained in:
Lucio Maranta
2019-10-18 12:10:32 +02:00
parent 1ea597af13
commit dfea192cf2
10 changed files with 155 additions and 180 deletions
+35 -2
View File
@@ -12,7 +12,7 @@ using System.Xml.Linq;
using System.Xml.Schema;
using System.Xml.Serialization;
using static Step.Config.ServerConfig;
using static Step.Model.Constants;
using static Step.Model.Constants;
using static Step.Utils.SupportFunctions;
namespace Step.Config
@@ -356,7 +356,40 @@ namespace Step.Config
PhoneNumber = x.Element("phoneNumber").Value
})
.FirstOrDefault();
BackOfficeConfig = xmlConfigFile
.Descendants("backOfficeContact")
.Select(x =>
new ContactModel()
{
Name = x.Element("name").Value,
Email = x.Element("email").Value,
PhoneNumber = x.Element("phoneNumber").Value
})
.FirstOrDefault();
SparePartConfig = xmlConfigFile
.Descendants("sparePartsContact")
.Select(x =>
new ContactModel()
{
Name = x.Element("name").Value,
Email = x.Element("email").Value,
PhoneNumber = x.Element("phoneNumber").Value
})
.FirstOrDefault();
RetrofitConfig = xmlConfigFile
.Descendants("retrofitContact")
.Select(x =>
new ContactModel()
{
Name = x.Element("name").Value,
Email = x.Element("email").Value,
PhoneNumber = x.Element("phoneNumber").Value
})
.FirstOrDefault();
var ci = new CultureInfo("en-US");
var formats = new[] { "M-d-yyyy HH:mm", "dd-MM-yyyy HH:mm", "MM-dd-yyyy HH:mm", "M/d/yyyy HH:mm", "dd/MM/yyyy HH:mm", "MM/dd/yyyy HH:mm" }
.ToArray();