Esempio n. 1
0
        private void btnxRemoveCategory_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("Xác nhận xoá Danh mục ID = " + this.rowData.Cells[0].Value.ToString(), "XOÁ DANH MỤC SẢN PHẨM", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (result == DialogResult.OK)
            {
                CategoryBLL ctgrBLL = new CategoryBLL();
                ctgrBLL.DeleteRow(this.id);

                this.setAllDataToDataGridView();
                this.btnxEditCategory.Enabled   = false;
                this.btnxRemoveCategory.Enabled = false;
            }
            else
            {
                //MessageBox.Show("Cancel");
            }
        }