// Control the view of the editor report public ActionResult EditorReport() { try { AllLists allLists = new AllLists(); allLists.ApprovedDataDrivenRules = rulesEditor.GetYourDataDrivenRulesByStatus("Approved", User.Identity.Name); allLists.ApprovedFixedRules = rulesEditor.GetYourFixedRulesByStatus("Approved", User.Identity.Name); allLists.RejectedRulesCount = rulesEditor.CountRejectedRules(User.Identity.Name); allLists.ApprovedRulesCount = rulesEditor.CountApprovedRules(User.Identity.Name); allLists.SuccessRate = String.Format("{0:P}", rulesEditor.SuccessRate(User.Identity.Name)); return(View(allLists)); } catch (Exception e) { return(View("Error", new HandleErrorInfo(e, "Editor", "EditorReport"))); } }
// Control the view of the editor main page // GET: Editor public ActionResult Index() { try { AllLists allLists = new AllLists(); allLists.RejectedDataDrivenRules = rulesEditor.GetDataDrivenRulesByStatus("Rejected"); allLists.UncheckedDataDrivenRules = rulesEditor.GetDataDrivenRulesByStatus("Unchecked"); allLists.RejectedFixedRules = rulesEditor.GetFixedRulesByStatus("Rejected"); allLists.UncheckedFixedRules = rulesEditor.GetFixedRulesByStatus("Unchecked"); return(View(allLists)); } catch (Exception e) { return(View("Error", new HandleErrorInfo(e, "Editor", "Index"))); } }