Example #1
0
        public static void DownloadNew(string newfile)
        {
            SplashScreenManager.ShowDefaultWaitForm("请等待", "下载中....");

            string        sql = "select ufile from fv01 where verId=(select max(verId) from fv01)";       //从数据库取
            OracleCommand cmd = new OracleCommand(sql, SqlAssist.conn);

            OracleDataReader dr = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
            int bufferSize      = 10240;

            if (dr.Read())
            {
                string     path       = Directory.GetCurrentDirectory() + "\\" + newfile + ".zip";         //需要预先在项目文件夹中建立此目录
                FileStream fs         = new FileStream(path, FileMode.Create, FileAccess.Write);
                byte[]     buf        = new byte[bufferSize];
                long       bytesRead  = 0;
                long       startIndex = 0;

                //LargePhoto的数据比较大,因此分批次读出,分别写入文件
                while ((bytesRead = dr.GetBytes(0, startIndex, buf, 0, bufferSize)) > 0)
                {
                    fs.Write(buf, 0, (int)bytesRead);
                    startIndex += bytesRead;
                }
                ;
                fs.Flush();
                fs.Close();

                UnZip(path, newfile);
                File.Delete(path);

                SplashScreenManager.CloseDefaultWaitForm();
            }
        }
        private async void btnGetPorts_Click(object sender, EventArgs e)
        {
            clearAllText();
            MvItCiscoBo bo = new MvItCiscoBo();

            SplashScreenManager.ShowDefaultWaitForm();
            DataTable dt = null;

            gridControl1.DataSource = null;
            gridControl1.DataBindings.Clear();
            gridControl1.RefreshDataSource();
            gridView1.Columns.Clear();
            gridView1.RefreshData();

            dt = await bo.getPortStatusTable(GlobalConstant.MvMisCiscoIpList);

            SocketException se = null;

            se = bo.getSocketException();
            if (se != null)
            {
                MessageBox.Show(se.Message + Environment.NewLine + Environment.NewLine + "持續載入資訊中 ......");
            }

            gridControl1.DataSource            = dt;
            gridView1.OptionsBehavior.Editable = false;
            gridControl1.RefreshDataSource();
            gridView1.RefreshData();
            SplashScreenManager.CloseForm(false);
        }
Example #3
0
        private void bbiShipingLabel_ItemClick(object sender, ItemClickEventArgs e)
        {
            SplashScreenManager.ShowDefaultWaitForm();
            List <OrderBody> ob  = gridControl.DataSource as List <OrderBody>;
            string           sql = $"SELECT * FROM TXP_ISSPACKDETAIL d WHERE d.ISSUINGKEY = '{ob[0].RefNo}' AND d.SHIPPLNO  IS NOT NULL ORDER BY d.SHIPPLNO,d.FTICKETNO";
            DataSet          dr  = new ConnDB().GetFill(sql);

            if (dr.Tables[0].Rows.Count > 0)
            {
                int stctn = 0;
                foreach (DataRow r in dr.Tables[0].Rows)
                {
                    stctn += 1;
                    new InvoiceControllers().PrintFTicket(ob[0].RefNo, r["fticketno"].ToString(), stctn.ToString());
                }
            }
            //int stctn = 0;
            //int i = 0;
            //while (i < ob.Count)
            //{
            //    OrderBody r = ob[i];
            //    if (r.Ctn > 0)
            //    {
            //        stctn += r.Ctn;
            //        int startlb = stctn - (r.Ctn - 1);
            //        Console.WriteLine($"{i}. {r.RefNo} PARTNO: {r.PartNo} CTN: {r.Ctn} SEQ START: {startlb} SEQ END: {stctn}");
            //        new InvoiceControllers().PrintFTicket(r.RefNo, r.PartNo, r.OrderNo, (startlb - 1), null);
            //    }
            //    i++;
            //}
            //Console.WriteLine($"TOTAL: {i}");
            SplashScreenManager.CloseDefaultWaitForm();
        }
 private void xbeExcelFile_ButtonClick(object sender, ButtonPressedEventArgs e)
 {
     if (folderBrowserDialog.ShowDialog() != DialogResult.OK)
     {
         return;
     }
     try
     {
         SplashScreenManager.ShowDefaultWaitForm();
         xbeFilePath.Text = folderBrowserDialog.SelectedPath;
         _htFiles         = new Hashtable();
         Directory.GetFiles(xbeFilePath.Text, "*.*", SearchOption.TopDirectoryOnly).ToList().ForEach(p => _htFiles.Add(p, string.Empty));
         xgcResult.DataSource = _htFiles;
         xgvResult.RefreshData();
         xgvResult.BestFitColumns(true);
     }
     catch (Exception exception)
     {
         XtraMessageBox.Show(exception.Message + "\r\n" + exception.StackTrace);
     }
     finally
     {
         SplashScreenManager.CloseDefaultWaitForm();
     }
 }
