public void PopulateVehicleBoxes() { if (SelectedVehicle == null) { return; } try { BoundVehicleObject = new BoundVehicle ( this, _entityManager, GetCustomFieldValue("EngineCapacity"), GetCustomFieldValue("RatedPower"), GetCustomFieldValue("KerbMass"), GetCustomFieldValue("MaxSpeed"), GetCustomFieldValue("RatedEngineSpeed"), GetCustomFieldValue("IdlingSpeed"), GetCustomFieldValue("NumberOfGears"), GetCustomFieldValue("Gear1"), GetCustomFieldValue("Gear2"), GetCustomFieldValue("Gear3"), GetCustomFieldValue("Gear4"), GetCustomFieldValue("Gear5"), GetCustomFieldValue("Gear6") ); UpdateVisibilities(); } catch (Exception e) { SelectedVehicle = null; SystemLogService.DisplayErrorInVETSLog(e); } }
public void TestGetLogByLastYear() { SystemLogService service = new SystemLogService(); SystemLogViewModel ViewModel = service.GetViewModel("LYY"); Console.WriteLine(UtilTest.GetJson(ViewModel)); }
public void TestGetLogByDatetime() { SystemLogService service = new SystemLogService(); string startDay = DateTime.Now.ToString("yyyy-MM-dd"); string endDay = DateTime.Now.ToString("yyyy-MM-dd"); SystemLogViewModel ViewModel = service.GetViewModel(startDay, endDay); Console.WriteLine(UtilTest.GetJson(ViewModel)); }
public static void LogSystem(string content, int type) { SystemLogService systemLogService = new SystemLogService(); systemLogService.Log(new DataService.Model.SystemLog() { Content = content, Date = Utilities.GetServerDateTimeNow(), TypeId = type }); }
public void Handle(VerifyByUserEvent e) { SystemLogService service = new SystemLogService(); service.Insert(new Domain.Models.SystemLog() { CreateTime = DateTime.Now, Ip = UserContext.Current.Ip, Url = UserContext.Current.Url, UserId = UserContext.Current.UserId, UserName = UserContext.Current.UserName, Title = "审核竞买申请", LogType = Domain.Enums.SystemLogType.ApplyNumber, LogCode = SystemLogCodes.L02030, Content = "审核竞买申请,宗地号" + e.Account.Trade.Land.LandNumber + ",竞买号" + e.Account.ApplyNumber, }); var content = AppSettings.GetValue("SMS_VerifyApply", "") .Replace("{landNumber}", e.Account.Trade.Land.LandNumber) .Replace("{verifyStatus}", Tlw.ZPG.Infrastructure.Utils.EnumUtil.GetDescription(e.VerifyType)); Application.Messager.Send(e.Account.Contact.MobilePhone, content); }
public void Handle(ResetPasswordEvent e) { SystemLogService service = new SystemLogService(); service.Insert(new Domain.Models.SystemLog() { CreateTime = DateTime.Now, Ip = UserContext.Current.Ip, Url = UserContext.Current.Url, UserId = UserContext.Current.UserId, UserName = UserContext.Current.UserName, Title = "重置密码", LogType = Domain.Enums.SystemLogType.ApplyNumber, LogCode = SystemLogCodes.L02020, Content = "重置密码,竞买号 " + e.Account.ApplyNumber, }); var content = AppSettings.GetValue("SMS_ResetPassword", "") .Replace("{applyNumber}", e.Account.ApplyNumber) .Replace("{password}", e.Account.Trade.Land.LandNumber); Application.Messager.Send(e.Account.Contact.MobilePhone, content); }
public void Handle(FrozeAccountEvent e) { SystemLogService service = new SystemLogService(); service.Insert(new Domain.Models.SystemLog() { CreateTime = DateTime.Now, Ip = UserContext.Current.Ip, Url = UserContext.Current.Url, UserId = UserContext.Current.UserId, UserName = UserContext.Current.UserName, Title = "冻结竞买号", LogType = Domain.Enums.SystemLogType.ApplyNumber, LogCode = SystemLogCodes.L02000, Content = "宗地号为" + e.Account.Trade.Land.LandNumber + " 的宗地,竞买号" + e.Account.ApplyNumber + "冻结成功!", }); var content = AppSettings.GetValue("SMS_FrozenAccount", "") .Replace("{applyNumber}", e.Account.ApplyNumber) .Replace("{landNumber}", e.Account.Trade.Land.LandNumber); Application.Messager.Send(e.Account.Contact.MobilePhone, content); }
public HomeViewCommandViewModel ( IImageManager imageManager, OnlineResources onlineResources, ISystemLogManager logger, IDialogService dialogService, IDeviceManager deviceManager ) { if (Config.ShowForm) { Form1 form1 = new Form1(); form1.Show(); } SystemLogService.Init(logger, dialogService); Main.Init(onlineResources, deviceManager); Thread timerTickThread = new Thread(_ => Main.MonitorTimerTick()); Thread timerResetThread = new Thread(_ => Main.MonitorTimerReset()); timerTickThread.IsBackground = true; timerResetThread.IsBackground = true; timerTickThread.Start(); timerResetThread.Start(); //DisplayName = Properties.Resources.DisplayName; //DisplayInfo = new ExplorerDisplayInfo //{ // Description = Properties.Resources.DisplayName, // Image16 = imageManager.GetImage16Path("OK"), // ExplorerImage16 = imageManager.GetImage16Path("OK") //}; //Command = new RelayCommand(_ => HelloWorld()); }
public async Task LogAsync(SystemLogAdapterModel systemLogAdapterModel, Action action = null) { action?.Invoke(); await SystemLogService.AddAsync(systemLogAdapterModel); }