protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);

            var cDC = this.DContextMain as V_Sale_Bill_Mnumber_SD;

            Messenger.Default.Send <bool>((false), USysMessages.ACBoxProcess_CF_IsShow);
            Messenger.Default.Send <bool>((false), USysMessages.ACBoxProcess_KF_IsShow);

            switch (uBillState)
            {
            case UBillState.View:

                if (string.IsNullOrEmpty(cDC.SupplierCode))
                {
                    this.IsEnableExport = false;
                }

                break;

            case UBillState.Drop:
                break;

            case UBillState.New:
            case UBillState.Edit:

                if (!string.IsNullOrEmpty(cDC.CusCode))
                {
                    ComHelpV_Base_Mnumber.LoadCusMnumberSmart(cDC.CusCode);
                }

                this.ResetProcessCodes();
                break;
            }
        }
Exemple #2
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);

            this.IsShowCopy     = System.Windows.Visibility.Collapsed;
            this.IsEnableExport = false;
            switch (uBillState)
            {
            case UBillState.View:
                this.IsEnableExport = true;

                break;

            case UBillState.New:
                this.IsShowCopy = System.Windows.Visibility.Visible;

                break;

            case UBillState.Edit:


                break;

            case UBillState.Drop:

                break;

            default: break;
            }
        }
Exemple #3
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);

            this.IsShowUploadImage = Visibility.Collapsed;
            switch (uBillState)
            {
            case UBillState.View:
                this.IsShowUploadImage = Visibility.Visible;
                break;

            case UBillState.Drop:

                break;

            case UBillState.New:

                break;

            case UBillState.Edit:

                //if (string.IsNullOrEmpty(_DC.Checker))
                //{
                //    this.FixEditACBug();
                //}

                break;
            }
        }
Exemple #4
0
        ////////////////////////////////////////////////////////////////////////////
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);
            this.IsEnableLensType        = false;
            this.IsEnableEditLensPrice   = false;
            this.IsEnableEditLensProCost = false;
            switch (uBillState)
            {
            case UBillState.View:
                this.IsEnableEditLensPrice   = true;
                this.IsEnableEditLensProCost = true;
                break;

            case UBillState.Edit:
                this.IsEnableLensType = true;
                break;

            case UBillState.Drop:
                break;

            case UBillState.New:
                this.IsEnableLensType = true;
                break;
            }
        }
Exemple #5
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);
            this.IsReadOnlyMain = false;
            this.IsReadOnlyEdit = false;

            this.ResetACIsVisibility(true);
            this.ResetHBIsVisibility(true);

            switch (uBillState)
            {
            case UBillState.View:

                break;

            case UBillState.Drop:

                break;

            case UBillState.New:

                //UResetProcess.Set(true);
                this.IsFocusReturn = true;
                break;

            case UBillState.Edit:

                break;
            }
        }
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);

            var cDC = this.DContextMain as V_Sale_Bill_Mnumber_PD;

            this.IsEnableXYInPut = false;

            switch (uBillState)
            {
            case UBillState.View:
            case UBillState.Drop:

                break;

            case UBillState.New:
            case UBillState.Edit:
                this.IsEnableXYInPut = true;
                if (!string.IsNullOrEmpty(cDC.CusCode))
                {
                    ComHelpV_Base_Mnumber.LoadCusMnumberSmart(cDC.CusCode);
                }
                break;
            }
        }
Exemple #7
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);


            switch (uBillState)
            {
            case UBillState.View:

                break;

            case UBillState.Drop:

                break;

            case UBillState.New:

                break;

            case UBillState.Edit:

                //if (string.IsNullOrEmpty(_DC.Checker))
                //{
                //    this.FixEditACBug();
                //}

                break;
            }
        }
