private void btnTao_Click(object sender, EventArgs e) { if (Bientoancuc.inSua == true) { SplashScreenManager.ShowDefaultWaitForm("Đang tạo báo cáo", "Vui lòng chờ..."); frmReport fr = new frmReport(); BcBKNK re = new BcBKNK(IDNK_, txtNguoiLap.Text, Convert.ToDateTime(dpkNgayLap.EditValue), txtDiaChi.Text); fr.Text = "BẢN KHAI NHÂN KHẨU"; fr.docView.PrintingSystem = re.PrintingSystem; re.CreateDocument(); fr.ShowDialog(); SplashScreenManager.CloseDefaultWaitForm(); } this.DialogResult = DialogResult.OK; this.Close(); }
void xtraTabControl2_CustomHeaderButtonClick(object sender, DevExpress.XtraTab.ViewInfo.CustomHeaderButtonEventArgs e) { if (e.Button.Index == 1) { frmReport fr = new frmReport(); fr.Text = "BẢN KHAI NHÂN KHẨU"; if (Bientoancuc.IDNK != 0) { Thoai_BcBKNhanKhau Bc = new Thoai_BcBKNhanKhau(Bientoancuc.IDNK); Bc.ShowDialog(); if (Bc.DialogResult == DialogResult.OK) { SplashScreenManager.ShowDefaultWaitForm("Đang tạo báo cáo", "Vui lòng chờ..."); frmReport fr1 = new frmReport(); BcBKNK re = new BcBKNK(Bientoancuc.IDNK, Bc.txtNguoiLap.Text, Convert.ToDateTime(Bc.dpkNgayLap.EditValue), Bc.txtDiaChi.Text); if (Bc.txtNguoiLap.EditValue != null && Bc.txtNguoiLap.Text != "") { re.NguoiLap_ = Bc.txtNguoiLap.Text; } if (Bc.dpkNgayLap.EditValue != null) { re.NgayLap_ = Convert.ToDateTime(Bc.dpkNgayLap.EditValue); } if (Bc.txtDiaChi.EditValue != null && Bc.txtDiaChi.Text != "") { re.DiaChi_ = Bc.txtDiaChi.Text; } fr1.Text = "BẢN KHAI NHÂN KHẨU"; fr1.docView.PrintingSystem = re.PrintingSystem; re.CreateDocument(); fr1.MdiParent = this; fr1.Show(); SplashScreenManager.CloseDefaultWaitForm(); } } else { SplashScreenManager.ShowDefaultWaitForm("Đang tạo báo cáo", "Vui lòng chờ..."); BcBKNKnull re1 = new BcBKNKnull(); fr.docView.PrintingSystem = re1.PrintingSystem; re1.CreateDocument(); fr.MdiParent = this; fr.Show(); SplashScreenManager.CloseDefaultWaitForm(); } } }