public JsonResult Delete_Customer(string EnquiryId) { bool result = false; string msg = "Customer is Used , Data can't be deleted"; result = CustomerMethods.Delete_Customer_Record(EnquiryId, Session["DealerCode"].ToString()); if (result) { msg = "Successfully Deleted"; } return(Json(new { Success = result, Message = msg }, JsonRequestBehavior.AllowGet)); }