예제 #1
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();
        }
예제 #2
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. :)");
 }
 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();
     }
 }
예제 #4
0
        internal void InitData(OrderData obj)
        {
            List <OrderBody> ob = new OrderControllers().GetReportJobList(obj);
            int ctn             = 0;
            int xqty            = 0;

            ob.ForEach(i => {
                ctn  += i.Ctn;
                xqty += i.BalQty;
            });
            if (ob.Count > 0)
            {
                var r = ob[0];
                prAffCode.Value    = r.Affcode;
                prQrCode.Value     = r.RefNo;
                prRefNo.Value      = r.RefNo;
                prInvoice.Value    = r.RefInv;
                prZone.Value       = r.Zone;
                prCountry.Value    = r.Custname;
                prEtd.Value        = r.Etd;
                prShipType.Value   = r.Ship;
                prFactory.Value    = r.Factory;
                prGroupOrder.Value = r.PoType;
                prPrintDate.Value  = DateTime.Now;
                prCustCode.Value   = r.Custcode;
                prBalQty.Value     = xqty;
                prTotal.Value      = ctn;
            }

            objectDataSource1.DataSource = ob;
            SplashScreenManager.CloseDefaultWaitForm();
        }
예제 #5
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();
        }
예제 #6
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);
     }
 }
예제 #7
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();
        }
예제 #8
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);
            }
        }
예제 #9
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 { }
        }
예제 #10
0
파일: TombData.cs 프로젝트: anrk0451/Olive
        /// <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();
        }
예제 #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();
        }
예제 #12
0
 private void bbiRebuildPallet_ItemClick(object sender, ItemClickEventArgs e)
 {
     //rebuild pallete
     SplashScreenManager.ShowDefaultWaitForm();
     ReBuildingPallet();
     SplashScreenManager.CloseDefaultWaitForm();
 }
예제 #13
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();
            }
        }
예제 #14
0
파일: RegisterStru.cs 프로젝트: radtek/Lime
        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;
        }
        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();
        }
예제 #16
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("ไม่พบข้อมูลที่ต้องการค้นหา");
            }
        }
예제 #17
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();
            }
        }
예제 #18
0
 public static void CloseWaitingForm()
 {
     if (SplashScreenManager.Default != null)
     {
         SplashScreenManager.CloseDefaultWaitForm();
     }
 }
예제 #19
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();
        }
예제 #20
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");
     }
 }
예제 #21
0
        //修改Header
        private void gridView1_RowUpdated(object sender, RowObjectEventArgs e)
        {
            SplashScreenManager.ShowDefaultWaitForm();
            RequestHeaderViewModel row = (RequestHeaderViewModel)this.gridView1.GetFocusedRow();

            _requestService.UpdateRequestHeader(row);
            SplashScreenManager.CloseDefaultWaitForm();
        }
예제 #22
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();
        }
예제 #23
0
        //---------------License---------------------------
        private void barButtonItem9_ItemClick(object sender, ItemClickEventArgs e)
        {
            SplashScreenManager.ShowDefaultWaitForm("Đang tải", "Vui lòng chờ...");
            frmLicense fr = new frmLicense();

            fr.ShowDialog();
            SplashScreenManager.CloseDefaultWaitForm();
        }
예제 #24
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();
 }
예제 #25
0
        public static void DoBatchWork(this Form form, Action expression, string title, string workMessage = "İşlem Devam Ediyor...")
        {
            SplashScreenManager.ShowDefaultWaitForm(form, true, true, title, workMessage);

            expression.Invoke();

            SplashScreenManager.CloseDefaultWaitForm();
        }
예제 #26
0
        void ReloadData()
        {
            SplashScreenManager.ShowDefaultWaitForm();
            chorderdate        = false;
            this.Text          = StaticFunctionData.JobListTilte;
            groupControl2.Text = StaticFunctionData.JobListInformation;


            bbiPlConfirm.Caption    = StaticFunctionData.JoblistConfirmInv;
            bbiPrintJobList.Caption = StaticFunctionData.JoblistPrintJobList;
            bbiShippingList.Caption = StaticFunctionData.JoblistShippingList;
            bbiShipingPart.Caption  = StaticFunctionData.JoblistShippingListByPart;
            bbiShippingAll.Caption  = StaticFunctionData.JoblistShippingListByAll;
            bbiPalletList.Caption   = StaticFunctionData.JoblistPalletList;
            bbiSplitPart.Caption    = StaticFunctionData.JoblistSplitPart;
            bbiSetMultiLot.Caption  = StaticFunctionData.JoblistSetMultiLot;
            bbiPartShort.Caption    = StaticFunctionData.JoblistPartShort;
            bbiEditOrder.Caption    = StaticFunctionData.JoblistEditOrder;
            bbiReviseOrder.Caption  = StaticFunctionData.JoblistOrderHold;
            bbiCancelOrder.Caption  = StaticFunctionData.JoblistOrderCancel;
            bbiAddShorting.Caption  = StaticFunctionData.JoblistPartShort;
            bbiConfirmShort.Caption = StaticFunctionData.JoblistOrderShorting;

            bbiFactory.EditValue        = ob.Factory;
            bbiShip.EditValue           = ob.Ship;
            bbiZone.EditValue           = ob.Zname;
            bbiOrderBy.EditValue        = ob.Ord;
            bbiInv.EditValue            = ob.Invoice;
            bbiRefInv.EditValue         = ob.RefInv;
            bbiAff.EditValue            = ob.Affcode;
            bbiCustCode.EditValue       = ob.Bishpc;
            bbiCustName.EditValue       = ob.Custname;
            bbiEtd.EditValue            = ob.Etddte;
            txtNote1.EditValue          = ob.Note1;
            txtNote2.EditValue          = ob.Note2;
            bbiNote3.EditValue          = ob.Note3;
            txtZoneCode.EditValue       = ob.ZCode;
            bbiConTypeCaption.EditValue = ob.ContainerType;
            bbiEtd.Enabled            = StaticFunctionData.enable_etd;
            bbiShip.Enabled           = StaticFunctionData.enable_ship;
            txtNote1.Enabled          = StaticFunctionData.enable_note1;
            txtNote2.Enabled          = StaticFunctionData.enable_note2;
            bbiNote3.Enabled          = StaticFunctionData.enable_note3;
            bbiConTypeCaption.Enabled = StaticFunctionData.enable_container;
            bbiNewOrder.Enabled       = false;
            bbiConfirmShort.Enabled   = false;
            bbiSplitInvoice.Caption   = "";
            List <InvoiceBodyData> obj = new InvoiceControllers().GetInvoiceBody(ob);

            gridControl.DataSource  = obj;
            bsiRecordsCount.Caption = "RECORDS : " + obj.Count;
            SplashScreenManager.CloseDefaultWaitForm();
            if (shlist.Count > 0)
            {
                bbiConfirmShort.Enabled = true;
            }
        }
