public ActionResult SuggestValues(SuggestClerkModel SuggestData) { AddClerkModel WebData = new AddClerkModel(); WebData.ClerkID = SuggestData.ClerkID; WebData.ClerkName = SuggestData.ClerkName; try { if (ModelState.IsValid) { ICLerkService ClerkServiceInstance = new ClerkService(); WebData.ClerkPassword = ClerkServiceInstance.SuggestClerkPassword(); } } catch (Exception Ex) { ModelState.AddModelError("", Common.StandardExceptionHandler(Ex, "Suggest Clerk password", Request.Form)); Log.BadData(Request.UserHostAddress, Request.Url.ToString(), Request.Form); } return(View(WebData)); }
public ActionResult ChangeClerkPassword(SuggestClerkModel WebData) { EditClerkModel ToEdit = new EditClerkModel(); ToEdit.ClerkID = WebData.ClerkID; ToEdit.ClerkName = WebData.ClerkName; ToEdit.DatabaseID = WebData.DatabaseID; try { if (ModelState.IsValid) { ICLerkService ClerkServiceInstance = new ClerkService(); ToEdit.Password = ClerkServiceInstance.SuggestClerkPassword(); } } catch (Exception Ex) { ModelState.AddModelError("", Common.StandardExceptionHandler(Ex, "Change clerk password", Request.Form)); Log.BadData(Request.UserHostAddress, Request.Url.ToString(), Request.Form); } ActionResult NewView = View(ToEdit); return(View(ToEdit)); }