sync
This commit is contained in:
@ -18,6 +18,7 @@ using Foresight.Fleet.Services.Asset;
|
||||
using System.Web.UI.WebControls;
|
||||
using FI.FIC.Contracts.DataObjects.BaseObject;
|
||||
using System.Security.Cryptography;
|
||||
using Foresight.Fleet.Services.Customer;
|
||||
|
||||
namespace IronIntel.Contractor.Site.SystemSettings
|
||||
{
|
||||
@ -454,8 +455,12 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
if (!int.TryParse(rmd, out remembermedays))
|
||||
remembermedays = 30;
|
||||
|
||||
string locsourcestr = SystemParams.GetStringParam("BreadcrumbLocationSource");
|
||||
int locsource = 0;
|
||||
int.TryParse(locsourcestr, out locsource);
|
||||
|
||||
SystemOptionInfo soi = new SystemOptionInfo();
|
||||
soi.TimeZone = SystemParams.GetStringParam("CustomerTimeZone", false);
|
||||
soi.TimeZone = CreateClient<CustomerProvider>().GetCustomerTimeZone(SystemParams.CompanyID);
|
||||
soi.AccuracyFilter = accuracyfilter;
|
||||
soi.UnitOfOdometer = SystemParams.GetStringParam("UnitOfOdometer");
|
||||
soi.AcknowledgingAlerts = SystemParams.GetStringParam("AcknowledgingAlerts");
|
||||
@ -464,9 +469,11 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
soi.VolumeUnits = volumeunits;
|
||||
soi.WeightUnits = weightunits;
|
||||
soi.MFARememberMeDays = remembermedays;
|
||||
soi.BreadcrumbLocationSource = locsource;
|
||||
|
||||
string connectorxml = SystemParams.GetStringParam("Connector");
|
||||
soi.Connectors = ConnectorHelper.FromXML(connectorxml);
|
||||
|
||||
return soi;
|
||||
}
|
||||
else
|
||||
@ -489,8 +496,7 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
{
|
||||
string options = HttpUtility.HtmlDecode(Request.Params["ClientData"]);
|
||||
SystemOptionInfo upi = JsonConvert.DeserializeObject<SystemOptionInfo>(options);
|
||||
|
||||
SystemParams.SetStringParam("CustomerTimeZone", upi.TimeZone);
|
||||
CreateClient<CustomerProvider>().SaveCustomerTimeZone(SystemParams.CompanyID, upi.TimeZone);
|
||||
SystemParams.SetStringParam("CustomerTimeZoneOffset", upi.Offset.ToString());
|
||||
SystemParams.SetStringParam("AccuracyFilter", upi.AccuracyFilter.ToString());
|
||||
SystemParams.SetStringParam("UnitOfOdometer", upi.UnitOfOdometer);
|
||||
@ -500,6 +506,7 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
SystemParams.SetStringParam("WeightUnits", upi.WeightUnits.ToString());
|
||||
SystemParams.SetStringParam("LoginVerifyType", upi.LoginVerifyType);
|
||||
SystemParams.SetStringParam("MFARememberMeDays", upi.MFARememberMeDays.ToString());
|
||||
SystemParams.SetStringParam("BreadcrumbLocationSource", upi.BreadcrumbLocationSource.ToString());
|
||||
|
||||
XmlDocument doc = ConnectorHelper.ToXml(upi.Connectors);
|
||||
SystemParams.SetStringParam("Connector", doc.InnerXml);
|
||||
@ -873,6 +880,7 @@ namespace IronIntel.Contractor.Site.SystemSettings
|
||||
public string LoginVerifyType { get; set; }
|
||||
public StringKeyValue[] Connectors { get; set; }
|
||||
public int MFARememberMeDays { get; set; }
|
||||
public int BreadcrumbLocationSource { get; set; }
|
||||
}
|
||||
|
||||
private class UserOptionObject
|
||||
|
Reference in New Issue
Block a user