Example #5
0
 private void ExportDocRec()
 {
     saveFileDialog1.Title  = "请选择导出档案接收确认函Word文件位置...";
     saveFileDialog1.Filter = "Word文件|*.doc";
     if (saveFileDialog1.ShowDialog() == DialogResult.OK)
     {
         SplashScreenManager.ShowDefaultWaitForm(this, false, false);
         string       savePath = saveFileDialog1.FileName;
         StreamWriter sw;
         try
         {
             sw = new StreamWriter(savePath, false, Encoding.Default);
             sw.WriteLine(GetDomRecHTML());
             sw.Flush();
             sw.Close();
             SplashScreenManager.CloseDefaultSplashScreen();
             if (XtraMessageBox.Show("导出档案接收确认函成功,是否立即打开?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.Yes)
             {
                 WinFormOpenHelper.OpenWinForm(0, "open", savePath, null, null, ShowWindowCommands.SW_NORMAL);
             }
         }
         catch (Exception ex)
         {
             LogsHelper.AddErrorLogs("导出错误", ex.Message);
         }
     }
 }
Example #6
0
        private void accordionControlElement47_Click(object sender, EventArgs e)
        {
            Thoai_BcHoKhau fr = new Thoai_BcHoKhau();

            fr.ShowDialog();
            if (fr.DialogResult == DialogResult.OK)
            {
                SplashScreenManager.ShowDefaultWaitForm("Đang tạo báo cáo", "Vui lòng chờ...");
                frmReport fr1 = new frmReport();
                BcHoKhau  re  = new BcHoKhau(fr.txtNguoiLap.Text, Convert.ToDateTime(fr.dpkNgayLap.EditValue), fr.txtDiaChi.Text);
                if (fr.dateEdit1.EditValue != null)
                {
                    re.NgayTu = Convert.ToDateTime(fr.dateEdit1.EditValue);
                }
                if (fr.dateEdit2.EditValue != null)
                {
                    re.NgayDen = Convert.ToDateTime(fr.dateEdit2.EditValue);
                }
                fr1.Text = "BÁO CÁO HỘ KHẨU";
                fr1.docView.PrintingSystem = re.PrintingSystem;
                re.CreateDocument();
                fr1.MdiParent = this;
                fr1.Show();
                SplashScreenManager.CloseDefaultWaitForm();
            }
        }
Example #7
0
        /// <summary>
        /// 节点焦点改变事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e)
        {
            if (e.Node == null)
            {
                return;
            }
            if (e.Node.Level == 0)
            {
                gridControl2.Visible = false;
                pictureBox1.Visible  = true;
            }
            else
            {
                pictureBox1.Visible  = false;
                gridControl2.Visible = true;

                curRegionId        = e.Node.GetValue("RG001").ToString();
                dv_rower.RowFilter = "rg009='" + curRegionId + "'";

                SplashScreenManager.ShowDefaultWaitForm("请等待", "处理中....");
                DrawGrid(e.Node.GetValue("RG001").ToString());
                SplashScreenManager.CloseDefaultWaitForm();
            }
            this.Tomb_stat();
        }
Example #8
0
 private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     SplashScreenManager.ShowDefaultWaitForm("Loading crypto icons...");
     CurrencyLogoProvider.BuildIconsDataBase(BittrexExchange.Default.Tickers.Select(t => new string[] { t.MarketCurrency, t.LogoUrl }), true);
     SplashScreenManager.CloseDefaultWaitForm();
     XtraMessageBox.Show("Please restart application. :)");
 }
Example #9
0
        private void btnImpTickect_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (gvVentas.FocusedRowHandle < 0)
            {
                return;
            }

            try
            {
                SplashScreenManager.ShowDefaultWaitForm("Por favor espere", "Cargando reporte...");
                StiReport stiReport = new StiReport();
                stiReport.LoadFromString(reporteOperations.GetByName("Ticket").xml);
                stiReport.Dictionary.Databases.Clear();
                stiReport.Dictionary.Databases.Add(new StiSqlDatabase("SystemShoes", SystemShoesContext.conString));
                stiReport.Dictionary.Variables.Add(new StiVariable("idVenta", gvVentas.GetFocusedRowCellValue("idVenta")));
                stiReport.Print(false);
                SplashScreenManager.CloseDefaultWaitForm();
                stiReport.Show();
                this.Close();
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Error " + ex.Message);
            }
        }
