Пример #1
0
 private void PrepareReOrder()
 {
     ComCopyProperties.Copy(this._DC, USysTemp.V_Sale_Order_SD);
     this._DC.FBCode = this._DC.BCode;
     this._DC.ID     = "";
     this._DC.BCode  = "";
     this._DC.BDate  = DateTime.Now;
     this._DC.CsDate = DateTime.Now.AddDays(2);
 }
Пример #2
0
        protected override void PrepareModelToSave()
        {
            var _Model = this.CurrentModel as MPur_Quote;

            _Model.Sub_SD         = new MPur_Quote_SD();
            _Model.Sub_SD_Process = new MPur_Quote_SD_Process();
            ComCopyProperties.Copy(_Model, _DC);
            ComCopyProperties.Copy(_Model.Sub_SD, _DC);
            ComCopyProperties.Copy(_Model.Sub_SD_Process, _DC);
        }
Пример #3
0
        private void InitChild(V_B_Department item, System.Collections.IEnumerable items)
        {
            V_B_Department it;

            it = new V_B_Department();
            ComCopyProperties.Copy(it, item);
            it.F_Explan = true;
            it.Children = GetChild(items, ((V_B_Department)item).DpCode);
            this.SourceTree.Add(it);
        }
Пример #4
0
        protected override void PrepareModelToSave()
        {
            var _DC = this.DContextMain as V_Sale_Order_SD;
            var _CM = this.CurrentModel as MSale_Order;

            if (null == _DC || null == _CM)
            {
                MessageErp.ErrorMessage(ErpUIText.ErrMsg); return;
            }
            base.PrepareModelToSave();
            //
            _CM.Ex_SD = new List <MSale_Order_SD>();
            MSale_Order_SD ex_sd = null;

            for (int i = 0; i <= 1; i++)
            {
                ex_sd = new MSale_Order_SD()
                {
                    ID          = _CM.ID,
                    Axis        = i == 0 ? _DC.AxisR.Value : _DC.AxisL.Value,
                    CT          = i == 0 ? _DC.CTR.Trim() : _DC.CTL.Trim(),
                    CYL         = i == 0 ? _DC.CYLR.Value : _DC.CYLL.Value,
                    Qty         = i == 0 ? _DC.QtyR.Value : _DC.QtyL.Value,
                    SPH         = i == 0 ? _DC.SPHR.Value : _DC.SPHL.Value,
                    DB          = i == 0 ? _DC.DBR : _DC.DBL,
                    D1          = i == 0 ? _DC.D1R.Trim() : _DC.D1L.Trim(),
                    D2          = i == 0 ? _DC.D2R.Trim() : _DC.D2L.Trim(),
                    D3          = i == 0 ? _DC.D3R.Trim() : _DC.D3L.Trim(),
                    D4          = i == 0 ? _DC.D4R.Trim() : _DC.D4L.Trim(),
                    Dia         = i == 0 ? _DC.DiaR.Value : _DC.DiaL.Value,
                    BASE        = i == 0 ? _DC.BASER.Trim() : _DC.BASEL.Trim(),
                    LensCode    = i == 0 ? _DC.LensCodeR.Trim() : _DC.LensCodeL.Trim(),
                    LensCodeR   = i == 0 ? _DC.LensCodeRR.Trim() : _DC.LensCodeRL.Trim(),
                    P1          = i == 0 ? _DC.P1R.Trim() : _DC.P1L.Trim(),
                    P2          = i == 0 ? _DC.P2R.Trim() : _DC.P2L.Trim(),
                    P3          = i == 0 ? _DC.P3R.Trim() : _DC.P3L.Trim(),
                    P4          = i == 0 ? _DC.P4R.Trim() : _DC.P4L.Trim(),
                    X_ADD       = i == 0 ? _DC.X_ADDR.Value : _DC.X_ADDL.Value,
                    Price       = 0,
                    F_LR        = i == 0 ? false : true,
                    IvoLensName = "",
                    QtyCs       = 0,
                    QtyRt       = 0
                };
                _CM.Ex_SD.Add(ex_sd);
            }

            _CM.Ex_SD_Sub = new MSale_Order_SD_Sub();
            ComCopyProperties.Copy(_CM.Ex_SD_Sub, this.DContextMain);
        }
