public dynamic ForgotpasswordUpdate(dynamic data) { string jsondata = JsonConvert.SerializeObject(data); try { Profilemodel val = JsonConvert.DeserializeObject <Profilemodel>(jsondata); var validresult = _valid.CheckPasswordValidation(val); if (validresult.Status == "Success") { return(Ok(_Loginhel.ProfileUpdate_helper(val))); } else { _response.Status = 102; _response.Reason = validresult.Reason; return(Ok(_response)); } } catch (Exception ex) { _response.Status = 102; _response.Reason = ex.Message.ToString(); return(Ok(_response)); } }
public dynamic GetCumilativeDashboardData(dynamic data) { string jsondata = token_gen.Authorize_aesdecrpty(data); try { Profilemodel val = JsonConvert.DeserializeObject <Profilemodel>(jsondata); return(Ok(_Loginhel.GetCumilativeDashboardData_helper(val))); } catch (Exception ex) { _response.Status = 102; _response.Reason = ex.Message.ToString(); return(Ok(_response)); } }
public dynamic ForgotpasswordVerifyOTP(dynamic data) { string jsondata = JsonConvert.SerializeObject(data); try { Profilemodel val = JsonConvert.DeserializeObject <Profilemodel>(jsondata); return(Ok(_Loginhel.ProfileVerifyOTP_helper(val))); } catch (Exception ex) { _response.Status = 102; _response.Reason = ex.Message.ToString(); return(Ok(_response)); } }
//Check Password Validation public dynamic CheckPasswordValidation(Profilemodel root) { var Message = ""; try { if (string.IsNullOrEmpty(root.PASSWORD)) { Message = "Please Enter Password"; } else if (pwdregexpression(root.PASSWORD)) { Message = "Password Should Contain atleast 1 digit,1 Uppercase,1 Lowercase and 1 special character"; } if (string.IsNullOrEmpty(Message)) { CatchData.Status = "Success"; CatchData.Reason = "Validated Successfully."; } else { CatchData.Status = "Failure"; CatchData.Reason = Message; } } catch (Exception ex) { CatchData.Status = "Failure"; CatchData.Reason = ex.Message; } return(CatchData); }