public JsonResult GetA52RatingOrg(string ratingOrg) { MSGReturnModel result = new MSGReturnModel(); result.RETURN_FLAG = false; result.DESCRIPTION = Message_Type.not_Find_Any.GetDescription(); try { var queryResult = A5Repository.getA52(ratingOrg, "All", "All", "All", "All"); result.RETURN_FLAG = queryResult.Item1; Cache.Invalidate(CacheList.A52AuditDetailDbfileData); //清除 Cache.Set(CacheList.A52AuditDetailDbfileData, queryResult.Item2); //把資料存到 Cache if (!result.RETURN_FLAG) { result.DESCRIPTION = Message_Type.not_Find_Any.GetDescription(); } } catch (Exception ex) { result.RETURN_FLAG = false; result.DESCRIPTION = ex.Message; } return(Json(result)); }
public ActionResult D70() { List <SelectOption> selectOptionCheckPoint = new List <SelectOption>() { new SelectOption() { Text = "", Value = "" }, new SelectOption() { Text = "-2:上上個月報導日", Value = "-2" }, new SelectOption() { Text = "0:本月報導日", Value = "0" } }; ViewBag.BasicPassCheckPoint = new SelectList(selectOptionCheckPoint, "Value", "Text"); List <SelectOption> selectOptionBasicPass = new List <SelectOption>() { new SelectOption() { Text = "", Value = "" }, new SelectOption() { Text = "Y:是", Value = "Y" }, new SelectOption() { Text = "N:否", Value = "N" }, new SelectOption() { Text = "-999", Value = "-999" } }; ViewBag.BasicPass = new SelectList(selectOptionBasicPass, "Value", "Text"); ViewBag.RatingCheckPoint = new SelectList(selectOptionCheckPoint, "Value", "Text"); List <SelectOption> selectOptionA52 = new List <SelectOption>(); selectOptionA52.Add(new SelectOption() { Text = "", Value = "" }); selectOptionA52.AddRange((A5Repository.getA52("SP").Item2) .Select(x => new SelectOption() { Text = x.Rating, Value = x.Rating })); selectOptionA52.Add(new SelectOption() { Text = "-999", Value = "-999" }); ViewBag.A52 = new SelectList(selectOptionA52, "Value", "Text"); ViewBag.IncludingInd0 = new SelectList(selectOptionYN, "Value", "Text"); ViewBag.IncludingInd1 = new SelectList(selectOptionYN, "Value", "Text"); ViewBag.IncludingInd2 = new SelectList(selectOptionYN, "Value", "Text"); ViewBag.ApplyRange0 = new SelectList(selectOptionRange, "Value", "Text"); ViewBag.ApplyRange1 = new SelectList(selectOptionRange, "Value", "Text"); ViewBag.ApplyRange2 = new SelectList(selectOptionRange, "Value", "Text"); ViewBag.Status = new SelectList(selectOptionStatus, "Value", "Text"); if (getAssessment(groupProductCode, "D70", SetAssessmentType.Presented) .Any(x => x.User_Account.Contains(AccountController.CurrentUserInfo.Name))) { ViewBag.IsSender = "Y"; } else { ViewBag.IsSender = "N"; } List <SelectOption> selectOption = new List <SelectOption>(); selectOption.Add(new SelectOption() { Text = "", Value = "" }); selectOption.AddRange(getAssessment(groupProductCode, "D70", SetAssessmentType.Auditor) .Select(x => new SelectOption() { Text = (x.User_Name), Value = x.User_Account })); ViewBag.Auditor = new SelectList(selectOption, "Value", "Text"); ViewBag.UserAccount = AccountController.CurrentUserInfo.Name; IsActiveList ial = new IsActiveList(); selectOption = ial.isActiveOption; selectOption.Insert(0, new SelectOption() { Text = "", Value = "" }); ViewBag.IsActive = new SelectList(selectOption, "Value", "Text"); ViewBag.A51Year = D7Repository.GetA51Year(); return(View()); }