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..!!");
         }
     }
 }
예제 #2
0
 public void IHttpActionResult(int id)
 {
     brandDal.Delete(id);
 }
예제 #3
0
 public JsonResult Delete(long id)
 {
     return(Json(new { done = brandDAL.Delete(id) },
                 JsonRequestBehavior.AllowGet));
 }