Пример #1
0
        protected override void Export()
        {
            if (this.GridListSelectedCodes.Count == 0)
            {
                return;
            }

            DSErp _DS = new DSErp();

            this.IsBusy = true;
            var _ID = UReportID.ExcelFileName;
            var p   = _DS.GetV_Ware_Stocks_Base_LensForExportQuery(USysInfo.DBCode, USysInfo.LgIndex, _ID, this.GridListSelectedCodes);

            _DS.Load(p, geted =>
            {
                this.IsBusy = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }
                ComOpenURL.Open(_ID);
            }, null);
        }
Пример #2
0
        protected override void Export()
        {
            if (this._ExportModel == 2 && this._SelectedItemTree.Count == 0)
            {
                return;
            }
            //if (this._ExportModel == 2 && this._SelectedItemTree.Count > 30)
            //{
            //    MessageErp.ErrorMessage(ErpUIText.Get("Err_MoreThan30"));
            //    return;
            //}

            List <string> _ExportItems = new List <string>();
            string        _Str         = "";

            if (this._ExportModel == 2)
            {
                this._SelectedItemTree.ForEach(it =>
                {
                    _Str = it.WhCode + it.LensCode + it.F_LR;
                    _ExportItems.Add(_Str);
                });
            }
            else
            {
                _Str = "WhCode";
                _ExportItems.Add(_Str);

                _Str = this.WhCodeSelected;
                _ExportItems.Add(_Str);
            }

            DSErp _DS = new DSErp();

            this.IsBusy = true;
            var _ID = UReportID.ExcelFileName;
            var p   = _DS.GetV_Ware_Report_Stocks_Lens_XYListExportQuery(USysInfo.DBCode, USysInfo.LgIndex, _ID, _ExportItems);

            _DS.Load(p, geted =>
            {
                this.IsBusy = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }
                ComOpenURL.Open(_ID);
            }, null);
        }
Пример #3
0
        private void ExecuteCmdCopy()
        {
            var   _ID = this.WhCodeCopy + this.LensCodeCopy + this.F_LRCopy;
            DSErp _DS = new DSErp();
            var   p   = _DS.GetV_Ware_Stocks_Base_LensDetailForCopyListQuery(USysInfo.DBCode, _ID);

            this.IsBusy = true;
            _DS.Load(p, geted =>
            {
                this.IsBusy = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }

                if (geted.AllEntities.Count() == 0)
                {
                    MessageErp.InfoMessage(ErpUIText.Get("Err_RecordNone"));
                    return;
                }

                var _Items       = geted.AllEntities;
                this.DContextSub = new System.Collections.ObjectModel.ObservableCollection <System.ServiceModel.DomainServices.Client.Entity>();
                V_Ware_Stocks_Base_Lens_Detail _item = null;
                foreach (V_Ware_Stocks_Base_Lens_Detail item in _Items)
                {
                    _item = new V_Ware_Stocks_Base_Lens_Detail()
                    {
                        ID    = "",
                        SubID = item.SubID,
                        SPH   = item.SPH,
                        CYL   = item.CYL,
                        X_ADD = item.X_ADD,
                        Qty   = item.Qty,
                    };
                    this.DContextSub.Add(_item);
                }
                ComSubGridColumnUpdate _Rt = new ComSubGridColumnUpdate()
                {
                    GridName = this.VMNameAuthority,
                    Source   = DContextSub
                };

                Messenger.Default.Send <ComSubGridColumnUpdate>(_Rt, USysMessages.RefreshSubGrid);
                this.IsFocusMain = true;
            }, null);
        }
Пример #4
0
        protected override void Export()
        {
            DSErp _DS = new DSErp();

            this.IsBusy = true;
            //var _ID = UReportID.ExcelFileName;
            var _ID = this._DC.BCode + ".xls";
            var p   = _DS.GetV_Sale_Order_PDBillForExportQuery(USysInfo.DBCode, USysInfo.LgIndex, _ID, this.CurrentIDCode);

            _DS.Load(p, geted =>
            {
                this.IsBusy = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }
                ComOpenURL.Open(_ID);
            }, null);
        }
Пример #5
0
        protected override void Export()
        {
            List <string> _ExportItems = new List <string>();

            _ExportItems.Add(this.CurrentIDCode);
            DSErp _DS = new DSErp();

            this.IsBusy = true;
            var _ID = UReportID.ExcelFileName;
            var p   = _DS.GetV_Ware_Stocks_Base_LensForExportQuery(USysInfo.DBCode, USysInfo.LgIndex, _ID, _ExportItems);

            _DS.Load(p, geted =>
            {
                this.IsBusy = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }
                ComOpenURL.Open(_ID);
            }, null);
        }