Example #1
0
        public override void Loading()
        {
            ClearRows();

            if (gridView == null)
            {
                return;
            }

            WaitingService.BeginLoading();

            gridView.BeginUpdate();

            dataTable = LoadingData();

            gridView.GridControl.DataSource = dataTable;

            if (dataTable.Rows.Count > 0)
            {
                gridView.IndicatorWidth = 25 + (dataTable.Rows.Count.ToString().Length + 1) * 5;
            }

            gridView.EndUpdate();

            WaitingService.EndLoading();
        }
Example #2
0
        public void LoadCashRcvdRecord(string rcvdID)
        {
            ClearRows();

            if (gridView == null)
            {
                return;
            }

            WaitingService.BeginLoading();

            gridView.BeginUpdate();

            dataTable = LoadingRcvtRecordEx(rcvdID);

            gridView.GridControl.DataSource = dataTable;

            if (dataTable.Rows.Count > 0)
            {
                gridView.IndicatorWidth = 25 + (dataTable.Rows.Count.ToString().Length + 1) * 5;
            }

            gridView.EndUpdate();

            WaitingService.EndLoading();
        }
Example #3
0
        public override void Loading()
        {
            if (gridView == null)
            {
                return;
            }

            WaitingService.BeginLoading();

            gridView.BeginUpdate();
            gridView.BeginDataUpdate();

            string sql = String.Format("Select ShelfNo, RowNo, LevelNo, ColNo  From T_Shelf ");

            if (String.IsNullOrEmpty(KeyWords) == false)
            {
                sql += String.Format("where shelfNo like '%{0}%' ", KeyWords);
            }
            sql += " order by ShelfNo ";
            DataTable dt = Database.Select(sql);

            //dt.Columns.Add("Check", System.Type.GetType("System.Boolean"));
            gridView.GridControl.DataSource = dt;

            gridView.EndDataUpdate();
            if (dt.Rows.Count > 0)
            {
                gridView.IndicatorWidth = 25 + (dt.Rows.Count.ToString().Length + 1) * 5;
            }

            gridView.EndUpdate();

            WaitingService.EndLoading();
        }
Example #4
0
        public void Loading(int limit)
        {
            if (gridView == null)
            {
                return;
            }
            WaitingService.BeginLoading();
            if (dataTable != null)
            {
                dataTable.Rows.Clear();
            }
            LoadOutbound(limit);

            AddDataRows(dataTable);

            gridView.BeginUpdate();
            gridView.BeginDataUpdate();

            gridView.GridControl.DataSource = dataTable;

            gridView.EndDataUpdate();

            if (dataTable.Rows.Count > 0)
            {
                gridView.IndicatorWidth = 25 + (dataTable.Rows.Count.ToString().Length + 1) * 5;
            }

            gridView.EndUpdate();

            WaitingService.EndLoading();
        }
Example #5
0
        //保存倒库信息
        private bool SaveTranbond()
        {
            WaitingService.BeginLoading("正在保存数据,请稍等...");
            bool bres = SaveTranboundMasterTable();

            if (bres == false)
            {
                WaitingService.EndLoading();
                return(false);
            }

            tranboundEditView.SaveDetail();

            WaitingService.EndLoading();

            return(true);
        }
Example #6
0
        public override void Loading()
        {
            if (dataTable == null)
            {
                return;
            }
            if (gridView == null)
            {
                return;
            }

            WaitingService.BeginLoading();
            dataTable.Rows.Clear();

            if (LoadData != null)
            {
                LoadData();
            }

            string sql = String.Format("Select PONo, ClothesID, StyleNo, ShellNo, LotNo, Model, Color, Shell, Price, StyleRemark From T_Clothes  ");

            if (String.IsNullOrEmpty(KeyWords) == false)
            {
                sql += GetSqlWhere(KeyWords);
            }
            sql += " order by PONo,StyleNo, ShellNo, LotNo ";

            gridView.BeginUpdate();
            gridView.BeginDataUpdate();

            DataTable dt = Database.Select(sql);

            gridView.GridControl.DataSource = dt;

            gridView.EndDataUpdate();

            if (dt.Rows.Count > 0)
            {
                gridView.IndicatorWidth = 25 + (dt.Rows.Count.ToString().Length + 1) * 5;
            }

            gridView.EndUpdate();

            WaitingService.EndLoading();
        }
Example #7
0
        //下一步
        private void btnNext_Click(object sender, EventArgs e)
        {
            if (CurrentBackboundStatus == Status_Record)
            {
                return;
            }
            if (CanNext() == false)
            {
                return;
            }

            if (CurrentBackboundStatus == Status_Property)
            {
                InitUI_Detail();
                CurrentBackboundStatus = Status_Detail;
                return;
            }

            if (CurrentBackboundStatus == Status_Detail)
            {
                WaitingService.BeginLoading("正在分解入库明细,请稍等......");
                Cursor.Current = Cursors.WaitCursor;

                //保存明细
                SaveBackbound();

                MissionAssign missionAssign = new MissionAssign();

                //分解
                missionAssign.BackboundAssign(txtBackboundNo.Text);

                //加载明细
                returnRecordView.LoadRecord(txtBackboundNo.Text);

                InitUI_Record();

                CurrentBackboundStatus = Status_Record;

                Cursor.Current = Cursors.Default;

                WaitingService.EndLoading();
                return;
            }
        }
