public JsonResult CancelChallan(int challanId) { bool result = default(bool); string msg = string.Empty; try { //pData.UserId = GlobalSettings.oUserData.UserId; result = objDbTrx.CancelChallan(challanId); msg = result ? "Challan Cancel successfully" : "Error detected"; } catch (Exception ex) { msg = ex.Message; objDbTrx.SaveSystemErrorLog(ex, Request.UserHostAddress); } return(Json(new { Success = (result ? 1 : 0), Message = msg }, JsonRequestBehavior.AllowGet)); }