Beispiel #1
0
        // ページ切り替え
        public void ChangePage()
        {
            this.GirdMenu.Visibility    = Visibility.Collapsed;
            this.GirdMain.Visibility    = Visibility.Collapsed;
            this.GirdStartUp.Visibility = Visibility.Collapsed;

            // ヘッダー部
            this.txtLoginInf.Visibility = Visibility.Visible;
            this.lblLogOff.Visibility   = Visibility.Visible;
            this.lblEnd.Visibility      = Visibility.Visible;

            for (int i = 0; i <= this.GirdStartUp.Children.Count - 1; i++)
            {
                this.GirdStartUp.Children.RemoveAt(0);
            }

            switch (Common.gPageGroupType)
            {
            case Common.gePageGroupType.StartUp:
                // ヘッダー部非表示
                this.txtLoginInf.Visibility = Visibility.Collapsed;
                this.lblLogOff.Visibility   = Visibility.Collapsed;
                this.lblEnd.Visibility      = Visibility.Collapsed;

                this.GirdStartUp.Visibility = Visibility.Visible;
                for (int i = 0; i <= this.GirdStartUp.Children.Count - 1; i++)
                {
                    this.GirdStartUp.Children.RemoveAt(0);
                }
                switch (Common.gPageType)
                {
                case Common.gePageType.Install:
                    // test
                    //this.GirdStartUp.Children.Add(new Utl_Login());
                    this.GirdStartUp.Children.Add(new Utl_Install());
                    this.listDisplayTabIndex = ExVisualTreeHelper.GetDisplayTabIndex(this.GirdStartUp);         // Tab Index 保持
                    break;

                case Common.gePageType.Login:
                    this.GirdStartUp.Children.Add(new Utl_Login());
                    this.listDisplayTabIndex = ExVisualTreeHelper.GetDisplayTabIndex(this.GirdStartUp);         // Tab Index 保持
                    break;

                default:
                    break;
                }
                break;

            case Common.gePageGroupType.Menu:
                // ヘッダー情報設定
                SetHeaderInf();

                // Page UnLoad時の証跡を保存
                DataPgEvidence.SaveLoadOrUnLoadEvidence(beforePageGroupType, beforePageType, DataPgEvidence.geOperationType.End);

                this.GirdMenu.Visibility        = Visibility.Visible;
                this.GirdMenu.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                this.utlMenu.VerticalAlignment  = System.Windows.VerticalAlignment.Top;
                this.utlMenu.DisplayChange();
                this.listDisplayTabIndex = ExVisualTreeHelper.GetDisplayTabIndex(this.GirdMenu);     // Tab Index 保持
                break;

            case Common.gePageGroupType.Inp:
                this.GirdMain.Visibility = Visibility.Visible;

                for (int i = 0; i <= this.utlInpMain.InpDetail.Children.Count - 1; i++)
                {
                    this.utlInpMain.InpDetail.Children.RemoveAt(0);
                }

                switch (Common.gPageType)
                {
                    #region 売上入力系

                case Common.gePageType.InpSales:
                    Utl_InpSales utlSales = new Utl_InpSales();
                    utlSales.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlSales);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                case Common.gePageType.InpOrder:
                    Utl_InpOrder utlOrder = new Utl_InpOrder();
                    utlOrder.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlOrder);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                case Common.gePageType.InpEstimate:
                    Utl_InpEstimate utlEstimate = new Utl_InpEstimate();
                    utlEstimate.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlEstimate);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                case Common.gePageType.InpInvoiceClose:
                    Utl_InpInvoiceClose utlInvoiceClose = new Utl_InpInvoiceClose();
                    utlInvoiceClose.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlInvoiceClose);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                case Common.gePageType.InpReceipt:
                    Utl_InpReceipt utlReceipt = new Utl_InpReceipt();
                    utlReceipt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlReceipt);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                    #endregion

                    #region 仕入入力系

                case Common.gePageType.InpPurchaseOrder:
                    Utl_InpPurchaseOrder utlPurchaseOrder = new Utl_InpPurchaseOrder();
                    utlPurchaseOrder.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlPurchaseOrder);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                case Common.gePageType.InpPurchase:
                    Utl_InpPurchase utlPurchase = new Utl_InpPurchase();
                    utlPurchase.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlPurchase);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                case Common.gePageType.InpPaymentClose:
                    Utl_InpPaymentClose utlPaymentClose = new Utl_InpPaymentClose();
                    utlPaymentClose.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlPaymentClose);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                case Common.gePageType.InpPaymentCash:
                    Utl_InpPaymentCash utlPaymentCash = new Utl_InpPaymentCash();
                    utlPaymentCash.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlPaymentCash);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                    #endregion

                    #region 入出庫入力系

                case Common.gePageType.InpInOutDelivery:
                    Utl_InpInOutDelivery utlInOutDelivery = new Utl_InpInOutDelivery();
                    utlInOutDelivery.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlInOutDelivery);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                case Common.gePageType.InpStockInventory:
                    Utl_InpStockInventory utlStockInventory = new Utl_InpStockInventory();
                    utlStockInventory.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlInpMain.InpDetail.Children.Add(utlStockInventory);
                    this.utlInpMain.UserCtlFKey.Init();
                    break;

                    #endregion

                default:
                    break;
                }
                this.listDisplayTabIndex = ExVisualTreeHelper.GetDisplayTabIndex(this.GirdMain);     // Tab Index 保持
                break;

            default:
                break;
            }
            GC.Collect();

            // 前回ページ情報を保持する
            beforePageGroupType = Common.gPageGroupType;
            beforePageType      = Common.gPageType;

            // Page Load時の証跡を保存
            DataPgEvidence.SaveLoadOrUnLoadEvidence(Common.gPageGroupType, Common.gPageType, DataPgEvidence.geOperationType.Start);
        }
        // ページ切り替え
        public void ChangePage()
        {
            this.GirdMenu.Visibility = Visibility.Collapsed;
            this.GirdMain.Visibility = Visibility.Collapsed;
            this.GirdStartUp.Visibility = Visibility.Collapsed;

            // ヘッダー部
            this.txtLoginInf.Visibility = Visibility.Visible;
            this.lblLogOff.Visibility = Visibility.Visible;
            this.lblEnd.Visibility = Visibility.Visible;

            for (int i = 0; i <= this.GirdStartUp.Children.Count - 1; i++)
            {
                this.GirdStartUp.Children.RemoveAt(0);
            }

            switch (Common.gPageGroupType)
            { 
                case Common.gePageGroupType.StartUp:
                    // ヘッダー部非表示
                    this.txtLoginInf.Visibility = Visibility.Collapsed;
                    this.lblLogOff.Visibility = Visibility.Collapsed;
                    this.lblEnd.Visibility = Visibility.Collapsed;

                    this.GirdStartUp.Visibility = Visibility.Visible;
                    for (int i = 0; i <= this.GirdStartUp.Children.Count - 1; i++)
                    {
                        this.GirdStartUp.Children.RemoveAt(0);
                    }
                    switch (Common.gPageType)
                    {
                        case Common.gePageType.Install:
                            // test
                            //this.GirdStartUp.Children.Add(new Utl_Login());
                            this.GirdStartUp.Children.Add(new Utl_Install());
                            this.listDisplayTabIndex = ExVisualTreeHelper.GetDisplayTabIndex(this.GirdStartUp); // Tab Index 保持
                            break;
                        case Common.gePageType.Login:
                            this.GirdStartUp.Children.Add(new Utl_Login());
                            this.listDisplayTabIndex = ExVisualTreeHelper.GetDisplayTabIndex(this.GirdStartUp); // Tab Index 保持
                            break;
                        default:
                            break;
                    }
                    break;
                case Common.gePageGroupType.Menu:
                    // ヘッダー情報設定
                    SetHeaderInf();

                    // Page UnLoad時の証跡を保存
                    DataPgEvidence.SaveLoadOrUnLoadEvidence(beforePageGroupType, beforePageType, DataPgEvidence.geOperationType.End);

                    this.GirdMenu.Visibility = Visibility.Visible;
                    this.GirdMenu.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlMenu.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                    this.utlMenu.DisplayChange();
                    this.listDisplayTabIndex = ExVisualTreeHelper.GetDisplayTabIndex(this.GirdMenu); // Tab Index 保持
                    break;
                case Common.gePageGroupType.Inp:
                    this.GirdMain.Visibility = Visibility.Visible;

                    for (int i = 0; i <= this.utlInpMain.InpDetail.Children.Count - 1; i++)
                    {
                        this.utlInpMain.InpDetail.Children.RemoveAt(0);
                    }

                    switch (Common.gPageType)
                    {
                        #region 売上入力系

                        case Common.gePageType.InpSales:
                            Utl_InpSales utlSales = new Utl_InpSales();
                            utlSales.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlSales);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;
                        case Common.gePageType.InpOrder:
                            Utl_InpOrder utlOrder = new Utl_InpOrder();
                            utlOrder.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlOrder);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;
                        case Common.gePageType.InpEstimate:
                            Utl_InpEstimate utlEstimate = new Utl_InpEstimate();
                            utlEstimate.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlEstimate);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;
                        case Common.gePageType.InpInvoiceClose:
                            Utl_InpInvoiceClose utlInvoiceClose = new Utl_InpInvoiceClose();
                            utlInvoiceClose.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlInvoiceClose);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;
                        case Common.gePageType.InpReceipt:
                            Utl_InpReceipt utlReceipt = new Utl_InpReceipt();
                            utlReceipt.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlReceipt);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;

                        #endregion

                        #region 仕入入力系

                        case Common.gePageType.InpPurchaseOrder:
                            Utl_InpPurchaseOrder utlPurchaseOrder = new Utl_InpPurchaseOrder();
                            utlPurchaseOrder.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlPurchaseOrder);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;
                        case Common.gePageType.InpPurchase:
                            Utl_InpPurchase utlPurchase = new Utl_InpPurchase();
                            utlPurchase.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlPurchase);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;
                        case Common.gePageType.InpPaymentClose:
                            Utl_InpPaymentClose utlPaymentClose = new Utl_InpPaymentClose();
                            utlPaymentClose.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlPaymentClose);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;
                        case Common.gePageType.InpPaymentCash:
                            Utl_InpPaymentCash utlPaymentCash = new Utl_InpPaymentCash();
                            utlPaymentCash.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlPaymentCash);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;

                        #endregion

                        #region 入出庫入力系

                        case Common.gePageType.InpInOutDelivery:
                            Utl_InpInOutDelivery utlInOutDelivery = new Utl_InpInOutDelivery();
                            utlInOutDelivery.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlInOutDelivery);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;

                        case Common.gePageType.InpStockInventory:
                            Utl_InpStockInventory utlStockInventory = new Utl_InpStockInventory();
                            utlStockInventory.VerticalAlignment = System.Windows.VerticalAlignment.Top;
                            this.utlInpMain.InpDetail.Children.Add(utlStockInventory);
                            this.utlInpMain.UserCtlFKey.Init();
                            break;

                        #endregion

                        default:
                            break;
                    }
                    this.listDisplayTabIndex = ExVisualTreeHelper.GetDisplayTabIndex(this.GirdMain); // Tab Index 保持
                    break;
                default:
                    break;
            }
            GC.Collect();

            // 前回ページ情報を保持する
            beforePageGroupType = Common.gPageGroupType;
            beforePageType = Common.gPageType;

            // Page Load時の証跡を保存
            DataPgEvidence.SaveLoadOrUnLoadEvidence(Common.gPageGroupType, Common.gPageType, DataPgEvidence.geOperationType.Start);
        }