public JsonResult Delete(DrugBrandViewModel model) { int deleteIndex = 0; try { deleteIndex = DrugBrandManager.DeleteDrugBrand(model.BrandId); } catch (Exception exception) { throw new Exception(exception.Message); } return(deleteIndex > 0 ? Reload() : ErroResult("Failed to delete")); }