Пример #5
0
        private void ddsTreeView_LoadedData(object sender, LoadedDataEventArgs geted)
        {
            this.IsBusy = false;

            if (geted.HasError)
            {
                MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                geted.MarkErrorAsHandled();
                return;
            }

            var items = geted.Entities;

            this.SourceTree.Clear();
            V_S_Function it;

            items.ToList().ForEach(item =>
            {
                if (!string.IsNullOrEmpty(((V_S_Function)item).FunParentID))
                {
                    return;
                }
                it = new V_S_Function();
                ComCopyProperties.Copy(it, item);
                it.I_Explan = true;
                it.Children = GetChild(items, ((V_S_Function)item).FunID);
                this.SourceTree.Add(it);
            });
            ////////////////////////////////////////////
            var ddsInfo = new ComDDsInfo()
            {
                Domaincontext = ComDSFactory.Man, QueryName = UDSMethods.V_S_FunctionAuthorityList, PageSize = 0
            };

            ddsInfo.Parameters.Add(new ComParameters()
            {
                ParameterName = "groupID", Value = this._gID
            });
            var dds = ComDDSFactory.Get(ddsInfo, null, ddsAuthorityTree_LoadedData);

            this.IsBusy = true;
            dds.Load();
        }
Пример #6
0
        protected override void PrepareModelToSave()
        {
            var _CM = this.CurrentModel as MSale_Order;

            if (null == _DC || null == _CM)
            {
                MessageErp.ErrorMessage(ErpUIText.ErrMsg); return;
            }
            base.PrepareModelToSave();
            //
            _CM.MType = "L";
            _CM.F_FS  = false;
            _CM.F_SD  = true;
            //
            _CM.Sub_SD = new List <MSale_Order_SD>();
            MSale_Order_SD sub_SD = null;

            for (int i = 0; i <= 1; i++)
            {
                sub_SD = new MSale_Order_SD()
                {
                    ID            = _CM.ID,
                    Axis          = i == 0 ? _DC.AxisR.Value : _DC.AxisL.Value,
                    CT            = i == 0 ? _DC.CTR.Trim() : _DC.CTL.Trim(),
                    CYL           = i == 0 ? _DC.CYLR.Value : _DC.CYLL.Value,
                    Qty           = i == 0 ? _DC.QtyR.Value : _DC.QtyL.Value,
                    SPH           = i == 0 ? _DC.SPHR.Value : _DC.SPHL.Value,
                    DB            = i == 0 ? _DC.DBR : _DC.DBL,
                    D1            = i == 0 ? _DC.D1R.Trim() : _DC.D1L.Trim(),
                    D2            = i == 0 ? _DC.D2R.Trim() : _DC.D2L.Trim(),
                    D3            = i == 0 ? _DC.D3R.Trim() : _DC.D3L.Trim(),
                    D4            = i == 0 ? _DC.D4R.Trim() : _DC.D4L.Trim(),
                    Dia           = i == 0 ? _DC.DiaR.Value : _DC.DiaL.Value,
                    BASE          = i == 0 ? _DC.BASER.Trim() : _DC.BASEL.Trim(),
                    LensCode      = i == 0 ? _DC.LensCodeR.Trim() : _DC.LensCodeL.Trim(),
                    LensCodeR     = i == 0 ? _DC.LensCodeRR.Trim() : _DC.LensCodeRL.Trim(),
                    P1            = i == 0 ? _DC.P1R.Trim() : _DC.P1L.Trim(),
                    P2            = i == 0 ? _DC.P2R.Trim() : _DC.P2L.Trim(),
                    P3            = i == 0 ? _DC.P3R.Trim() : _DC.P3L.Trim(),
                    P4            = i == 0 ? _DC.P4R.Trim() : _DC.P4L.Trim(),
                    X_ADD         = i == 0 ? _DC.X_ADDR.Value : _DC.X_ADDL.Value,
                    Price         = 0,
                    ProCost       = 0,
                    ProCostReport = "",
                    ProReport     = "",
                    F_LR          = i == 0 ? "R" : "L",
                    InvTitle      = "",
                    QtySO         = 0,
                    QtyCs         = 0,
                    QtyRt         = 0,
                    QtyPur        = 0,
                    QtyRec        = 0
                };
                _CM.Sub_SD.Add(sub_SD);
            }

            _CM.Sub_SD_Process = new MSale_Order_SD_Process();
            ComCopyProperties.Copy(_CM.Sub_SD_Process, this.DContextMain);

            _CM.Sub_Extend = new MSale_Order_Extend()
            {
                ID         = _CM.ID,
                LensCodeR  = _DC.LensCodeR,
                LensCodeRR = _DC.LensCodeRR,
                LensCodeRL = _DC.LensCodeRL,
                LensCodeL  = _DC.LensCodeL,
                SPHR       = _DC.SPHR.Value,
                SPHL       = _DC.SPHL.Value,
                CYLR       = _DC.CYLR.Value,
                CYLL       = _DC.CYLL.Value,
                X_ADDR     = _DC.X_ADDR.Value,
                X_ADDL     = _DC.X_ADDL.Value,
                DN         = "",
                SumQty     = _DC.QtyR.Value + _DC.QtyL.Value,
                SumQtySO   = 0,
                SumQtyCs   = 0,
                SumQtyRt   = 0,
                SumQtyPur  = 0,
                SumQtyRec  = 0,
                Rt1        = "",
                Rt2        = "",
                Rt3        = "",
                Rt4        = "",
                Rt5        = "",
                PdCode     = "",
                PdName     = "",
                SumMoney   = 0
            };
        }
