Пример #1
0
 //删除商品类别
 private void btnDeleteCategory_Click(object sender, EventArgs e)
 {
     if (dgvCategoryInfo.SelectedRows.Count > 0)
     {
         CategoryInfoBLL bll = new CategoryInfoBLL();
         int             id  = Convert.ToInt32(dgvCategoryInfo.SelectedRows[0].Cells[0].Value);
         if (bll.DeleteCategoryInfoByCatId(id))
         {
             MessageBox.Show("删除成功");
             LoadCategoryInfoByDelFlag(0);
         }
         else
         {
             MessageBox.Show("删除失败");
         }
     }
     else
     {
         MessageBox.Show("请选择要处理的行");
     }
 }