예제 #27
0
        private void gridView1_RowUpdated(object sender, RowObjectEventArgs e)
        {
            SplashScreenManager.ShowDefaultWaitForm();
            PoNumberViewModel row = (PoNumberViewModel)this.gridView1.GetFocusedRow();

            _managemntService.UpdatePo(row);
            SplashScreenManager.CloseDefaultWaitForm();
            RefreshData();
        }
예제 #28
0
        private void detailView1_RowUpdated(object sender, RowObjectEventArgs e)
        {
            SplashScreenManager.ShowDefaultWaitForm();
            var detailView        = sender as GridView;
            ContractViewModel row = (ContractViewModel)detailView.GetFocusedRow();

            _managemntService.UpdateContract(row);
            SplashScreenManager.CloseDefaultWaitForm();
        }
예제 #29
0
 private void frmNVenta_Load(object sender, EventArgs e)
 {
     clienteBindingSource.DataSource      = clienteOperations.GetAll();
     productoBindingSource.DataSource     = productoOperations.GetAll();
     ventaDetalleBindingSource.DataSource = ventasDetalle;
     Misc.totalPago = 0;
     Misc.pago      = 0;
     SplashScreenManager.CloseDefaultWaitForm();
 }
예제 #30
0
        DateTime SaveShorting()
        {
            DateTime ndte = DateTime.Now;

            //bool c = false;
            //DialogResult r = XtraMessageBox.Show("คุณต้องการที่จะสร้าง Invoice ใหม่เลยหรืไม่?", "ข้อความแจ้งเตือน", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            //if (r == DialogResult.Yes)
            //{
            //    c = true;
            //}
            //else
            //{
            //    c = false;
            //}
            SplashScreenManager.ShowDefaultWaitForm();
            try
            {
                int           i   = 0;
                List <string> ord = new List <string>();
                while (i < shlist.Count)
                {
                    var ob = shlist[i];
                    //update issbody
                    string refinv  = ob.RefInv;
                    string orderno = ob.OrderNo;
                    string partno  = ob.PartNo;
                    int    shctn   = ob.ShCtn;
                    ord.Add(orderno);
                    ndte = new InvoiceControllers().GetNextInvoiceDate(refinv);
                    //update body
                    int tctn = ob.BalCtn - ob.ShCtn;
                    while (tctn < ob.BalCtn)
                    {
                        tctn++;
                        string updetail = $"UPDATE TXP_ISSPACKDETAIL d SET d.ISSUINGSTATUS=1,d.UPDDTE=SYSDATE WHERE d.ISSUINGKEY = '{refinv}' AND d.PONO = '{orderno}' AND d.PARTNO = '{partno}' AND d.ITEM = '{tctn}'";
                        new ConnDB().ExcuteSQL(updetail);
                    }
                    //string upbody = $"UPDATE TXP_ISSTRANSBODY b SET b.ORDERQTY={(ob.BalCtn - ob.ShCtn)}*b.STDPACK,b.SHORDERQTY={shctn}*b.STDPACK,b.UPDDTE = sysdate WHERE b.ISSUINGKEY = '{refinv}' AND b.PONO = '{orderno}' AND b.PARTNO = '{partno}'";
                    string upbody  = $"UPDATE TXP_ISSTRANSBODY b SET b.SHORDERQTY={shctn}*b.STDPACK,b.UPDDTE = sysdate WHERE b.ISSUINGKEY = '{refinv}' AND b.PONO = '{orderno}' AND b.PARTNO = '{partno}'";
                    string uporder = $"UPDATE TXP_ORDERPLAN p SET etdtap=to_date('{ndte.ToString("ddMMyyyy")}', 'ddMMyyyy'),p.CURINV='',p.BALQTY={shctn}*p.BISTDP,p.ORDERSTATUS=3,p.UPDDTE=SYSDATE WHERE p.CURINV = '{refinv}' AND p.ORDERID = '{orderno}' AND p.PARTNO = '{partno}'";
                    new ConnDB().ExcuteSQL(upbody);
                    new ConnDB().ExcuteSQL(uporder);
                    i++;
                }
                //if (c)
                //{

                //}
                shlist.Clear();
            }
            catch (Exception)
            {
            }
            SplashScreenManager.CloseDefaultWaitForm();
            return(ndte);
        }