Beispiel #1
0
        private void CopyPrice()
        {
            DSB_Lens _DS = new DSB_Lens();

            this.IsBusy = true;
            _DS.CopyProCost(USysInfo.DBCode, USysInfo.LgIndex, this.LensCodeCopy, this.SKeyCode, geted =>
            {
                this.IsBusy = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }
                this.Search();
            }, null);
        }
Beispiel #2
0
        private void EditPrice()
        {
            DSB_Lens _DS = new DSB_Lens();

            this.IsBusy = true;
            _DS.EditProCost(USysInfo.DBCode, USysInfo.LgIndex, this.GridListSelectedCodes, P1, P2, geted =>
            {
                this.IsBusy = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }
                this.Search();
            }, null);
        }
Beispiel #3
0
        private void AddPrice()
        {
            if (this.ViewErrList != null && this.ViewErrList.Value.Count > 0)
            {
                return;
            }
            var s1    = this.SPH1;
            var s2    = this.SPH2;
            var c1    = this.CYL1;
            var c2    = this.CYL2;
            var a1    = this.ADD1;
            var a2    = this.ADD2;
            var dia   = this.Dia;
            var p1    = this.P1;
            var p2    = this.P2;
            var model = new MB_Lens();

            model.Sub_Price = new MB_Lens_Price()
            {
                ADD1     = a1,
                ADD2     = a2,
                CYL1     = c1,
                CYL2     = c2,
                Dia      = dia,
                ID       = "",
                LensCode = this.SKeyCode,
                P1       = p1,
                P2       = p2,
                SPH1     = s1,
                SPH2     = s2
            };
            DSB_Lens _DS = new DSB_Lens();

            this.IsBusy = true;
            _DS.AddPrice(USysInfo.DBCode, USysInfo.LgIndex, model, geted =>
            {
                this.IsBusy = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }
                this.Search();
            }, null);
        }
Beispiel #4
0
        private void AddPrice()
        {
            if (this.ViewErrList != null && this.ViewErrList.Value.Count > 0)
            {
                return;
            }
            var model = new MB_Lens();

            model.Sub_ProCost = new MB_Lens_ProCost()
            {
                CB       = this.CB,
                ChB      = this.ChB,
                CS       = this.CS,
                F_Set    = this.F_Set,
                InvTitle = this.InvTitle,
                JJ       = this.JJ,
                JS       = this.JS,
                JY       = this.JY,
                KK       = this.KK,
                OP       = this.OP,
                PG       = this.PG,
                PiH      = this.PiH,
                RS       = this.RS,
                SY       = this.SY,
                UV       = this.UV,
                ZK       = this.ZK,
                ID       = "",
                LensCode = this.SKeyCode,
                P1       = this.P1,
                P2       = this.P2
            };
            DSB_Lens _DS = new DSB_Lens();

            this.IsBusy = true;
            _DS.AddProCost(USysInfo.DBCode, USysInfo.LgIndex, model, geted =>
            {
                this.IsBusy = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }
                this.Search();
            }, null);
        }
Beispiel #5
0
        private void DeletePrice()
        {
            DSB_Lens _DS = new DSB_Lens();

            this.IsBusyLens_Price = true;
            _DS.DeletePrice(USysInfo.DBCode, USysInfo.LgIndex, this.GridListSelectedCodesPrice, geted =>
            {
                this.IsBusyLens_Price = false;
                if (geted.HasError)
                {
                    MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg());
                    geted.MarkErrorAsHandled();
                    return;
                }
                this.LoadLensPrice();
            }, null);
        }