Пример #7
0
        protected virtual void PrepareModelToSave()
        {
            var _Model = this.CurrentModel;

            ComCopyProperties.Copy(_Model, this.DContextMain);
        }
Пример #8
0
        protected override void PrepareModelToSave()
        {
            var _DC = this.DContextMain as V_Sale_Bill_Mnumber_SD;
            var _CM = this.CurrentModel as MSale_Bill;

            if (null == _DC || null == _CM)
            {
                MessageErp.ErrorMessage(ErpUIText.ErrMsg); return;
            }
            base.PrepareModelToSave();
            //
            _CM.SubMnumber_SD = new List <MSale_Bill_Mnumber_SD>();

            MSale_Bill_Mnumber_SD msd = new MSale_Bill_Mnumber_SD()
            {
                BillCode         = _CM.BillCode,
                Axis             = _DC.AxisR.Trim(),
                Center_Thickness = _DC.Center_ThicknessR.Trim(),
                CYL                  = _DC.CYLR.Value,
                Quantity             = _DC.QuantityR.Value,
                SPH                  = _DC.SPHR.Value,
                DaoBian              = _DC.DaoBianR.Value,
                Decenter1            = _DC.Decenter1R.Trim(),
                Decenter2            = _DC.Decenter2R.Trim(),
                Decenter3            = _DC.Decenter3R.Trim(),
                Decenter4            = _DC.Decenter4R.Trim(),
                Diameter             = _DC.DiameterR.Value,
                LR_Flag              = "R",
                MianWan              = _DC.MianWanR.Trim(),
                Mnumber              = _DC.MnumberR.Trim(),
                Mnumber_Replace      = _DC.Mnumber_ReplaceR.Trim(),
                Prism1               = _DC.Prism1R.Trim(),
                Prism2               = _DC.Prism2R.Trim(),
                Prism3               = _DC.Prism3R.Trim(),
                Prism4               = _DC.Prism4R.Trim(),
                X_ADD                = _DC.X_ADDR.Value,
                ContractType         = "",
                ContractType_Process = "",
                Price                = 0,
                ProCost              = 0,
                ProCostReport        = "",
                ProReport            = "",
                Quantity_Consign     = 0,
                Quantity_Return      = 0
            };

            _CM.SubMnumber_SD.Add(msd);

            msd = new MSale_Bill_Mnumber_SD()
            {
                BillCode         = _CM.BillCode,
                Axis             = _DC.AxisL.Trim(),
                Center_Thickness = _DC.Center_ThicknessL.Trim(),
                CYL                  = _DC.CYLL.Value,
                Quantity             = _DC.QuantityL.Value,
                SPH                  = _DC.SPHL.Value,
                DaoBian              = _DC.DaoBianL.Value,
                Decenter1            = _DC.Decenter1L.Trim(),
                Decenter2            = _DC.Decenter2L.Trim(),
                Decenter3            = _DC.Decenter3L.Trim(),
                Decenter4            = _DC.Decenter4L.Trim(),
                Diameter             = _DC.DiameterL.Value,
                LR_Flag              = "L",
                MianWan              = _DC.MianWanL.Trim(),
                Mnumber              = _DC.MnumberL.Trim(),
                Mnumber_Replace      = _DC.Mnumber_ReplaceL.Trim(),
                Prism1               = _DC.Prism1L.Trim(),
                Prism2               = _DC.Prism2L.Trim(),
                Prism3               = _DC.Prism3L.Trim(),
                Prism4               = _DC.Prism4L.Trim(),
                X_ADD                = _DC.X_ADDL.Value,
                ContractType         = "",
                ContractType_Process = "",
                Price                = 0,
                ProCost              = 0,
                ProCostReport        = "",
                ProReport            = "",
                Quantity_Consign     = 0,
                Quantity_Return      = 0
            };

            _CM.SubMnumber_SD.Add(msd);

            _CM.SubMnumber_SD_Process = new MSale_Bill_Mnumber_SD_Process();
            ComCopyProperties.Copy(_CM.SubMnumber_SD_Process, this.DContextMain);

            _CM.SubFlag = new MSale_Bill_Flag();
            ComCopyProperties.Copy(_CM.SubFlag, this.DContextMain);
        }
Пример #9
0
 protected virtual void OnLoadMainEndRetSetDContextMain(Entity item)
 {
     this.PrepareDContextMain();
     ComCopyProperties.Copy(this.DContextMain, item);
 }