public ActionResult ResetAttemptsView(Models.ResetAttemptsModel obj) { Models.ResetAttemptsModel rc = new Models.ResetAttemptsModel(); rc.NameList = rc.GetNameList(); rc.ModuleList = rc.GetModuleList(); rc.Module = obj.Module; rc.ModuleNum = rc.GetModuleNum(); rc.Name = obj.Name; rc.EmployeeID = rc.GetEmployeeID(); string result = rc.ResetAttempts(); if (result == "Success") { string reset = rc.ResetCompletedModules(); TempData["Client"] = "pass"; ModelState.Clear(); return(View(rc)); } else { rc.NameList = rc.GetNameList(); rc.ModuleList = rc.GetModuleList(); TempData["Client"] = "fail"; return(View()); } }
/// <summary> /// This View is called when the admin selects reset attempts option /// Creates an object of the reset attempts model /// Calls the method to get the list of employee names and modules to display on page load /// </summary> /// <returns></returns> public ActionResult ResetAttemptsView() { Models.ResetAttemptsModel rc = new Models.ResetAttemptsModel(); rc.NameList = rc.GetNameList(); rc.ModuleList = rc.GetModuleList(); return(View(rc)); }