예제 #1
0
 public static ClsReturnValues changePassword(int userID, string oldPassword, string newPassword)
 {
     newPassword = Security.Encrypt(newPassword);
     oldPassword = Security.Encrypt(oldPassword);
     ClsReturnValues lst = new ClsReturnValues();
     using (var db = new tdoEntities())
     {
         lst = db.uspChangePassword(userID, oldPassword, newPassword).FirstOrDefault();
     }
     return lst;
 }
예제 #2
0
        public static ClsReturnValues changePassword(int userID, string oldPassword, string newPassword)
        {
            newPassword = Security.Encrypt(newPassword);
            oldPassword = Security.Encrypt(oldPassword);
            ClsReturnValues lst = new ClsReturnValues();

            using (var db = new tdoEntities())
            {
                lst = db.uspChangePassword(userID, oldPassword, newPassword).FirstOrDefault();
            }
            return(lst);
        }
예제 #3
0
        public static ClsReturnValues resetPassword(int userID, string newPassword)
        {
            newPassword = Security.Encrypt(newPassword);
            ClsUsers        U           = Administration.getUsers().Where(p => p.userID == userID).ToList().FirstOrDefault();
            string          oldPassword = U.password;
            ClsReturnValues lst         = new ClsReturnValues();

            using (var db = new tdoEntities())
            {
                lst = db.uspChangePassword(userID, oldPassword, newPassword).FirstOrDefault();
            }
            return(lst);
        }
예제 #4
0
 public static ClsReturnValues resetPassword(int userID, string newPassword)
 {
     newPassword = Security.Encrypt(newPassword);
     ClsUsers U = Administration.getUsers().Where(p => p.userID == userID).ToList().FirstOrDefault();
     string oldPassword = U.password;
     ClsReturnValues lst = new ClsReturnValues();
     using (var db = new tdoEntities())
     {
         lst = db.uspChangePassword(userID, oldPassword, newPassword).FirstOrDefault();
     }
     return lst;
 }