private void btnDelete_Click(object sender, EventArgs e) { if (textBrandId.Text == "") { MessageBox.Show("Please Select The Brand"); } else { BrandBLL.Brand_ID = int.Parse(textBrandId.Text); bool success = BrandDAL.Delete(BrandBLL); if (success == true) { MessageBox.Show("Record deleted Succesfully"); clear(); DataTable dt = BrandDAL.Select(); dgvBrand.DataSource = dt; } else { MessageBox.Show("Error occured..!!"); } } }
public void IHttpActionResult(int id) { brandDal.Delete(id); }
public JsonResult Delete(long id) { return(Json(new { done = brandDAL.Delete(id) }, JsonRequestBehavior.AllowGet)); }