Exemplo n.º 1
0
        /// <summary>
        /// Default Constructor
        /// </summary>
        public CurrentPlanDateVsPRPlanDate()
        {
            // Create a new template object
            TemplateBlock = new TemplateThree();
            template      = TemplateBlock as TemplateThree;

            Section = "Plan";
            Name    = "Current Plan Date vs PR Plan Date";
        }
Exemplo n.º 2
0
        /// <summary>
        /// Default Constructor
        /// </summary>
        public ReceiptDateVsOriginalConfirmationDate()
        {
            // Create a new template object
            TemplateBlock = new TemplateThree();
            template      = TemplateBlock as TemplateThree;

            Section = "Follow Up";
            Name    = "Receipt Date vs Original Confirmation Date";
        }
        /// <summary>
        /// Default Constructor
        /// </summary>
        public FinalConfirmationDateVsFinalPlanDate()
        {
            // Create a new template object
            TemplateBlock = new TemplateThree();
            template      = TemplateBlock as TemplateThree;

            Section = "Follow Up";
            Name    = "Final Confirmation Date vs Final Plan Date";
        }
Exemplo n.º 4
0
        /// <summary>
        /// Default Constructor
        /// </summary>
        public CurrentConfirmationDateVsInitialConfirmationDate()
        {
            // Create a new template object
            TemplateBlock = new TemplateThree();
            template      = TemplateBlock as TemplateThree;

            Section = "Follow Up";
            Name    = "Current Confirmation Date vs Initial Confirmation Date";
        }
        /// <summary>
        /// Default Constructor
        /// </summary>
        public InitialConfirmationDateVsPRPlanDate()
        {
            // Create a new template object
            TemplateBlock = new TemplateThree();
            template      = TemplateBlock as TemplateThree;

            Section = "Purch";
            Name    = "Initial Confirmation Date vs PR Plan Date";
        }
        /// <summary>
        /// Default Constructor
        /// </summary>
        public OriginalPlanDateTo2ndLvlReleaseDateVsCodedLead()
        {
            // Create a new template object
            TemplateBlock = new TemplateThree();
            template      = TemplateBlock as TemplateThree;

            Section = "Plan";
            Name    = "(Original Plan Date - 2nd Lvl Release Date) vs Coded Lead-Time";
        }
        /// <summary>
        /// Default Constructor
        /// </summary>
        public ReceiptDateVsCurrentPlanDate()
        {
            // Create a new template object
            TemplateBlock = new TemplateThree();
            template      = TemplateBlock as TemplateThree;

            Section = "Follow Up";
            Name    = "Receipt Date vs Current Plan Date";
        }
        /// <summary>
        /// Renders the specific KPI category into the loaded template
        /// </summary>
        private void RenderOne()
        {
            Bunifu.DataViz.Canvas    canvas = new Bunifu.DataViz.Canvas();
            Bunifu.DataViz.DataPoint dp     = new Bunifu.DataViz.DataPoint(Bunifu.DataViz.BunifuDataViz._type.Bunifu_column);

            Title = Values.Categories.kpiCategories[(int)Values.Sections.KpiSection.Purch][(int)Values.Categories.KpiCategory.Purch.InitialConfirmationDatevsPRPlanDate];
            KPA_KPI_UI.topHandleBarModel.Category = Title;
            KPA_KPI_UI.topHandleBarModel.Section  = Values.Sections.kpiections[(int)Values.Sections.KpiSection.Purch];


            AnalysisOne = "- Will show if the PR is on a PO.";
            AnalysisTwo = "- Difference between first confirmed date and PR planned date.";


            TemplateThree tempThree = KpiOverallReport.Indicators[(int)KpiOption.Purch_InitialConfirmationDateVsPrPlanDate].TemplateBlock as TemplateThree;


            // Add the data to the column chart
            dp.addLabely(lbl_xLabelOne.Text, tempThree.LessThanEqualToNegTwentyTwoDays.ToString());
            dp.addLabely(lbl_xLabelTwo.Text, tempThree.NegTwentyOneToNegFifteenDays.ToString());
            dp.addLabely(lbl_xLabelThree.Text, tempThree.NegFourteenToNegEightDays.ToString());
            dp.addLabely(lbl_xLabelFour.Text, tempThree.NegSevenToNegOneDays.ToString());
            dp.addLabely(lbl_xLabelFive.Text, tempThree.ZeroDays.ToString());
            dp.addLabely(lbl_xLabelSix.Text, tempThree.OneToSevenDays.ToString());
            dp.addLabely(lbl_xLabelSeven.Text, tempThree.EightToFourteenDays.ToString());
            dp.addLabely(lbl_xLabelSeven.Text, tempThree.FifteenToTwentyOneDays.ToString());
            dp.addLabely(lbl_xLabelSeven.Text, tempThree.GreaterThanEqualToTwentyTwoDays.ToString());


            Average         = string.Format("{0:n}", tempThree.Average);
            TimeBucketOne   = string.Format("{0:n0}", tempThree.LessThanEqualToNegTwentyTwoDays);
            TimeBucketTwo   = string.Format("{0:n0}", tempThree.NegTwentyOneToNegFifteenDays);
            TimeBucketThree = string.Format("{0:n0}", tempThree.NegFourteenToNegEightDays);
            TimeBucketFour  = string.Format("{0:n0}", tempThree.NegSevenToNegOneDays);
            TimeBucketFive  = string.Format("{0:n0}", tempThree.ZeroDays);
            TimeBucketSix   = string.Format("{0:n0}", tempThree.OneToSevenDays);
            TimeBucketSeven = string.Format("{0:n0}", tempThree.EightToFourteenDays);
            TimeBucketEight = string.Format("{0:n0}", tempThree.FifteenToTwentyOneDays);
            TimeBucketNine  = string.Format("{0:n0}", tempThree.GreaterThanEqualToTwentyTwoDays);
            TotalOrders     = string.Format("{0:n0}", tempThree.TotalRecords);


            IUnconfirmed unconfirmedInfo = (KpiOverallReport.Indicators[(int)KpiOption.Purch_InitialConfirmationDateVsPrPlanDate] as IUnconfirmed);

            // Get the uncofnrimed information
            PercNoConf      = string.Format("{0:n}", unconfirmedInfo.PercentUnconfirmed);
            PercNoConfTotal = string.Format("{0:n0}", unconfirmedInfo.UnconfirmedTotal);

            canvas.addData(dp);
            dataviz.Render(canvas);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Renders the specific KPI category into the loaded template
        /// </summary>
        private void RenderThree()
        {
            Bunifu.DataViz.Canvas    canvas = new Bunifu.DataViz.Canvas();
            Bunifu.DataViz.DataPoint dp     = new Bunifu.DataViz.DataPoint(Bunifu.DataViz.BunifuDataViz._type.Bunifu_column);

            Title = Values.Categories.kpiCategories[(int)Values.Sections.KpiSection.Plan][(int)Values.Categories.KpiCategory.Plan.CurrentPlanDate2ndLvlReleaseDatevsCodedLeadTime];
            KPA_KPI_UI.topHandleBarModel.Category = Title;
            KPA_KPI_UI.topHandleBarModel.Section  = Values.Sections.kpiections[(int)Values.Sections.KpiSection.Plan];



            AnalysisOne = "- Will show if the PR is fully released.";
            AnalysisTwo = "- (current planned date - PR fully released date) - commodity coded leadtime.";

            TemplateThree tempThree = KpiOverallReport.Indicators[(int)KpiOption.Plan_CurrentPlanDateMinusPrFullReleaseDateVsCodedLead].TemplateBlock as TemplateThree;

            // Add the data to the column chart
            dp.addLabely(lbl_xLabelOne.Text, tempThree.LessThanEqualToNegTwentyTwoDays.ToString());
            dp.addLabely(lbl_xLabelTwo.Text, tempThree.NegTwentyOneToNegFifteenDays.ToString());
            dp.addLabely(lbl_xLabelThree.Text, tempThree.NegFourteenToNegEightDays.ToString());
            dp.addLabely(lbl_xLabelFour.Text, tempThree.NegSevenToNegOneDays.ToString());
            dp.addLabely(lbl_xLabelFive.Text, tempThree.ZeroDays.ToString());
            dp.addLabely(lbl_xLabelSix.Text, tempThree.OneToSevenDays.ToString());
            dp.addLabely(lbl_xLabelSeven.Text, tempThree.EightToFourteenDays.ToString());
            dp.addLabely(lbl_xLabelSeven.Text, tempThree.FifteenToTwentyOneDays.ToString());
            dp.addLabely(lbl_xLabelSeven.Text, tempThree.GreaterThanEqualToTwentyTwoDays.ToString());

            Average         = string.Format("{0:n}", tempThree.Average);
            TimeBucketOne   = string.Format("{0:n0}", tempThree.LessThanEqualToNegTwentyTwoDays);
            TimeBucketTwo   = string.Format("{0:n0}", tempThree.NegTwentyOneToNegFifteenDays);
            TimeBucketThree = string.Format("{0:n0}", tempThree.NegFourteenToNegEightDays);
            TimeBucketFour  = string.Format("{0:n0}", tempThree.NegSevenToNegOneDays);
            TimeBucketFive  = string.Format("{0:n0}", tempThree.ZeroDays);
            TimeBucketSix   = string.Format("{0:n0}", tempThree.OneToSevenDays);
            TimeBucketSeven = string.Format("{0:n0}", tempThree.EightToFourteenDays);
            TimeBucketEight = string.Format("{0:n0}", tempThree.FifteenToTwentyOneDays);
            TimeBucketNine  = string.Format("{0:n0}", tempThree.GreaterThanEqualToTwentyTwoDays);
            TotalOrders     = string.Format("{0:n0}", tempThree.TotalRecords);

            canvas.addData(dp);
            dataviz.Render(canvas);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Renders the specific KPI category into the loaded template
        /// </summary>
        private void RenderThree()
        {
            Bunifu.DataViz.Canvas    canvas = new Bunifu.DataViz.Canvas();
            Bunifu.DataViz.DataPoint dp     = new Bunifu.DataViz.DataPoint(Bunifu.DataViz.BunifuDataViz._type.Bunifu_column);

            Title = Values.Categories.kpiCategories[(int)Values.Sections.KpiSection.FollowUp][(int)Values.Categories.KpiCategory.FollowUp.ReceiptDatevsCurrentPlanDate];
            KPA_KPI_UI.topHandleBarModel.Category = Title;
            KPA_KPI_UI.topHandleBarModel.Section  = Values.Sections.kpiections[(int)Values.Sections.KpiSection.FollowUp];


            AnalysisOne = "- Will show if PO line has been received complete.";
            AnalysisTwo = "- Difference between final receipt date and current planned date.";

            TemplateThree tempThree = KpiOverallReport.Indicators[(int)KpiOption.FollowUp_ReceiptDateVsCurrentPlanDate].TemplateBlock as TemplateThree;

            // Add the data to the column chart
            dp.addLabely(lbl_xLabelOne.Text, tempThree.LessThanEqualToNegTwentyTwoDays.ToString());
            dp.addLabely(lbl_xLabelTwo.Text, tempThree.NegTwentyOneToNegFifteenDays.ToString());
            dp.addLabely(lbl_xLabelThree.Text, tempThree.NegFourteenToNegEightDays.ToString());
            dp.addLabely(lbl_xLabelFour.Text, tempThree.NegSevenToNegOneDays.ToString());
            dp.addLabely(lbl_xLabelFive.Text, tempThree.ZeroDays.ToString());
            dp.addLabely(lbl_xLabelSix.Text, tempThree.OneToSevenDays.ToString());
            dp.addLabely(lbl_xLabelSeven.Text, tempThree.EightToFourteenDays.ToString());
            dp.addLabely(lbl_xLabelSeven.Text, tempThree.FifteenToTwentyOneDays.ToString());
            dp.addLabely(lbl_xLabelSeven.Text, tempThree.GreaterThanEqualToTwentyTwoDays.ToString());


            Average         = string.Format("{0:n}", tempThree.Average);
            TimeBucketOne   = string.Format("{0:n0}", tempThree.LessThanEqualToNegTwentyTwoDays);
            TimeBucketTwo   = string.Format("{0:n0}", tempThree.NegTwentyOneToNegFifteenDays);
            TimeBucketThree = string.Format("{0:n0}", tempThree.NegFourteenToNegEightDays);
            TimeBucketFour  = string.Format("{0:n0}", tempThree.NegSevenToNegOneDays);
            TimeBucketFive  = string.Format("{0:n0}", tempThree.ZeroDays);
            TimeBucketSix   = string.Format("{0:n0}", tempThree.OneToSevenDays);
            TimeBucketSeven = string.Format("{0:n0}", tempThree.EightToFourteenDays);
            TimeBucketEight = string.Format("{0:n0}", tempThree.FifteenToTwentyOneDays);
            TimeBucketNine  = string.Format("{0:n0}", tempThree.GreaterThanEqualToTwentyTwoDays);
            TotalOrders     = string.Format("{0:n0}", tempThree.TotalRecords);

            canvas.addData(dp);
            dataviz.Render(canvas);
        }
Exemplo n.º 11
0
        /// <summary>
        /// Export the data from KPIs template three to excel
        /// </summary>
        private void ExportTemplateThreeData()
        {
            row      = (int)OverallExcelFile.OverallCellPositions.KpiOverallTempThreeRowStartPosition;
            colStart = (int)OverallExcelFile.OverallCellPositions.KpiOverallTempThreeColStartPosition;
            col      = colStart;


            foreach (KeyPerformanceIndicator indicator in KpiOverallReport.Indicators)
            {
                // Make sure the indicator is from template one.
                if (indicator.TemplateBlock is TemplateThree)
                {
                    // Convert the indicator to a ITemplate interface
                    TemplateThree tempThreeData = indicator.TemplateBlock as TemplateThree;

                    // Get the template data from the indicator
                    List <string> tempData = tempThreeData.GetTemplateData();

                    if (indicator is IUnconfirmed)
                    {
                        tempData.Add((indicator as IUnconfirmed).PercentUnconfirmed.ToString());
                    }
                    else
                    {
                        tempData.Add("");
                    }


                    if (indicator is IFavorable)
                    {
                        tempData.Add((indicator as IFavorable).PercentFavorable.ToString());
                    }

                    // Remove any unwanted characters
                    CleanData(ref tempData);

                    if (tempData != null)
                    {
                        // We are starting at position 2 in the array because the first two value are the section and cateogory
                        // The template already contains this data
                        foreach (string data in tempData)
                        {
                            // if the value in the array is blank, move to the next index in the array
                            if (data == "")
                            {
                                // Increment the column and continue
                                ++col;
                                continue;
                            }

                            // Add the value to the cel
                            worksheet.Cells[row, col].Value = double.Parse(data);

                            // Increment the column position
                            ++col;
                        }
                    }
                    // Increament the row pos
                    ++row;
                }

                // Reset the column position back to default
                col = colStart;
            }
        }