public ActionResult EmergencyView(int EmergencyId) { if (string.IsNullOrEmpty(ViewBag.LillyId)) { return(Redirect("/notauthed.html")); } var configedAppid = CommonService.lstSysConfig.FirstOrDefault( x => x.ConfigName.Equals(HseAppIdKey, StringComparison.OrdinalIgnoreCase)); if (configedAppid == null) { _Logger.Error("Have not config appid for hse."); } ViewBag.AppId = configedAppid == null ? 0 : int.Parse(configedAppid.ConfigValue); var resultViewModel = new HseMessageView(); var hse = _hseService.GetHseEmergency(EmergencyId, ViewBag.LillyId, ViewBag.AppId); List <HseEntity> lst = new List <HseEntity>(); if (hse != null) { lst.Add(hse); } resultViewModel.List = lst; return(View(resultViewModel)); }
private void Translate(HseMessageView hseMessageView) { if (hseMessageView.Status == "Safe") { hseMessageView.Status = "安全"; } else if (hseMessageView.Status == Status.Dangerous.ToString()) { hseMessageView.Status = "需要帮助"; } else { hseMessageView.Status = "无回应"; } }