Exemple #8
0
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);
            this.IsEnableXYInPut = false;
            switch (uBillState)
            {
            case UBillState.View:

                break;

            case UBillState.New:
                this.IsEnableXYInPut = true;

                break;

            case UBillState.Edit:
                try
                {
                    if (this.DContextMain.GetType().GetProperty("Checker").GetValue(this.DContextMain, null).ToString() == "")
                    {
                        this.IsEnableXYInPut = true;
                    }
                }
                catch { this.IsEnableXYInPut = true; }

                break;

            case UBillState.Drop:

                break;

            default: break;
            }
        }
Exemple #9
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);
            this.IsEnableUD = false;
            //var cDC = this.DContextMain as V_Sale_Order_FD;
            //this.IsEnableXYInPut = false;

            switch (uBillState)
            {
            case UBillState.View:

                break;

            case UBillState.Drop:

                break;

            case UBillState.New:
                this.IsEnableUD = true;
                break;

            case UBillState.Edit:
                this.IsEnableUD = true;
                break;
            }
        }
Exemple #10
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);

            var cDC = this.DContextMain as V_Sale_Order_SD;

            Messenger.Default.Send <bool>((false), USysMessages.ACBoxProcess_CF_IsShow);
            Messenger.Default.Send <bool>((false), USysMessages.ACBoxProcess_KF_IsShow);

            this.IsEnableBillType = false;
            this.IsEnableCX       = false;
            this.IsEnableUD       = false;
            //this.SetBillTypeIsCheckAll(false);

            switch (uBillState)
            {
            case UBillState.View:

                if (string.IsNullOrEmpty(cDC.SpCode))
                {
                    this.IsEnableExport = false;
                }


                break;

            case UBillState.Drop:
                break;

            case UBillState.New:

                if (this.IsCheckBillTypeXSSD == false && this.IsCheckBillTypeXSPD == false && this.IsCheckBillTypeXSFD == false && this.IsCheckBillTypeXSFS == false)
                {
                    this.IsCheckBillTypeXSSD = true;
                }

                this.ResetProcessCodes();
                this.IsEnableBillType = true;
                this.IsEnableCX       = true;
                this.IsEnableUD       = true;

                this.IsCheckCXNone = true;
                this.IsCheckUD1    = true;
                break;

            case UBillState.Edit:

                if (!string.IsNullOrEmpty(cDC.CusCode))
                {
                    //ComHelpV_Base_LensCode.LoadCusLensCodeSmart(cDC.CusCode);
                }

                this.ResetProcessCodes();
                this.IsEnableCX = true;
                this.IsEnableUD = true;
                break;
            }
        }
Exemple #11
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);

            this.ResetProcessCodes(false);

            this.IsEnableCX = false;
            this.IsEnableUD = false;
            this.IsEnableOG = false;

            switch (uBillState)
            {
            case UBillState.View:

                if (string.IsNullOrEmpty(_DC.SpCode))
                {
                    this.IsEnableExport = false;
                }

                break;

            case UBillState.Drop:
                break;

            case UBillState.New:

                this.ResetProcessCodes(true);

                this.IsEnableCX = true;
                this.IsEnableUD = true;
                this.IsEnableOG = true;

                this.IsCheckCXNone = true;
                this.IsCheckUD1    = true;
                this.IsCheckOG1    = true;
                break;

            case UBillState.Edit:

                if (string.IsNullOrEmpty(_DC.Checker))
                {
                    if (!string.IsNullOrEmpty(_DC.CusCode))
                    {
                        ComHelpLensCode.LoadCusLensCodeSmartSDR(_DC.CusCode);
                        ComHelpLensCode.LoadCusLensCodeSmartSDL(_DC.CusCode);
                    }
                    this.ResetProcessCodes(true);
                    this.IsEnableCX = true;
                    this.IsEnableUD = true;
                    this.IsEnableOG = true;
                }

                break;
            }
        }
