public int ChangePassword(ComLogin objLogin) { Authentication(); LoginDAL objDal = new LoginDAL(); return(objDal.ChangePassword(objLogin)); }
public HttpResponseMessage PostChangePassword(Changepassword changePass) { LoginDAL userdal = new LoginDAL(); Response objResponse = new Response(); try { var jsonResult = new StringBuilder(); jsonResult = userdal.ChangePassword(changePass); objResponse.Data = jsonResult.ToString(); if (!string.IsNullOrEmpty(jsonResult.ToString()) && jsonResult.ToString() != "-1") { objResponse.Success = true; } else { objResponse.Success = false; } return(Request.CreateResponse(HttpStatusCode.OK, objResponse)); } catch (Exception ex) { #region set exception response string logMsg = Environment.NewLine + DateTime.Now + Environment.NewLine + "Method Name: changePassword | Contoller Name: Login Controller" + Environment.NewLine; logMsg += ":" + DateTime.Now + "|" + ex.ToString() + "-" + Environment.NewLine; ErrorHandler.ErrorLog(logMsg); #endregion objResponse.ErrorList.Add(new Error { errorCode = "EX", errorMsg = ex.Message }); objResponse.Success = false; return(Request.CreateResponse(HttpStatusCode.BadRequest, objResponse)); } }