public void ThemChucVu(string tencv) { string sql = "SP_THEM_CV N'" + tencv + "'"; try { db.ExecuteLenh(sql); MessageBox.Show("Thêm chức vụ thành công", "Thông báo!!!", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show("Thêm chức vụ không thành công \n" + "\n Lỗi \t" + ex.Message, "Thông báo!!!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public void XoaCTCH_CC(string mach, string macc) { DialogResult kq = MessageBox.Show("Bạn có chắc muốn hủy câu chọn này không?", "Cảnh báo!!!", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); if (kq == DialogResult.Yes) { try { db.ExecuteLenh("SP_XOA_CHCC '" + mach + "','" + macc + "'"); MessageBox.Show("Hủy câu chọn của câu hỏi thành công", "Thông báo!!", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch { return; } } }