public void NoHocPhi() { hocphi = new ThongTinHocPhi(); DataTable dt = hocphi.getDsNoHocPhi(AccountHelper.getAccountId(), AccountHelper.getAccoutPassword()); DateTime today = DateTime.Today; name = today.Month + "-" + today.Day + "-" + today.Year + "_NoHocPhi"; ShowTable(dt); lbMain.Hide(); cbMain.Hide(); }
private void btnSua_Click(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; ThongTinHocPhi tthp = new ThongTinHocPhi(); int flat = tthp.update(AccountHelper.getAccountId(), AccountHelper.getAccoutPassword(), cbxMaHV.Text, cbxMaLop.Text, txtTienThu.Text, txtTienNo.Text, dtNgTT.Value); if (flat == 1) { DialogHelper.ExtendedShowErrorDialog("Sửa thành công", "", 1, 2); } else { DialogHelper.ExtendedShowErrorDialog("Sửa không thành công", "", 1, 1); } Load_DL(); EditButton(true, false, false, false); this.Cursor = Cursors.Arrow; }
private void btnXoa_Click(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; if (MessageBox.Show("Bạn có muốn xóa không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { ThongTinHocPhi tthp = new ThongTinHocPhi(); int flat = tthp.delete(AccountHelper.getAccountId(), AccountHelper.getAccoutPassword(), cbxMaHV.Text); if (flat == 1) { DialogHelper.ExtendedShowErrorDialog("Xóa thành công", "", 1, 2); } else { DialogHelper.ExtendedShowErrorDialog("Xóa không thành công", "", 1, 1); } } Load_DL(); EditButton(true, false, false, false); this.Cursor = Cursors.Arrow; }