public ContentResult CarIn(HrmsCarInOut hrmsCarInOut) { BaseServices <HrmsCar> hrmscarService = new BaseServices <HrmsCar>(); BaseServices <HrmsCarInOut> hrmsCarInOutService = new BaseServices <HrmsCarInOut>(); var carmodel = hrmscarService.LoadEntities(c => c.No == hrmsCarInOut.CarNo).FirstOrDefault(); if (carmodel == null) { return(Content("车辆不存在")); } carmodel.CurrentKilometers = hrmsCarInOut.InKilometers; carmodel.Location = 0; if (!hrmscarService.UpdateEntity(carmodel)) { return(Content("系统异常")); } var inoutmodel = hrmsCarInOutService.LoadEntities(c => c.FormNo == carmodel.FormNo && c.CarNo == carmodel.No) .FirstOrDefault(); if (inoutmodel == null) { return(Content("车辆回来失败")); } inoutmodel.InTime = DateTime.Now; inoutmodel.InKilometers = hrmsCarInOut.InKilometers; inoutmodel.Oil = hrmsCarInOut.Oil; return(Content(hrmsCarInOutService.UpdateEntity(inoutmodel) ? "请求成功" : "请求失败,请重试")); }
public void UpdateOncePerFrame() { timers.Update.Begin(); if (RuntimeConfiguration.gameTest) { var game = Services.Get <Game>(); if (game != null) { game.UpdateOncePerFrame(); } } if (userInterfaceManager != null) { userInterfaceManager.UpdateOncePerFrame(); } sceneManager.UpdateOncePerFrame(); timers.Update.End(); #if ASSET_MONITOR var monitor = BaseServices.Get <AssetMonitor>(); if (monitor != null) { monitor.Update(); } #endif if (sounds != null) { sounds.PlayQueue(); } }
//Car #region Car public ContentResult CarOut(HrmsCarInOut hrmsCarInOut) { BaseServices <HrmsCar> hrmsCarService = new BaseServices <HrmsCar>(); var carmodel = hrmsCarService.LoadEntities(c => c.No == hrmsCarInOut.CarNo).First(); carmodel.Location = 1; carmodel.FormNo = hrmsCarInOut.FormNo; carmodel.CurrentKilometers = hrmsCarInOut.OutKilometers; if (!hrmsCarService.UpdateEntity(carmodel)) { return(Content("车辆状态更新失败")); } hrmsCarInOut.OutTime = DateTime.Now; hrmsCarInOut.InTime = DateTime.MaxValue; hrmsCarInOut.Oil = 0; hrmsCarInOut.InKilometers = 0; if (new BaseServices <HrmsCarInOut>().IsAddEntity(hrmsCarInOut)) { return (Content(new Signing().Agree(hrmsCarInOut.FormNo, 0, "1000000") ? "请求成功" : "表单签核失败!!!")); } return(Content("外出失败")); }
public ActionResult ProxySetting() { //只显示代理生效中或即将生效的记录,已生效且完成的不在显示 var model = new BaseServices <FormProxy>().LoadEntities( c => c.SourceEmpNo == base.EmpNo && c.EndTime >= DateTime.Now).ToList(); return(PartialView("~/Areas/eForm/Views/Personal/ProxySetting.cshtml", model)); }
public ShowCodePageViewModel(BaseServices baseServices, ICodeSampleResolver codeSampleResolver, IClipboard clipboard) : base(baseServices) { CodeSampleResolver = codeSampleResolver; Clipboard = clipboard; TapCommand = new DelegateCommand <string>(OnTapCommandExecuted); CopyTextToClipboardCommand = new DelegateCommand(OnCopyTextToClipboardCommandExecuted); }