public HttpResponseBase EditPass() { string jsonStr = "{success:false}"; try { _vendorMgr = new VendorMgr(connectionString); string newPass = string.Empty; string vendorId = string.Empty; if (!string.IsNullOrEmpty(Request.Params["vendorId"])) { vendorId = Request.Params["vendorId"].ToString(); } if (!string.IsNullOrEmpty(Request.Params["newPass"])) { BLL.gigade.Common.HashEncrypt hash = new BLL.gigade.Common.HashEncrypt(); newPass = hash.SHA256Encrypt(Request.Params["newPass"].ToString()); } if (_vendorMgr.EditPass(vendorId, newPass) > 0) { jsonStr = "{success:true}"; } else { jsonStr = "{success:false}"; } } catch (Exception ex) { Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage(); logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message); logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; log.Error(logMessage); jsonStr = "{success:false}"; } this.Response.Clear(); this.Response.Write(jsonStr.ToString()); this.Response.End(); return this.Response; }