public HttpResponseMessage ForgotPassword(HttpRequestMessage req, DL_ForgotPassword forgotPas) { // Logger.WriteLog(LogLevelL4N.INFO, "Called ForgotPassword api"); if (forgotPas != null && !String.IsNullOrEmpty(forgotPas.Mobile)) { BL_Password blchangepass = new BL_Password(); DL_ForgotPasswordReturn forgotPasswordReturn = blchangepass.ForgotPassword(forgotPas); if (blchangepass._IsSuccess) { return(req.CreateResponse <DL_ForgotPasswordReturn>(HttpStatusCode.OK, forgotPasswordReturn)); } return(req.CreateErrorResponse(HttpStatusCode.InternalServerError, "ServerError")); } return(req.CreateErrorResponse(HttpStatusCode.BadRequest, "Bad Request")); }
public HttpResponseMessage ChangePassword(HttpRequestMessage req, DL_ChangePassword changePas) { //Logger.WriteLog(LogLevelL4N.INFO, "Called ChangePassword api"); if (changePas != null && !String.IsNullOrEmpty(changePas.UserId) && !String.IsNullOrEmpty(changePas.Key) && !String.IsNullOrEmpty(changePas.NPass) && !String.IsNullOrEmpty(changePas.OPass)) { BL_Password blchangepass = new BL_Password(); DL_ChangePasswordReturn changePasswordReturn = blchangepass.ChangePassword(changePas); if (blchangepass._IsSuccess) { return(req.CreateResponse <DL_ChangePasswordReturn>(HttpStatusCode.OK, changePasswordReturn)); } else { return(req.CreateErrorResponse(HttpStatusCode.InternalServerError, "ServerError")); } } else { return(req.CreateErrorResponse(HttpStatusCode.BadRequest, "Bad Request")); } }