Пример #1
0
        private void bt_xoa_Click(object sender, EventArgs e)
        {
            DialogResult myResult;

            myResult = MessageBox.Show("Are you really delete the item?", "Delete Confirmation", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if (myResult == DialogResult.OK)
            {
                int id = Convert.ToInt16(tb_ma.Text);
                var rs = SachService.DeleteBook(id);
                if (rs)
                {
                    MessageBox.Show("Xóa thành công");

                    clear();
                }
                else
                {
                    MessageBox.Show("Xóa nhật thất bại");
                }
            }
        }