Example #8
0
        public override void Loading()
        {
            if (dataTable == null)
            {
                return;
            }
            if (gridView == null)
            {
                return;
            }

            WaitingService.BeginLoading();
            dataTable.Rows.Clear();

            if (LoadData != null)
            {
                LoadData();
            }

            string sql = String.Format("Select ID,Sales, CustomerNo, Company, Address, Tel, Fax, Email, ShipTo , ShippingWay,Term,freight  From T_Customer ");

            if (String.IsNullOrEmpty(KeyWords) == false)
            {
                sql += GetSqlWhere(KeyWords);
            }
            sql += " order by CustomerNo ";

            gridView.BeginUpdate();
            gridView.BeginDataUpdate();

            dataTable = Database.Select(sql);
            gridView.GridControl.DataSource = dataTable;

            gridView.EndDataUpdate();

            if (dataTable.Rows.Count > 0)
            {
                gridView.IndicatorWidth = 25 + (dataTable.Rows.Count.ToString().Length + 1) * 5;
            }

            gridView.EndUpdate();

            WaitingService.EndLoading();
        }
Example #9
0
        public override void Loading()
        {
            if (dataTable == null)
            {
                return;
            }
            if (gridView == null)
            {
                return;
            }

            WaitingService.BeginLoading();
            dataTable.Rows.Clear();

            if (LoadData != null)
            {
                LoadData();
            }

            string sql = String.Format("Select UserCode, UserName, UserPsw, UserRight From T_User  ");

            if (String.IsNullOrEmpty(KeyWords) == false)
            {
                sql += GetSqlWhere(KeyWords);
            }
            sql += " order by UserName ";

            gridView.BeginUpdate();
            gridView.BeginDataUpdate();

            DataTable dt  = Database.Select(sql);
            Object    obj = null;

            gridView.GridControl.DataSource = dt;
            int cnt = dt.Rows.Count;
            int no  = 0;

            for (int i = 0; i < cnt; i++)
            {
                no  = 0;
                obj = dt.Rows[i]["UserPsw"];
                if (string.IsNullOrEmpty(obj.ToString()) == false)
                {
                    dt.Rows[i]["UserPsw"] = encrypt.DecryptString(obj.ToString());
                }

                obj = dt.Rows[i]["UserRight"];
                if (string.IsNullOrEmpty(obj.ToString()) == false)
                {
                    int.TryParse(obj.ToString(), out no);
                    dt.Rows[i]["UserRight"] = User.GetUserKindName(no);
                }
            }
            gridView.EndDataUpdate();

            if (dt.Rows.Count > 0)
            {
                gridView.IndicatorWidth = 25 + (dt.Rows.Count.ToString().Length + 1) * 5;
            }

            gridView.EndUpdate();

            WaitingService.EndLoading();
        }
Example #10
0
        //下一步
        private void btnNext_Click(object sender, EventArgs e)
        {
            if (CurrentInboundStatus == Status_Record)
            {
                return;
            }
            if (CanNext() == false)
            {
                return;
            }

            if (CurrentInboundStatus == Status_Property)
            {
                InitUI_Detail(cbVirtual.Checked);
                CurrentInboundStatus = Status_Detail;
                AppEditStatus.InboundCurrentStatus = CurrentInboundStatus;
                return;
            }

            if (CurrentInboundStatus == Status_Detail)
            {
                //真实入库 或者 虚拟转真实
                if (cbVirtual.Checked == false || bVirtualToActual == true)
                {
                    FrmSetShelfSize dlg = new FrmSetShelfSize();
                    if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        MemoryTable.Instance.ShelfCapacity = dlg.ShelfCapacity;
                    }
                }

                WaitingService.BeginLoading("正在分解入库明细,请稍等......");
                //Cursor.Current = Cursors.WaitCursor;

                //保存明细
                SaveInbound();

                //2017-05-29客户要求随时更改入库明细并,保存新的虚拟入库。
                //首先删除原来的虚拟入库
                DeleteVirtualInvenotry(txtInboundNo.Text);

                MissionAssign missionAssign = new MissionAssign();

                //重新虚拟入库
                missionAssign.VirtualInboundAssign(txtInboundNo.Text);

                //真实入库、虚拟转真实都要分解
                //分解
                missionAssign.InboundAssign(txtInboundNo.Text);

                UpdateOperator(txtInboundNo.Text, txtDealWorker.Text);
                //加载明细
                inboundRecordView.LoadInboundRecord(txtInboundNo.Text);

                InitUI_Record();

                if (bVirtualToActual == true)
                {
                    inboundView.SetFocusedRowCellValue("Status", DealStatus.Inbound);
                }

                CurrentInboundStatus = Status_Record;
                //Cursor.Current = Cursors.Default;
                AppEditStatus.InboundCurrentStatus = CurrentInboundStatus;

                WaitingService.EndLoading();

                return;
            }
        }