sync
This commit is contained in:
@ -73,7 +73,7 @@ namespace IronIntel.Contractor
|
||||
{
|
||||
var dr = dt.NewRow();
|
||||
dr[0] = r.VIN;
|
||||
dr[1] = r.ShowName;
|
||||
dr[1] = r.DisplayName;
|
||||
dr[2] = r.Outside;
|
||||
dr[3] = r.Vendor;
|
||||
dr[4] = r.RentalRate;
|
||||
@ -161,7 +161,7 @@ namespace IronIntel.Contractor
|
||||
dr[2] = r.LastUpdateDateStr;
|
||||
//dr[3] = r.OperateType;
|
||||
dr[3] = r.VIN;
|
||||
dr[4] = r.ShowName;
|
||||
dr[4] = r.DisplayName;
|
||||
dr[5] = r.Outside;
|
||||
dr[6] = r.Vendor;
|
||||
dr[7] = r.RentalRate;
|
||||
|
@ -247,7 +247,7 @@ namespace IronIntel.Contractor.Machines
|
||||
public string AddedOnStr { get { return AddedOn == DateTime.MinValue ? "" : AddedOn.ToShortDateString(); } }
|
||||
public string AddedBy { get; set; }
|
||||
public string AddedByName { get; set; }
|
||||
public string ShowName
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -294,6 +294,8 @@ namespace IronIntel.Contractor.Machines
|
||||
public long Id { get; set; }
|
||||
public bool Active { get; }
|
||||
public long DeviceID { get; set; }
|
||||
public bool FIInstalltion { get; set; }
|
||||
public string Installer { get; set; }
|
||||
public string AddDateStr { get { return AddLocalDate == null ? "" : AddLocalDate.Value.ToShortDateString(); } }
|
||||
public string InvoiceDateStr { get { return InvoiceDate == null ? "" : InvoiceDate.Value.ToShortDateString(); } }
|
||||
public string ServiceStartDateStr { get { return ServiceStartDate == null ? "" : ServiceStartDate.Value.ToShortDateString(); } }
|
||||
|
@ -37,7 +37,7 @@ namespace IronIntel.Contractor.Machines
|
||||
|
||||
public bool Selected { get; set; }
|
||||
|
||||
public string ShowName
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
public bool HasAttachment { get; set; }
|
||||
|
||||
public string[] AttachmentIDs { get; set; }//用于保存
|
||||
public string ShowName
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -158,7 +158,7 @@ namespace IronIntel.Contractor.Maintenance
|
||||
return StartDate.ToShortDateString();
|
||||
}
|
||||
}
|
||||
public string ShowName
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace IronIntel.Contractor.MapView
|
||||
/// 根据Contractorid获取机器列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static AssetViewItem[] GetAssets(string sessionid, string companyid, string useriid, string filtertext, int onroad, MachineAlertViewQueryParameter param, bool IncludeNoLocation)
|
||||
public static AssetMapViewPinItem[] GetAssets(string sessionid, string companyid, string useriid, string filtertext, int onroad, MachineAlertViewQueryParameter param, bool IncludeNoLocation)
|
||||
{
|
||||
if (string.IsNullOrEmpty(companyid))
|
||||
companyid = SystemParams.CompanyID;
|
||||
@ -39,14 +39,15 @@ namespace IronIntel.Contractor.MapView
|
||||
|
||||
var client = FleetServiceClientHelper.CreateClient<MapViewQueryClient>(companyid, sessionid);
|
||||
AssetMapViewPinItem[] assets = client.GetAssets(companyid, useriid, qp);
|
||||
List<AssetViewItem> result = new List<AssetViewItem>();
|
||||
foreach (var a in assets)
|
||||
{
|
||||
AssetViewItem avi = new AssetViewItem();
|
||||
Helper.CloneProperty(avi, a);
|
||||
result.Add(avi);
|
||||
}
|
||||
return result.ToArray();
|
||||
return assets;
|
||||
//List<AssetViewItem> result = new List<AssetViewItem>();
|
||||
//foreach (var a in assets)
|
||||
//{
|
||||
// AssetViewItem avi = new AssetViewItem();
|
||||
// Helper.CloneProperty(avi, a);
|
||||
// result.Add(avi);
|
||||
//}
|
||||
//return result.ToArray();
|
||||
}
|
||||
|
||||
public static AssetDetailViewItem GetAssetDetailItem(string sessionid, string companyid, long machineid, string datasource = null)
|
||||
@ -65,6 +66,7 @@ namespace IronIntel.Contractor.MapView
|
||||
mi.GroupNames = asset.GroupNames;
|
||||
mi.IconUrl = asset.MapViewIconUrl;
|
||||
mi.AssetIconUrl = asset.AssetIconUrl;
|
||||
mi.Description = asset.Description;
|
||||
|
||||
if (asset.CurrentHours != null)
|
||||
{
|
||||
@ -226,8 +228,8 @@ namespace IronIntel.Contractor.MapView
|
||||
|
||||
var client = FleetServiceClientHelper.CreateClient<AssetQueryClient>(companyid, sessionid);
|
||||
AssetBasicInfo asset = client.GetAssetBasicInfoByID(companyid, Convert.ToInt64(machineid));
|
||||
AssetViewItem ai = new AssetViewItem();
|
||||
Helper.CloneProperty(ai, asset);
|
||||
//AssetViewItem ai = new AssetViewItem();
|
||||
//Helper.CloneProperty(ai, asset);
|
||||
|
||||
double timeOffset = SystemParams.GetHoursOffset();
|
||||
startTime = startTime.AddHours(-timeOffset);
|
||||
@ -257,7 +259,7 @@ namespace IronIntel.Contractor.MapView
|
||||
ls.Add(li);
|
||||
}
|
||||
AssetLocationHistoryViewItem al = new AssetLocationHistoryViewItem();
|
||||
al.Machine = ai;
|
||||
al.Machine = asset;
|
||||
al.Locations = ls.ToArray();
|
||||
return al;
|
||||
}
|
||||
|
@ -9,39 +9,6 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace IronIntel.Contractor.MapView
|
||||
{
|
||||
public class AssetViewItem
|
||||
{
|
||||
public long ID { get; set; }
|
||||
public string VIN { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Name2 { get; set; }
|
||||
public string Make { get; set; }
|
||||
public string Model { get; set; }
|
||||
public int Priority { get; set; }
|
||||
public string AssetType { get; set; }
|
||||
public double Latitude { get; set; }
|
||||
public double Longitude { get; set; }
|
||||
public string IconUrl { get; set; }
|
||||
public string AlertTips { get; set; }
|
||||
public List<string> AssetGroups { get; set; }
|
||||
public List<long> JobSites { get; set; }
|
||||
public string ShowName
|
||||
{
|
||||
get
|
||||
{
|
||||
//Name取值顺序为Name2,Name,VIN,ID用于前端显示
|
||||
string name = Name2;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
name = Name;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
name = VIN;
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
name = ID.ToString();
|
||||
return name;
|
||||
}
|
||||
}//由于地图显示及排序的名称
|
||||
|
||||
}
|
||||
public class AssetDetailViewItem
|
||||
{
|
||||
private double _EngineHours;
|
||||
@ -84,6 +51,7 @@ namespace IronIntel.Contractor.MapView
|
||||
public long ID { get; set; }
|
||||
public string IconUrl { get; set; }
|
||||
public string AssetIconUrl { get; set; }
|
||||
public string Description { get; set; }
|
||||
public LocationViewItem Location { get; set; }
|
||||
public string EngineHoursDateText
|
||||
{
|
||||
@ -100,7 +68,7 @@ namespace IronIntel.Contractor.MapView
|
||||
|
||||
public class AssetLocationHistoryViewItem
|
||||
{
|
||||
public AssetViewItem Machine { get; set; }
|
||||
public AssetBasicInfo Machine { get; set; }
|
||||
public LocationViewItem[] Locations { get; set; }
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ namespace IronIntel.Contractor.MapView
|
||||
public int MapAlertLayerPriority { get; set; }
|
||||
public Int64 GpsDeviceID { get; set; } //空 -1
|
||||
public string AssetGroupNames { get; set; }
|
||||
public string ShowName
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ namespace IronIntel.Contractor.OTRConfig
|
||||
|
||||
public HarshDrivingEvents HarshDringEvent { get; set; }
|
||||
public SpeedingBehaviors SpeedingBehavior { get; set; }
|
||||
public string ShowName
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.20.526")]
|
||||
[assembly: AssemblyFileVersion("2.20.609")]
|
||||
|
@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data;
|
||||
using Foresight.Data;
|
||||
using Foresight.Fleet.Services.User;
|
||||
|
||||
namespace IronIntel.Contractor.Users
|
||||
{
|
||||
@ -20,6 +21,245 @@ namespace IronIntel.Contractor.Users
|
||||
public string ForeColor { get; set; }
|
||||
public bool OpenInNewWindow { get; set; }
|
||||
public AppModuleType ModuleType { get; set; }
|
||||
public List<NavigateItem> SubItems { get; set; }
|
||||
|
||||
public List<NavigateItem> GetMaintenanceNavigateItems(Tuple<Feature, Permissions>[] pmss)
|
||||
{
|
||||
List<NavigateItem> list = new List<NavigateItem>();
|
||||
|
||||
NavigateItem item = new NavigateItem();
|
||||
item.ID = "nav_alertsmanagement";
|
||||
item.FeatureID = Feature.ALERTS_MANAGEMENT;
|
||||
item.Title = "Alerts Management **New**";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "AlertsManagement.aspx";
|
||||
item.IconPath = "img/alert.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.ALERTS_MANAGEMENT) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_workorder";
|
||||
item.FeatureID = Feature.WORK_ORDER;
|
||||
item.Title = "Work Order **New**";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "WorkOrderMaintenance.aspx";
|
||||
item.IconPath = "img/workorder.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.WORK_ORDER) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_preventative";
|
||||
item.FeatureID = Feature.PREVENTATIVE_MAINTENANCE;
|
||||
item.Title = "Absolute Hours Maintenance";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "PreventativeMaintenance.aspx";
|
||||
item.IconPath = "img/preventative.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.PREVENTATIVE_MAINTENANCE) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_timebased";
|
||||
item.FeatureID = Feature.PREVENTATIVE_MAINTENANCE;
|
||||
item.Title = "Relative Time Maintenance";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "TimeBasedMaintenance.aspx";
|
||||
item.IconPath = "img/timebased.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.PREVENTATIVE_MAINTENANCE) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_hours";
|
||||
item.FeatureID = Feature.PREVENTATIVE_MAINTENANCE;
|
||||
item.Title = "Relative Hours Maintenance";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "HoursMaintenance.aspx";
|
||||
item.IconPath = "img/hours.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.PREVENTATIVE_MAINTENANCE) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_absolutedistance";
|
||||
item.FeatureID = Feature.PREVENTATIVE_MAINTENANCE;
|
||||
item.Title = "Absolute Distance Maintenance";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "AbsoluteDistanceMaintenance.aspx";
|
||||
item.IconPath = "img/preventative.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.PREVENTATIVE_MAINTENANCE) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.FeatureID = Feature.PREVENTATIVE_MAINTENANCE;
|
||||
item.ID = "nav_relativedistance";
|
||||
item.Title = "Relative Distance Maintenance";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "RelativeDistanceMaintenance.aspx";
|
||||
item.IconPath = "img/hours.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.PREVENTATIVE_MAINTENANCE) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_record";
|
||||
item.FeatureID = Feature.PREVENTATIVE_MAINTENANCE;
|
||||
item.Title = "Maintenance Record **Legacy**";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "MaintanceRecordsManagement.aspx";
|
||||
item.IconPath = "img/record.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.PREVENTATIVE_MAINTENANCE) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_fuelrecord";
|
||||
item.FeatureID = Feature.FUEL_RECORDS;
|
||||
item.Title = "Fuel Records";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "FuelRecordManagement.aspx";
|
||||
item.IconPath = "img/fuelrecord.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.FUEL_RECORDS) != null)
|
||||
list.Add(item);
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<NavigateItem> GetSecurityNavigateItems(Tuple<Feature, Permissions>[] pmss, UserInfo user)
|
||||
{
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.USERS) == null)
|
||||
return null;
|
||||
|
||||
List<NavigateItem> list = new List<NavigateItem>();
|
||||
NavigateItem item = new NavigateItem();
|
||||
item.ID = "nav_users";
|
||||
item.FeatureID = Feature.USERS;
|
||||
item.Title = "Users";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "UserManage.aspx";
|
||||
item.IconPath = "img/users.png";
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_user_group";
|
||||
item.Title = "User Group";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "UserGroup.aspx";
|
||||
item.IconPath = "img/usergroup.png";
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_dts";
|
||||
item.Title = "DataTable Permission";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "../fic/fic/Management/DataTablePermission.aspx";
|
||||
//item.IconPath = "img/permission.png";
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_filters";
|
||||
item.Title = "Dashboard Filters";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "../fic/fic/Management/FiltersManagement.aspx";
|
||||
item.IconPath = "img/filters.png";
|
||||
list.Add(item);
|
||||
|
||||
if (IronIntel.Contractor.SystemParams.IsDealer)
|
||||
{
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_usertocontractor";
|
||||
item.Title = "User To Contractor";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "UserToContractorPage.aspx";
|
||||
item.IconPath = "img/contractor.png";
|
||||
list.Add(item);
|
||||
}
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_curfew";
|
||||
item.FeatureID = Feature.CURFEW_CONFIG;
|
||||
item.Title = "Curfew Configuration";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "CurfewManage.aspx";
|
||||
item.IconPath = "img/curfew.png";
|
||||
list.Add(item);
|
||||
|
||||
if (user.UserType == UserTypes.SupperAdmin)
|
||||
{
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_curfewmt";
|
||||
item.FeatureID = Feature.CURFEW_CONFIG;
|
||||
item.Title = "Curfew Movement Tolerance";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "CurfewMovementTolerance.aspx";
|
||||
item.IconPath = "img/curfewmovementtolerance.png";
|
||||
list.Add(item);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<NavigateItem> GetAssetsNavigateItems(Tuple<Feature, Permissions>[] pmss, UserInfo user)
|
||||
{
|
||||
List<NavigateItem> list = new List<NavigateItem>();
|
||||
|
||||
NavigateItem item = new NavigateItem();
|
||||
item.ID = "nav_managmachines";
|
||||
item.FeatureID = Feature.MANAGE_ASSETS;
|
||||
item.Title = "Manage Assets";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "ManageMachines.aspx";
|
||||
item.IconPath = "img/machines.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.MANAGE_ASSETS) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_managrentals";
|
||||
item.FeatureID = Feature.MANAGE_ASSETS;
|
||||
item.Title = "Manage Rentals";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "ManageRentals.aspx";
|
||||
item.IconPath = "img/rental.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.MANAGE_ASSETS) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_machinegroups";
|
||||
item.FeatureID = Feature.ASSET_GROUP;
|
||||
item.Title = "Asset Groups";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "MachineGroups.aspx";
|
||||
item.IconPath = "img/machinegroups.png";
|
||||
if (!IronIntel.Contractor.SystemParams.IsDealer && user.UserType >= UserTypes.Admin)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_managegpsdevices";
|
||||
item.FeatureID = Feature.MANAGE_DEVICES;
|
||||
item.Title = "Manage Devices";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "ManageGPSDevices.aspx";
|
||||
item.IconPath = "img/devices.png";
|
||||
if (pmss.FirstOrDefault(m => m.Item1.Id == Feature.MANAGE_DEVICES) != null)
|
||||
list.Add(item);
|
||||
|
||||
item = new NavigateItem();
|
||||
item.ID = "nav_managmodels";
|
||||
item.Title = "Manage Models";
|
||||
item.Url = Url + "#" + item.ID;
|
||||
item.PageUrl = "ManageModels.aspx";
|
||||
item.IconPath = "img/model.png";
|
||||
if (user.UserType >= UserTypes.Admin)
|
||||
list.Add(item);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
public class NavigateItem
|
||||
{
|
||||
public string ID { get; set; }
|
||||
public int FeatureID { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string PageUrl { get; set; }
|
||||
public string IconPath { get; set; }
|
||||
}
|
||||
|
||||
public class SecurityNavigateItem
|
||||
|
@ -29,6 +29,8 @@ namespace IronIntel.Contractor.Users
|
||||
|
||||
var pc = FleetServiceClientHelper.CreateClient<PermissionProvider>();
|
||||
FeatureModule[] ms = pc.GetAvailableModules(SystemParams.CompanyID, user.IID);
|
||||
Tuple<Feature, Permissions>[] pmss = pc.GetUserPermissions(SystemParams.CompanyID, user.IID);
|
||||
|
||||
List<FeatureModule> moudles = new List<FeatureModule>();
|
||||
moudles.AddRange(ms);
|
||||
if (ms.FirstOrDefault(m => m.Id == FeatureModule.MODULE_MAPVIEW) == null)
|
||||
@ -47,6 +49,13 @@ namespace IronIntel.Contractor.Users
|
||||
ami.Visible = true;
|
||||
ami.ModuleType = AppModuleType.System;
|
||||
|
||||
if (m.Id == FeatureModule.MODULE_ASSETHEALTH)
|
||||
ami.SubItems = ami.GetMaintenanceNavigateItems(pmss);
|
||||
else if (m.Id == FeatureModule.MODULE_SECURITY)
|
||||
ami.SubItems = ami.GetSecurityNavigateItems(pmss, user);
|
||||
else if (m.Id == FeatureModule.MODULE_MANAGEASSETS)
|
||||
ami.SubItems = ami.GetAssetsNavigateItems(pmss, user);
|
||||
|
||||
list.Add(ami);
|
||||
}
|
||||
AppModuleInfo[] wsps = GetFICWorkspace(user);
|
||||
@ -89,7 +98,7 @@ namespace IronIntel.Contractor.Users
|
||||
return ai;
|
||||
}
|
||||
|
||||
private static AppModuleInfo[] GetFICWorkspace(UserInfo user)
|
||||
public static AppModuleInfo[] GetFICWorkspace(UserInfo user)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(SystemParams.FICDbConnectionString))
|
||||
{
|
||||
|
@ -35,6 +35,7 @@ namespace IronIntel.Contractor.Users
|
||||
public bool AllowLoginIntoPC { get; set; }
|
||||
public bool AllowLoginIntoInspectMobile { get; set; }
|
||||
public bool AllowLoginIntoFleetMobile { get; set; }
|
||||
public string LandingPage { get; set; }
|
||||
public string GroupNamesStr { get { return (GroupNames == null || GroupNames.Length == 0) ? "" : string.Join(",", GroupNames); } }
|
||||
|
||||
public string ContactTypeName
|
||||
|
@ -29,6 +29,7 @@ namespace IronIntel.Contractor.Users
|
||||
private const string _ExcludeNoLocation = "ExcludeNoLocation";
|
||||
|
||||
private const string _MapViewSearches = "MapViewSearches";
|
||||
private const string _LandingPage = "LandingPage";
|
||||
|
||||
public static UserParamInfo GetUserParams(string sessionid, string useriid)
|
||||
{
|
||||
@ -82,6 +83,9 @@ namespace IronIntel.Contractor.Users
|
||||
case _ExcludeNoLocation:
|
||||
userParams.ExcludeNoLocation = int.Parse(value) == 1;
|
||||
break;
|
||||
case _LandingPage:
|
||||
userParams.LandingPage = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
userParams.MapViewSearches = GetMapViewSearches(sessionid, useriid);
|
||||
@ -168,6 +172,11 @@ namespace IronIntel.Contractor.Users
|
||||
|
||||
if (userParams.ExcludeNoLocation)
|
||||
db.ExecSQL(SQL, useriid, _ExcludeNoLocation, userParams.ExcludeNoLocation ? 1 : 0);
|
||||
|
||||
if (!string.IsNullOrEmpty(userParams.LandingPage))
|
||||
db.ExecSQL(SQL, useriid, _LandingPage, userParams.LandingPage);
|
||||
else
|
||||
db.ExecSQL(SQL_Delete, useriid, _LandingPage);
|
||||
}
|
||||
|
||||
public static string GetStringParameter(string useriid, string paramname)
|
||||
@ -311,6 +320,7 @@ namespace IronIntel.Contractor.Users
|
||||
public bool ExcludeNoLocation { get; set; } = true;
|
||||
|
||||
public MapViewSearchItem[] MapViewSearches { get; set; }
|
||||
public string LandingPage { get; set; }
|
||||
}
|
||||
|
||||
public class MapViewSearcheHelper
|
||||
|
Reference in New Issue
Block a user