Example #10
0
        /// <summary>
        /// 刷新数据
        /// </summary>
        private void RefreshData()
        {
            if (tg_ds.dt_rg01.GetChanges() != null || tg_ds.dt_bi01.GetChanges() != null)
            {
                DialogResult dr = XtraMessageBox.Show("刷新会丢失未保存的更新,是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                if (dr == DialogResult.Cancel)
                {
                    return;
                }
            }

            SplashScreenManager.ShowDefaultWaitForm("请等待", "刷新数据....");

            treeList1.BeginUpdate();
            treeList1.ClearNodes();

            tg_ds.dt_rg01.Rows.Clear();
            tg_ds.dt_bi01.Rows.Clear();

            tg_ds.Fill_Rg01();
            tg_ds.Fill_Bi01();

            treeList1.ExpandToLevel(1);
            treeList1.EndUpdate();

            SplashScreenManager.CloseDefaultWaitForm();
        }
Example #11
0
        public void Query()
        {
            dataLayoutControl1.Validate();

            T_JCXX_DAL dal       = new T_JCXX_DAL();
            var        sqlFilter = sqlFilterBindingSource.Current as SqlFilter;
            var        list1     = new List <T_JCXX>();

            SplashScreenManager.ShowDefaultWaitForm($"正在查询");

            try
            {
                var sqlWhere = "1 =1 ";
                sqlWhere += $" and f_bz<>'' ";
                if (sqlFilter.Blk != null && (sqlFilter.Blk != "全部" && sqlFilter.Blk != ""))
                {
                    sqlWhere += $" and f_blk='{sqlFilter.Blk}' ";
                }
                if (sqlFilter.Bgrq1.HasValue)
                {
                    //收到日期
                    sqlWhere += $" and CONVERT(datetime,f_bgrq) >= CONVERT(datetime,'{sqlFilter.Bgrq1.Value.Date}') ";
                }
                if (sqlFilter.Bgrq2.HasValue)
                {
                    sqlWhere += $" and CONVERT(datetime,f_bgrq) <=CONVERT(datetime,'{sqlFilter.Bgrq2.Value.Date.AddDays(1)}') ";
                }
                if (!string.IsNullOrEmpty(sqlFilter.CrisisText))
                {
                    sqlWhere += $" and f_bz like '%{sqlFilter.CrisisText}%' ";
                }

                list1 = T_JCXX_DAL.GetBySqlWhere(sqlWhere, "f_bgrq");
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.ToString());
                return;
            }
            finally
            {
                try
                {
                    SplashScreenManager.CloseDefaultWaitForm();
                }
                catch
                {
                }
            }

            if (list1.Any() == false)
            {
                XtraMessageBox.Show("没有找到任何结果!");
            }
            tJCXXBindingSource.DataSource = list1;
            gridView1.RefreshData();
            gridView1.ExpandAllGroups();

            gridView1.BestFitColumns();
        }
