private void Get_User(string MobileNo) { ForgotPassword_ViewModel obj_ForgotPasswordVM = new ForgotPassword_ViewModel(); List <KeyValuePair <string, string> > getByID_Parameters = new List <KeyValuePair <string, string> >(); getByID_Parameters.Add(new KeyValuePair <string, string>("@MobileNo", Convert.ToString(MobileNo))); _customer = JsonConvert.DeserializeObject <CustomerMaster_DataModel>(obj_ForgotPasswordDAL.GetCustomerByEmail(getByID_Parameters)); }
public bool ResetPassword(ForgotPassword_ViewModel obj_ForgotPasswordVM) { try { Get_User_For_Reset_Password(obj_ForgotPasswordVM.forgotPassword.MobileNo, obj_ForgotPasswordVM.forgotPassword.OTP); if (_customer != null) { Update_Reseted_Password(obj_ForgotPasswordVM.forgotPassword.MobileNo, obj_ForgotPasswordVM.forgotPassword.NewPassword); IsPasswordUpdateSuccessfully = true; } else { IsPasswordUpdateSuccessfully = false; //throw new Exception(string.Format("OTP does not match with Username.")); } } catch (Exception ex) { throw; } return(IsPasswordUpdateSuccessfully); }
public ForgotPasswordPage() { InitializeComponent(); BindingContext = new ForgotPassword_ViewModel(); }