Beispiel #1
0
        private void xtraTabControl1_CustomHeaderButtonClick(object sender, DevExpress.XtraTab.ViewInfo.CustomHeaderButtonEventArgs e)
        {
            XtraTabControl xtc  = sender as XtraTabControl;
            XtraTabPage    page = e.ActivePage as XtraTabPage;

            xtc.TabPages.Remove(page);
        }
Beispiel #2
0
 private void xtraTabControl2_CustomHeaderButtonClick(object sender, DevExpress.XtraTab.ViewInfo.CustomHeaderButtonEventArgs e)
 {
     if (xtraTabControl2.SelectedTabPage != anaSayfaTabPage2)
     {
         xtraTabControl2.SelectedTabPage.PageVisible = false;
     }
 }
 private void xtraTabControl2_CustomHeaderButtonClick(object sender, DevExpress.XtraTab.ViewInfo.CustomHeaderButtonEventArgs e)
 {
     if (sdd_ != "" && e.Button.Caption == "In bản khai")
     {
         if (IDNK == 0)
         {
             SplashScreenManager.ShowDefaultWaitForm("Đang tạo báo cáo", "Vui lòng chờ...");
             frmReport fr = new frmReport();
             fr.Text = "BẢN KHAI NHÂN KHẨU";
             BcBKNKnull re = new BcBKNKnull();
             fr.docView.PrintingSystem = re.PrintingSystem;
             re.CreateDocument();
             fr.ShowDialog();
             SplashScreenManager.CloseDefaultWaitForm();
         }
         else
         {
             Bientoancuc.inSua = true;
             Thoai_BcBKNhanKhau fr1 = new Thoai_BcBKNhanKhau(IDNK);
             fr1.ShowDialog();
         }
     }
     if (e.Button.Caption == "Lưu thông tin")
     {
         SplashScreenManager.ShowDefaultWaitForm("Đang tải", "Vui lòng chờ...");
         try
         {
             unitNHANKHAU.CommitChanges();
             unitQUATRINH.CommitChanges();
             unitQUANHE.CommitChanges();
             unitTIENAN.CommitChanges();
             unitDIENBIEN.CommitChanges();
             unitTAMVANG.CommitChanges();
             alertControl1.Show(this, "Thông báo", "Đã lưu");
         }
         catch (Exception)
         { }
         SplashScreenManager.CloseDefaultWaitForm();
     }
     else if (e.Button.Caption == "Xoá nhân khẩu")
     {
         SplashScreenManager.ShowDefaultWaitForm("Đang tải", "Vui lòng chờ...");
         if (XtraMessageBox.Show("Xoá nhân khẩu đang chọn?", "Xoá", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             foreach (var item in new XPQuery <NHANKHAU>(Session.DefaultSession).Where(o => o.ID == IDNK).ToList())
             {
                 item.Delete();
             }
             xpNHANKHAU.Reload();
             gridView3_FocusedRowChanged(null, null);
         }
         SplashScreenManager.CloseDefaultWaitForm();
     }
     else if (e.Button.Caption == "Làm mới")
     {
         xpNHANKHAU.Reload();
         alertControl1.Show(this, "Thông báo", "Đã làm mới");
     }
 }
Beispiel #4
0
 void xtraTabControl1_CustomHeaderButtonClick(object sender, DevExpress.XtraTab.ViewInfo.CustomHeaderButtonEventArgs e)
 {
     if (e.Button.Index == 0)
     {
         SplashScreenManager.ShowDefaultWaitForm("Đang tạo báo cáo", "Vui lòng chờ...");
         frmReport fr = new frmReport();
         fr.Text = "BẢN KHAI NHÂN KHẨU";
         BcBKNKnull re = new BcBKNKnull();
         fr.docView.PrintingSystem = re.PrintingSystem;
         re.CreateDocument();
         fr.MdiParent = this;
         fr.Show();
         SplashScreenManager.CloseDefaultWaitForm();
     }
 }
Beispiel #5
0
 private void sporcubilgiTabPage_CustomHeaderButtonClick(object sender, DevExpress.XtraTab.ViewInfo.CustomHeaderButtonEventArgs e)
 {
     if (e.Button.Tag.ToString() == "min")
     {
         this.WindowState = FormWindowState.Minimized;
     }
     else
     {
         if (XtraMessageBox.Show("Program Kapatılsın mı?", "Uyarı", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
         {
             Application.Exit();
         }
         {
         }
     }
 }
Beispiel #6
0
 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();
         }
     }
 }
 private void xtraTabControl1_CustomHeaderButtonClick(object sender, DevExpress.XtraTab.ViewInfo.CustomHeaderButtonEventArgs e)
 {
     if (e.Button.Index == 1)
     {
         SplashScreenManager.ShowDefaultWaitForm("Đang tải", "Vui lòng chờ...");
         try
         {
             unitNHANKHAU.CommitChanges();
             unitQUATRINH.CommitChanges();
             unitQUANHE.CommitChanges();
             unitTIENAN.CommitChanges();
             alertControl1.Show(this, "Thông báo", "Đã lưu");
         }
         catch (Exception)
         { }
         SplashScreenManager.CloseDefaultWaitForm();
     }
 }
Beispiel #8
0
 void out标签列表_CustomHeaderButtonClick(object sender, DevExpress.XtraTab.ViewInfo.CustomHeaderButtonEventArgs e)
 {
     创建新窗口();
 }