Example #12
0
        private void barButtonItem2_ItemClick(object sender, ItemClickEventArgs e)
        {
            var result = XtraInputBox.Show("ระบุเลขที่ LOTNO ที่ต้องการค้นหา", "ค้นหาข้อมูล", null);

            Console.WriteLine(result);
            try
            {
                SplashScreenManager.ShowDefaultWaitForm();
                if (result != null)
                {
                    if (result.ToString() != "")
                    {
                        List <OrderData> obj = new OrderControllers().GetLotNoData(result.ToString());
                        if (obj.Count > 0)
                        {
                            gridControl.DataSource  = obj;
                            bsiRecordsCount.Caption = "RECORDS : " + obj.Count;
                        }
                        else
                        {
                            XtraMessageBox.Show("ไม่พบข้อมูลที่ต้องการค้นหา");
                        }
                    }
                }
                SplashScreenManager.CloseDefaultWaitForm();
            }
            catch (Exception ex)
            {
                new GreeterFunction().CreateLogSearch(result.ToString());
                XtraMessageBox.Show("ไม่พบข้อมูลที่ต้องการค้นหา");
            }
        }
Example #13
0
        private void bbiPrintAllShipingLabel_ItemClick(object sender, ItemClickEventArgs e)
        {
            DialogResult r = XtraMessageBox.Show("คุณต้องการที่จะปริ้น Shipping Label ใช่หรือไม่", "ยืนยันคำสั่ง", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (r == DialogResult.Yes)
            {
                bool checkinv = new InvoiceControllers().CheckInvoiceStatus(ob.RefInv);
                if (checkinv)
                {
                    List <InvoiceBodyData> obj = gridControl.DataSource as List <InvoiceBodyData>;
                    SplashScreenManager.ShowDefaultWaitForm();
                    int i = 0;
                    while (i < obj.Count)
                    {
                        InvoiceBodyData j      = obj[i];
                        bool            plabel = new InvoiceControllers().PrintFTicket(j.RefInv, j.PartNo, j.OrderNo, j.StartFticket, j.StartFticket.ToString());
                        if (plabel)
                        {
                            i++;
                        }
                    }
                    XtraMessageBox.Show("ปริ้นข้อมูลเสร็จแล้ว");
                }
                else
                {
                    XtraMessageBox.Show("กรุณาทำการยืนยัน Invoice ก่อน", "XPW Alert!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Example #14
0
        private void TreeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e)
        {
            if (e.Node == null)
            {
                return;
            }

            this.WriteRgTitle(e.Node.GetValue("RG001").ToString());

            if (e.Node.Level < 3)
            {
                pictureBox1.Visible  = true;
                gridControl1.Visible = false;
                return;
            }
            else
            {
                pictureBox1.Visible  = false;
                gridControl1.Visible = true;
                curRegionId          = e.Node.GetValue("RG001").ToString();
            }
            SplashScreenManager.ShowDefaultWaitForm("请等待", "处理中....");

            DrawGrid(e.Node);
            SplashScreenManager.CloseDefaultWaitForm();
        }
        private void btnProveedores_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (tabMdiManager.MdiParent == null)
            {
                tabMdiManager.MdiParent = this;
            }

            foreach (Form form in Application.OpenForms)
            {
                if (form.GetType() == typeof(frmProveedor))
                {
                    form.Activate();
                    return;
                }
            }

            SplashScreenManager.ShowDefaultWaitForm("Por favor espere", "Cargando Proveedores...");

            new frmProveedor()
            {
                MdiParent = this
            }.Show();

            SplashScreenManager.CloseDefaultWaitForm();
        }
Example #16
0
        private void sbGetSumByOrderType_Click(object sender, EventArgs e)
        {
            if (deStart.Text.Length == 0 || deEnd.Text.Length == 0)
            {
                MessageBox.Show("請先選取日期區間");
                return;
            }

            // 判斷start date 不能比end date晚
            DateTime dStart = DateTime.Parse(deStart.Text);
            DateTime dEnd   = DateTime.Parse(deEnd.Text);

            if (DateTime.Compare(dStart, dEnd) > 0)
            {
                MessageBox.Show("起始日不可大於結束日");
                return;
            }

            // 判斷區間不要超過一個月
            TimeSpan ts = dEnd - dStart;
            int      differenceInDays = ts.Days;

            if (differenceInDays > 180)
            {
                MessageBox.Show("日期區間請不要超過6個月");
                return;
            }

            // 判斷單別必需要有值
            if (cboOrderType.Text.Length == 0)
            {
                MessageBox.Show("請選取單別");
                return;
            }

            // 清除grid controll 資料
            gridControl1.DataSource = null;
            gridControl1.DataBindings.Clear();
            gridControl1.RefreshDataSource();
            gridView1.Columns.Clear();
            gridView1.RefreshData();

            // show wait process
            SplashScreenManager.ShowDefaultWaitForm();

            // 取得單別的統計資料
            DataTable dt = null;

            dt = MvDbDao.collectData_GetOrderTypeSummary(cboOrderType.Text, deStart.Text, deEnd.Text);

            if (dt == null)
            {
                MessageBox.Show("此單別尚未列入計算清單內, 或是該單別為已停用單別");
                return;
            }

            gridControl1.DataSource = dt;
            // close Wait Form
            SplashScreenManager.CloseForm(false);
        }
 private void btnInfoAccount_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (account.TypeOfAccount == "USER")
     {
         Form frm = this.KiemTraTonTai(typeof(frmTTCaNhan));
         if (frm != null)
         {
             frm.Activate();
         }
         else
         {
             SplashScreenManager.ShowDefaultWaitForm();
             frmTTCaNhan f = new frmTTCaNhan(account.IDAccount)
             {
                 MdiParent = this
             };
             f.Show();
             SplashScreenManager.CloseDefaultSplashScreen();
         }
     }
     else
     {
         XtraMessageBox.Show("Chưa có dữ liệu!", "Thông Báo!", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 static void ShowWaitForm(System.Windows.Forms.UserControl owner, string caption)
 {
     if (SplashScreenManager.Default == null)
     {
         SplashScreenManager.ShowDefaultWaitForm((owner != null) ? owner.FindForm() : null, false, false, caption);
     }
 }
Example #19
0
        private void xtraTabControl1_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e)
        {
            SplashScreenManager.ShowDefaultWaitForm("Đang tải", "Vui lòng chờ...");
            switch (((DevExpress.XtraTab.XtraTabControl)sender).SelectedTabPageIndex)
            {
            case 0:
            {
                select = "";
                break;
            }

            case 1:
            {
                xpQUATRINH.CriteriaString = "MAKHAISINH ='" + textEdit1.EditValue.ToString() + "'";
                select = "qt";
                break;
            }

            case 2:
            {
                xpQUANHE.CriteriaString = "MAKHAISINH ='" + textEdit1.EditValue.ToString() + "'";
                select = "qh";
                break;
            }

            case 3:
            {
                xpTIENAN.CriteriaString = "MAKHAISINH ='" + textEdit1.EditValue.ToString() + "'";
                select = "ta";
                break;
            }
            }
            SplashScreenManager.CloseDefaultWaitForm();
        }
Example #20
0
        /// <summary>
        /// 刷新数据
        /// </summary>
        private void RefreshData()
        {
            if (rgset.Rg01.GetChanges() != null || rgset.Bi01.GetChanges() != null || rgset.Ly01.GetChanges() != null)
            {
                DialogResult dr = MessageBox.Show("刷新会丢失未保存的更新,是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                if (dr == DialogResult.Cancel)
                {
                    return;
                }
            }
            SplashScreenManager.ShowDefaultWaitForm("请等待", "刷新数据....");
            treeList1.BeginUpdate();
            treeList1.ClearNodes();

            rgset.Rg01.Clear();
            rgset.Bi01.Clear();
            rgset.Ly01.Clear();

            rgset.rg01Adapter.Fill(rgset.Rg01);
            rgset.bi01Adapter.Fill(rgset.Bi01);
            rgset.ly01Adapter.Fill(rgset.Ly01);

            treeList1.ExpandToLevel(2);

            treeList1.EndUpdate();

            try
            {
                SplashScreenManager.CloseDefaultWaitForm();
            }
            catch { }
        }
Example #21
0
 private void bbiRebuildPallet_ItemClick(object sender, ItemClickEventArgs e)
 {
     //rebuild pallete
     SplashScreenManager.ShowDefaultWaitForm();
     ReBuildingPallet();
     SplashScreenManager.CloseDefaultWaitForm();
 }
Example #22
0
        private void sbGetMoc_Click(object sender, EventArgs e)
        {
            string mocNo = textEdit1.Text;

            if (textEdit1.Text.IndexOf("-") < 0)
            {
                MessageBox.Show("請輸入正確的製令單號" + Environment.NewLine + "Ex : A511-20180500001");
                return;
            }

            SplashScreenManager.ShowDefaultWaitForm();
            clearAllMocCacheDtAndTreeList();
            DataTable sourceDt = MvDbDao.collectData_Moc(mocNo);

            // copy to cacheDt
            if (cacheMocDt != null)
            {
                cacheMocDt.Clear();
            }
            cacheMocDt           = sourceDt.Copy();
            treeList4.DataSource = sourceDt;

            // 不開放編輯功能
            treeList4.OptionsBehavior.ReadOnly = true;
            treeList4.OptionsBehavior.Editable = false;

            xtraTabControl1.TabPages[3].Text = "製令_" + mocNo;
            xtraTabControl1.SelectedTabPage  = xtraTabControl1.TabPages[3];
            SplashScreenManager.CloseForm(false);
        }
Example #23
0
 private void bbiSearch_ItemClick(object sender, ItemClickEventArgs e)
 {
     try
     {
         SplashScreenManager.ShowDefaultWaitForm();
         if (bbiOrderId.EditValue != null)
         {
             if (bbiOrderId.EditValue.ToString() != "")
             {
                 List <OrderData> obj = new OrderControllers().GetOrderData(bbiOrderId.EditValue.ToString());
                 gridControl.DataSource  = obj;
                 bsiRecordsCount.Caption = "RECORDS : " + obj.Count;
             }
             else
             {
                 XtraMessageBox.Show("กรุณาระบุเลขที่ออร์เดอร์ที่ต้องการค้นหาด้วย");
             }
         }
         SplashScreenManager.CloseDefaultWaitForm();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message);
     }
 }
Example #24
0
        private void RefreshData()
        {
            if (b_update)
            {
                DialogResult dr = XtraMessageBox.Show("刷新会丢失未保存的更新,是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                if (dr == DialogResult.Cancel)
                {
                    return;
                }
            }
            SplashScreenManager.ShowDefaultWaitForm("请等待", "刷新数据....");
            treeList1.BeginUpdate();
            treeList1.ClearNodes();

            xpCollection_rg01.Load();
            xpCollection_ly01.Load();
            xpCollection_bi01.Load();

            treeList1.ExpandToLevel(2);
            treeList1.EndUpdate();

            try
            {
                SplashScreenManager.CloseDefaultWaitForm();
            }
            catch { }

            b_update = false;
        }
 static void ShowWaitForm(string caption)
 {
     if (SplashScreenManager.Default == null)
     {
         SplashScreenManager.ShowDefaultWaitForm(AppHelper.MainForm, false, false, false, 250, caption);
     }
 }
Example #26
0
 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");
     }
 }
Example #27
0
        private void Chitiet(object sender, EventArgs e)
        {
            SplashScreenManager.ShowDefaultWaitForm("Đang tải", "Vui lòng chờ...");
            frmDmNhanKhau fr = new frmDmNhanKhau(gridView1.GetFocusedRowCellValue("MAKHAISINH") != null ? Convert.ToString(gridView1.GetFocusedRowCellValue("MAKHAISINH")) : "");

            fr.ShowDialog();
            SplashScreenManager.CloseDefaultSplashScreen();
        }
Example #28
0
        //修改Header
        private void gridView1_RowUpdated(object sender, RowObjectEventArgs e)
        {
            SplashScreenManager.ShowDefaultWaitForm();
            RequestHeaderViewModel row = (RequestHeaderViewModel)this.gridView1.GetFocusedRow();

            _requestService.UpdateRequestHeader(row);
            SplashScreenManager.CloseDefaultWaitForm();
        }
Example #29
0
        private void alertControl1_ButtonClick(object sender, DevExpress.XtraBars.Alerter.AlertButtonClickEventArgs e)
        {
            SplashScreenManager.ShowDefaultWaitForm("Đang tải", "Vui lòng chờ...");
            frmLicense fr = new frmLicense();

            fr.ShowDialog();
            SplashScreenManager.CloseDefaultWaitForm();
        }
Example #30
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     SplashScreenManager.ShowDefaultWaitForm("Vui Lòng Chờ...", "Đang thực hiện thao tác...");
     btnUpdate.Enabled = false;
     UpdateData();
     btnUpdate.Enabled = true;
     SplashScreenManager.CloseDefaultWaitForm();
 }