Esempio n. 1
0
 public IHttpActionResult ResetPassword(string id, PasswordConfirmation password)
 {
     try
     {
         id = Encode.Base64Decode(id);
         string message = VerifyPasswords.Password(password);
         if (message == "Successfull")
         {
             DBOperations.SaveChangedPassword(password, id);
             return(Ok("Password Changed Successfully"));
         }
         else if (message == "Passswords Don't Match")
         {
             return(Ok("Passswords Don't Match"));
         }
         else
         {
             return(Ok("Password Change Not Successful"));
         }
     }
     catch (Exception ex)
     {
         LogFile.WriteLog(ex);
         return(BadRequest());
     }
 }
Esempio n. 2
0
 public IHttpActionResult VerifyEmployee(string id, PasswordConfirmation password)
 {
     try
     {
         id = Encode.Base64Decode(id);
         string message = VerifyPasswords.Password(password);
         if (message == "Successfull")
         {
             CallStoredProc.RunAddUserInfo(password, id);
             return(Ok("Verified Successfully"));
         }
         else
         {
             return(Ok("Verification Not Successful"));
         }
     }
     catch (Exception ex)
     {
         LogFile.WriteLog(ex);
         return(BadRequest());
     }
 }