private void btnUpdate_Click(object sender, EventArgs e) { if (txtLuongCoBan.Text != "" && txtLuongTheoGio.Text != "" && txtLamNgoaiGio.Text != "" && txtTienThuong.Text != "") { DialogResult dialog = MessageBox.Show("Bạn có chắc chắn muốn cập nhật mục này không?", "Xác nhận cập nhật", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialog == DialogResult.Yes) { if (DNV.Update_Salary(txtLuongCoBan.Text, txtLuongTheoGio.Text, txtLamNgoaiGio.Text, txtTienThuong.Text, txtMaNV.Text)) { MessageBox.Show("Cập nhật thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); Load_Salary(DNV.Salary_Staff()); openButton(true); } else { MessageBox.Show("Cập nhật thất bại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); Load_Salary(DNV.Salary_Staff()); } } } else { MessageBox.Show("Vui lòng không để trống", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void Btn_ReFresh_Click(object sender, EventArgs e) { Data_NV DNV = new Data_NV(); Load_Salary(DNV.Salary_Staff()); Clear(); }
private void ThongTinLuongNhanVien_Load(object sender, EventArgs e) { DNV = new Data_NV(); Load_Salary(DNV.Salary_Staff()); }