Exemple #12
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);
            this.IsEnableUD     = false;
            this.IsEnableOG     = false;
            this.IsEnableRCNew  = false;
            this.IsEnableRCList = false;
            //var cDC = this.DContextMain as V_Sale_Order_PD;
            //this.IsEnableXYInPut = false;

            switch (uBillState)
            {
            case UBillState.View:
                if (_DC.OGType == 2)
                {
                    this.IsEnableRCNew  = true;
                    this.IsEnableRCList = true;
                }
                break;

            case UBillState.Drop:

                break;

            case UBillState.New:
                this.IsEnableUD = true;
                this.IsEnableOG = true;

                this.IsCheckUD1 = true;
                this.IsCheckOG1 = true;
                break;

            case UBillState.Edit:

                if (string.IsNullOrEmpty(_DC.Checker))
                {
                    if (!string.IsNullOrEmpty(_DC.CusCode))
                    {
                        ComHelpLensCode.LoadCusLensCodeSmartPD(_DC.CusCode);
                    }
                    this.IsEnableUD = true;
                    this.IsEnableOG = true;
                }

                break;
            }
        }
Exemple #13
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);
            IsEnableCheckIn    = false;
            IsEnableCheckOut   = false;
            IsEnableUnCheckIn  = false;
            IsEnableUnCheckOut = false;
            switch (uBillState)
            {
            case UBillState.View:
                if (string.IsNullOrEmpty(_DC.CheckerIn) && string.IsNullOrEmpty(_DC.CheckerOut))
                {
                    this.IsEnableCheckOut = true;
                }
                if (string.IsNullOrEmpty(_DC.CheckerIn) && !string.IsNullOrEmpty(_DC.CheckerOut))
                {
                    this.IsEnableUnCheckOut = true;
                }
                if (string.IsNullOrEmpty(_DC.CheckerIn) && !string.IsNullOrEmpty(_DC.CheckerOut))
                {
                    this.IsEnableCheckIn = true;
                }
                if (!string.IsNullOrEmpty(_DC.CheckerIn))
                {
                    this.IsEnableUnCheckIn = true;
                }

                break;

            case UBillState.New:

                break;

            case UBillState.Edit:

                break;

            case UBillState.Drop:

                break;

            default: break;
            }
        }
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);

            this.IsEnablePrint = true;
            switch (uBillState)
            {
            case UBillState.View:
                break;

            case UBillState.Drop:
                break;

            case UBillState.New:
                break;

            case UBillState.Edit:
                break;
            }
        }
Exemple #15
0
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);

            this.IsEnablePDChoose = false;
            this.IsEnablePDStart  = false;
            this.IsEnablePDEnd    = false;

            switch (uBillState)
            {
            case UBillState.View:
                if (string.IsNullOrEmpty(this._DC.Starter))
                {
                    this.IsEnablePDStart = true;
                    this.IsEnableDelete  = true;
                }
                if (!string.IsNullOrEmpty(this._DC.Starter) && string.IsNullOrEmpty(this._DC.Ender))
                {
                    this.IsEnablePDEnd = true;
                }
                break;

            case UBillState.New:
                this.IsEnablePDChoose = true;

                break;

            case UBillState.Edit:
                this.IsEnablePDChoose = true;
                break;

            case UBillState.Drop:

                break;

            default: break;
            }
        }
Exemple #16
0
        ////////////////////////////////////////////////////////////////////////////
        protected override void ChangeBillSate(UBillState uBillState)
        {
            base.ChangeBillSate(uBillState);
            this.IsEnableLensType = false;
            this.IsShowUpload     = Visibility.Collapsed;
            switch (uBillState)
            {
            case UBillState.View:
                this.IsShowUpload = Visibility.Visible;
                break;

            case UBillState.Edit:
                this.IsEnableLensType = true;
                break;

            case UBillState.Drop:
                break;

            case UBillState.New:
                this.IsEnableLensType  = true;
                this.IsCheckLensTypeST = true;
                break;
            }
        }
