Пример #1
0
        /// <summary>
        /// Refreshes the active template that is within pnl_activePage. This is called when the
        /// application is made full screen and normal size. This is for the column chart located
        /// on each template.
        /// </summary>
        public void RefreshTemplate()
        {
            if (activeSectionBtn.Tag != null)
            {
                int tag = int.Parse(activeSectionBtn.Tag.ToString());


                switch (tag)
                {
                case 1:
                    KPAPlanTemplate kpaPlan = (KPAPlanTemplate)activeTemplate;
                    kpaPlan.RefreshTemplate();
                    break;

                case 2:
                    KPAPurchTemplate kpaPurch = (KPAPurchTemplate)activeTemplate;
                    kpaPurch.RefreshTemplate();
                    break;

                case 3:
                    KPAPurchSubTemplate kpaPurchSub = (KPAPurchSubTemplate)activeTemplate;
                    kpaPurchSub.RefreshTemplate();
                    break;

                case 4:
                    KPAPurchTotalTemplate kpaPurchTotal = (KPAPurchTotalTemplate)activeTemplate;
                    kpaPurchTotal.RefreshTemplate();
                    break;

                case 6:
                    KPAFollowUpTemplate kpaFollowUp = (KPAFollowUpTemplate)activeTemplate;
                    kpaFollowUp.RefreshTemplate();
                    break;

                case 9:
                    KPAHotJobsTemplate kpaHotJobs = (KPAHotJobsTemplate)activeTemplate;
                    kpaHotJobs.RefreshTemplate();
                    break;

                case 12:
                    KPACurrentPlanActualTemplate kpaCurrPlanActual = (KPACurrentPlanActualTemplate)activeTemplate;
                    kpaCurrPlanActual.RefreshTemplate();
                    break;

                case 15:
                    KPIPlanTemplate kpiPlan = (KPIPlanTemplate)activeTemplate;
                    kpiPlan.RefreshTemplate();
                    break;

                case 16:
                    KPIPurchTemplate kpiPurch = (KPIPurchTemplate)activeTemplate;
                    kpiPurch.RefreshTemplate();
                    break;

                case 17:
                    KPIFollowUpTemplate kpiFollowUp = (KPIFollowUpTemplate)activeTemplate;
                    kpiFollowUp.RefreshTemplate();
                    break;

                case 19:
                    KPIPurchTwoTemplate kpiPurchTwo = (KPIPurchTwoTemplate)activeTemplate;
                    kpiPurchTwo.RefreshTemplate();
                    break;

                case 20:
                    KPIPurchSubTemplate kpiPurchSub = (KPIPurchSubTemplate)activeTemplate;
                    kpiPurchSub.RefreshTemplate();
                    break;

                case 21:
                    KPIPurchTotalTemplate kpiPurchTotal = (KPIPurchTotalTemplate)activeTemplate;
                    kpiPurchTotal.RefreshTemplate();
                    break;

                case 22:
                    KPIPurchPlanTemplate kpiPurchPlan = (KPIPurchPlanTemplate)activeTemplate;
                    kpiPurchPlan.RefreshTemplate();
                    break;

                case 24:
                    KPIOtherTemplate kpiOther = (KPIOtherTemplate)activeTemplate;
                    kpiOther.RefreshTemplate();
                    break;

                default:
                    break;
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Refreshes the active template that is within pnl_activePage. This is called when the
        /// application is made full screen and normal size. This is for the column chart located
        /// on each template.
        /// </summary>
        public void RefreshTemplate()
        {
            if (navigationController.MainTag == Navigation.MainNavigationTag.KPA)
            {
                switch (navigationController.SectionTag)
                {
                case Navigation.SectionNavigationTag.Plan:
                    KPAPlanTemplate kpaPlan = (KPAPlanTemplate)activeTemplate;
                    kpaPlan.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.Purch:
                    KPAPurchTemplate kpaPurch = (KPAPurchTemplate)activeTemplate;
                    kpaPurch.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.PurchSub:
                    KPAPurchSubTemplate kpaPurchSub = (KPAPurchSubTemplate)activeTemplate;
                    kpaPurchSub.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.PurchTotal:
                    KPAPurchTotalTemplate kpaPurchTotal = (KPAPurchTotalTemplate)activeTemplate;
                    kpaPurchTotal.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.FollowUp:
                    KPAFollowUpTemplate kpaFollowUp = (KPAFollowUpTemplate)activeTemplate;
                    kpaFollowUp.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.HotJobs:
                    KPAHotJobsTemplate kpaHotJobs = (KPAHotJobsTemplate)activeTemplate;
                    kpaHotJobs.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.ExcessStockStock:
                    KPAExcessStockStock kapExcessStockStock = (KPAExcessStockStock)activeTemplate;
                    kapExcessStockStock.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.ExcessStockOpenOrders:
                    KPAExcessStockOpenOrders kpaExcessStockOpenOrders = (KPAExcessStockOpenOrders)activeTemplate;
                    kpaExcessStockOpenOrders.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.CurrentPlanVsActual:
                    KPACurrentPlanActualTemplate kpaCurrPlanActual = (KPACurrentPlanActualTemplate)activeTemplate;
                    kpaCurrPlanActual.RefreshTemplate();
                    break;

                default:
                    break;
                }
            }
            else // The has  KPI currently loaded
            {
                switch (navigationController.SectionTag)
                {
                case Navigation.SectionNavigationTag.Plan:
                    KPIPlanTemplate kpiPlan = (KPIPlanTemplate)activeTemplate;
                    kpiPlan.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.Purch:
                    KPIPurchTemplate kpiPurch = (KPIPurchTemplate)activeTemplate;
                    kpiPurch.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.FollowUp:
                    KPIFollowUpTemplate kpiFollowUp = (KPIFollowUpTemplate)activeTemplate;
                    kpiFollowUp.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.PlanII:
                    KPIPlanTwoTemplate kpiPlanTwo = (KPIPlanTwoTemplate)activeTemplate;
                    kpiPlanTwo.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.PurchII:
                    KPIPurchTwoTemplate kpiPurchTwo = (KPIPurchTwoTemplate)activeTemplate;
                    kpiPurchTwo.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.FollowUpTwo:
                    KPIFollowUpTwoTemplate kpiFollowUpTwo = (KPIFollowUpTwoTemplate)activeTemplate;
                    kpiFollowUpTwo.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.PurchSub:
                    KPIPurchSubTemplate kpiPurchSub = (KPIPurchSubTemplate)activeTemplate;
                    kpiPurchSub.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.PurchTotal:
                    KPIPurchTotalTemplate kpiPurchTotal = (KPIPurchTotalTemplate)activeTemplate;
                    kpiPurchTotal.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.PurchPlan:
                    KPIPurchPlanTemplate kpiPurchPlan = (KPIPurchPlanTemplate)activeTemplate;
                    kpiPurchPlan.RefreshTemplate();
                    break;

                case Navigation.SectionNavigationTag.Other:
                    KPIOtherTemplate kpiOther = (KPIOtherTemplate)activeTemplate;
                    kpiOther.RefreshTemplate();
                    break;

                default:
                    break;
                }
            }
        }