Exemple #1
0
 public static void RunAddUserInfo(PasswordConfirmation password, string id)
 {
     using (HREntities db = new HREntities())
     {
         var employee = db.Employees.Where(l => l.UserName == id).FirstOrDefault();
         var result   = db.AddUserInfo(employee.ID, employee.UserName, password.password);
     }
 }
Exemple #2
0
 public static string SaveChangedPassword(PasswordConfirmation password, string username)
 {
     using (HREntities db = new HREntities())
     {
         var emp = db.UserInfoes.Where(l => l.UserName == username).FirstOrDefault();
         emp.Password = password.password;
         db.SaveChanges();
         return("Successfully Changed");
     }
 }
Exemple #3
0
        public static string Password(PasswordConfirmation pass)
        {
            pass.password        = PWHashing.Hash(pass.password);
            pass.confirmpassword = PWHashing.Hash(pass.confirmpassword);

            if (pass.password == pass.confirmpassword)
            {
                return("Successfull");
            }
            else
            {
                return("Passswords Don't Match");
            }
        }
Exemple #4
0
 public static string SaveChangedPassword(PasswordConfirmation password, string username) //Saving the Changed password in the db
 {
     try
     {
         using (HREntities db = new HREntities())
         {
             var emp = db.UserInfoes.Where(l => l.UserName == username).FirstOrDefault();
             emp.Password = password.password;
             db.SaveChanges();
             return("Successfully Changed");
         }
     }
     catch (Exception ex)
     {
         LogFile.WriteLog(ex);
         return("Exception While trying to save in DB");
     }
 }