Exemple #17
0
        protected virtual void ChangeBillSate(UBillState uBillState)
        {
            this.EditMode = false;
            ////////////////////////////////////////////////////////////
            this.IsReadOnlyID   = true;
            this.IsReadOnlyMain = true;
            this.IsReadOnlyEdit = true;
            //////////////////////////////////////////////////////////
            this.IsEnableCheck          = false;
            this.IsEnableDelete         = false;
            this.IsEnableDrop           = false;
            this.IsEnableEdit           = false;
            this.IsEnableExport         = false;
            this.IsEnableNew            = false;
            this.IsEnableNext           = false;
            this.IsEnablePrevious       = false;
            this.IsEnablePrint          = false;
            this.IsEnablePrintToFactory = false;
            this.IsEnableSave           = false;
            this.IsEnableUnCheck        = false;
            this.IsEnableUnLock         = false;
            this.IsEnableReOrder        = false;
            this.IsEnableCheck          = false;
            this.IsEnableUnCheck        = false;
            this.IsEnableLocate         = false;
            //////////////////////////////////////////////////////////////
            this.ResetTBIsVisibility(false);
            this.ResetACIsVisibility(false);
            this.ResetDPIsVisibility(false);
            this.ResetHBIsVisibility(false);

            switch (uBillState)
            {
            case UBillState.View:
                this.IsEnableNew      = true;
                this.IsEnableNext     = true;
                this.IsEnablePrevious = true;
                this.IsEnableEdit     = true;
                this.IsEnableLocate   = true;
                try
                {
                    if (this.DContextMain.GetType().GetProperty("Checker").GetValue(this.DContextMain, null).ToString() == "")
                    {
                        this.IsEnableCheck  = true;
                        this.IsEnableDelete = true;
                    }
                    else
                    {
                        this.IsEnableUnCheck        = true;
                        this.IsEnableExport         = true;
                        this.IsEnablePrint          = true;
                        this.IsEnablePrintToFactory = true;
                        this.IsEnableReOrder        = true;
                    }
                }
                catch
                {
                    this.IsEnableCheck  = true;
                    this.IsEnableDelete = true;
                    this.IsEnableEdit   = true;
                }
                this.IsFocusMain = true;
                this.ResetTBIsVisibility(true);
                break;

            case UBillState.Drop:
                this.IsEnableNew    = true;
                this.IsEnableLocate = true;
                this.IsFocusMain    = true;
                this.ResetTBIsVisibility(true);
                break;

            case UBillState.New:
                this.IsEnableSave = true;
                this.IsEnableDrop = true;
                ////////////////////////////
                this.IsReadOnlyMain = false;
                this.IsReadOnlyEdit = false;
                /////////////////////////////
                this.ResetDPIsVisibility(true);
                this.ResetACIsVisibility(true);
                this.ResetHBIsVisibility(true);

                try
                {
                    this.DContextMain.GetType().GetProperty("EditState").SetValue(this.DContextMain, 1, null);
                }
                catch { }

                break;


            case UBillState.Edit:
                this.FixEditACBug();

                this.IsEnableSave = true;
                this.IsEnableDrop = true;

                this.EditMode = true;
                //Messenger.Default.Send<string>((""), USysMessages.ACBoxTextUpdate);

                var _Checker = "";
                try { _Checker = this.DContextMain.GetType().GetProperty("Checker").GetValue(this.DContextMain, null).ToString(); }
                catch { }

                if (string.IsNullOrEmpty(_Checker))
                {
                    this.IsReadOnlyMain = false;
                    this.IsReadOnlyEdit = false;
                    //////////
                    this.ResetACIsVisibility(true);
                    this.ResetHBIsVisibility(true);
                    this.ResetDPIsVisibility(true);
                }
                else
                {
                    this.IsReadOnlyEdit = false;
                    //////////////////
                    this.ResetTBIsVisibility(true);
                }
                ////////////////////////////////////////////////////////////////////////////
                try
                {
                    this.DContextMain.GetType().GetProperty("EditState").SetValue(this.DContextMain, 1, null);
                }
                catch { }

                break;
            }
        }