예제 #1
0
        private void simpleButton3_Click(object sender, EventArgs e)
        {
            int i = BUS_BoPhan.UpdateBoPhan(deptID, txtSuaMaBP.Text, txtSuaTenTA.Text, txtSuaTenTV.Text, tinhTrang);

            if (i == 1)
            {
                MessageBox.Show("Cập nhật thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Cập nhật không thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
        private void btnXoa_Click(object sender, EventArgs e)
        {
            string tinhTrang = "0";

            if (MessageBox.Show("Bạn có chắc chắn muốn xóa?", "Thông báo", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                int i = BUS_BoPhan.UpdateBoPhan(deptID, txtSuaMaBP.Text, txtSuaTenTA.Text, txtSuaTenTV.Text, tinhTrang);
                if (i == 1)
                {
                    MessageBox.Show("Xóa thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("Xóa không thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }