Пример #1
0
 public ActionResult ChangePass(string account)
 {
     try
     {
         ChangePassView view = new ChangePassView {
             Account = account, ConfirmPass = "", NewPass = "", OldPass = ""
         };
         return(View(view));
     }
     catch (Exception)
     {
         return(View());
     }
 }
Пример #2
0
 public bool ChangePass(ChangePassView model)
 {
     try
     {
         var _item = DbContext.Members.FirstOrDefault(x => x.Account == model.Account && x.Password == model.OldPass);
         if (_item != null && _item.Account != "")
         {
             _item.Password = model.NewPass;
             return(true);
         }
         return(false);
     }
     catch (System.Exception)
     {
         return(false);
     }
 }
Пример #3
0
 public ActionResult ChangePass(ChangePassView model)
 {
     try
     {
         if (ModelState.IsValid)
         {
             if (_staffBusiness.ChangePass(model))
             {
                 _staffBusiness.Save();
                 return(Redirect("/Dashboard/Dashboard"));
             }
         }
         return(View());
     }
     catch (Exception)
     {
         return(View());
     }
 }
Пример #4
0
 public bool ChangePass(ChangePassView model)
 {
     return(_staff.ChangePass(model));
 }
Пример #5
0
 public bool ChangePass(ChangePassView model)
 {
     return(_member.ChangePass(model));
 }
Пример #6
0
 public bool ChangePass(ChangePassView model)
 {
     return(_patient.ChangePass(model));
 }