Exemple #1
0
 public ActionResult ChangePass(string account)
 {
     try
     {
         ChangePassView view = new ChangePassView {
             Account = account, ConfirmPass = "", NewPass = "", OldPass = ""
         };
         return(View(view));
     }
     catch (Exception)
     {
         return(View());
     }
 }
Exemple #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);
     }
 }
Exemple #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());
     }
 }
Exemple #4
0
 public bool ChangePass(ChangePassView model)
 {
     return(_staff.ChangePass(model));
 }
Exemple #5
0
 public bool ChangePass(ChangePassView model)
 {
     return(_member.ChangePass(model));
 }
 public bool ChangePass(ChangePassView model)
 {
     return(_patient.ChangePass(model));
 }