コード例 #1
0
ファイル: fCategory.cs プロジェクト: 6myduck/QLBD
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Bạn có muốn xóa danh mục ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         categoryBLL.DeleteCategory(Int32.Parse(dgvCategory.Rows[d].Cells[0].Value.ToString()));
         hienthi();
     }
 }
コード例 #2
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Bạn có muốn xóa danh mục ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         try
         {
             categoryBLL.DeleteCategory(Int32.Parse(dgvCategory.Rows[d].Cells[0].Value.ToString()));
             hienthi();
         } catch (Exception x)
         {
             MessageBox.Show("Phải chọn một dòng dữ liệu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }