public JsonResult Delete_Purchase(int ProductPurchaseID) { string _Del = null; try { KeystoneProject.Buisness_Logic.Pharmacy.BL_Purchase objdb = new BL_Purchase(); Purchase objSG = new Models.Pharmacy.Purchase(); int DependaincyName = objdb.DeletePurchase(ProductPurchaseID); if (DependaincyName > 0) { _Del = "Purchase Deleted Successfully !"; } else { _Del = "Purchase Can not be Deleted !"; } } catch (Exception ex) { throw ex; } return(new JsonResult { Data = _Del, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }