Ejemplo n.º 1
0
    private void SetGauge()
    {
        //================================================================== 전체
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();

        DataSet dsTot = objBSC.GetEstDeptTotalScore(this.IEstTermRefID
                                                    , this.IYmd
                                                    , this.ISumType
                                                    , this.IEstDeptID);
        double dblMax = 0.00;

        if (dsTot.Tables[0].Rows.Count > 0)
        {
            dblMax = Math.Round(double.Parse(dsTot.Tables[0].Rows[0][3].ToString()), 0);

            this.gauTotal2.NumericIndicators["Default"].Value       = (dsTot.Tables[0].Rows.Count > 0) ? double.Parse(dsTot.Tables[0].Rows[0]["POINT"].ToString()) : 0;
            this.gauTotal2.NumericIndicators["Default"].Href        = "./BSC0404S1.ASPX";
            this.gauTotal2.NumericIndicators["Default"].BorderWidth = 0;
            this.gauTotal2.Labels["Default"].Href = "./BSC0404S1.ASPX";

            lblToatal.Text = Convert.ToString(Math.Round(this.gauTotal2.NumericIndicators["Default"].Value, 2));

            this.SetStateIndicator(this.gauTotal2.StateIndicators);

            foreach (Dundas.Gauges.WebControl.StateIndicator stateIndicator in this.gauTotal2.StateIndicators)
            {
                stateIndicator.Value       = (dsTot.Tables[0].Rows.Count > 0) ? double.Parse(dsTot.Tables[0].Rows[0]["POINT"].ToString()) : 0;
                stateIndicator.Location.Y  = 0;
                stateIndicator.Location.X  = 30;
                stateIndicator.Size.Height = 9;
                stateIndicator.Size.Width  = 7;
            }
        }

        //================================================================== 관점별 달성율

        DataSet dsViw = objBSC.GetEstDeptKpiViewTypeList(this.IEstTermRefID
                                                         , this.IYmd
                                                         , this.ISumType
                                                         , this.IEstDeptID);

        Dundas.Gauges.WebControl.GaugeContainer objGauge = null;

        if (dsViw.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < dsViw.Tables[0].Rows.Count; i++)
            {
                switch (i)
                {
                case 0:
                    objGauge = gauKPI1;
                    break;

                case 1:
                    objGauge = gauKPI2;
                    break;

                case 2:
                    objGauge = gauKPI3;
                    break;

                case 3:
                    objGauge = gauKPI4;
                    break;


                default:
                    return;
                }


                dblMax = Math.Round(double.Parse(dsViw.Tables[0].Rows[i]["ACHV_RATE"].ToString()), 0);

                objGauge.CircularGauges["Default"].Scales[0].Minimum    = 0;
                objGauge.CircularGauges["Default"].Scales[0].Maximum    = (dblMax >= 100) ? dblMax : 100;
                objGauge.CircularGauges["Default"].Scales[0].StartAngle = 89;
                objGauge.CircularGauges["Default"].Scales[0].SweepAngle = 95;
                //objGauge.CircularGauges["Default"].Scales[0].Width = 10;
                //objGauge.CircularGauges["Default"].Scales[0].ShadowOffset = 0;
                objGauge.CircularGauges["Default"].Scales[0].Radius = 57;
                //objGauge.CircularGauges["Default"].Scales[0].FillColor = System.Drawing.Color.White;

                // Flash based streaming
                objGauge.ImageType       = Dundas.Gauges.WebControl.ImageType.Png;
                objGauge.RenderAsControl = Dundas.Gauges.WebControl.AutoBool.False;

                objGauge.CircularGauges["Default"].Pointers["Default"].Value = (dsViw.Tables[0].Rows.Count > 0) ? double.Parse(dsViw.Tables[0].Rows[i]["ACHV_RATE"].ToString()) : 0;

                objGauge.Labels[0].Text = dsViw.Tables[0].Rows[i]["VIEW_NAME"].ToString();

                //objGauge.Labels[0].Href = "./BSC0404S1.ASPX";
                objGauge.Labels[0].BorderWidth = 0;

                this.SetStateIndicator(objGauge.StateIndicators);

                foreach (Dundas.Gauges.WebControl.StateIndicator stateIndicator in this.gauTotal2.StateIndicators)
                {
                    stateIndicator.Value = (dsViw.Tables[0].Rows.Count > 0) ? double.Parse(dsViw.Tables[0].Rows[i]["ACHV_RATE"].ToString()) : 0;
                }
            }
        }
    }
Ejemplo n.º 2
0
    private void SetKpiStatusGraph2()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();

        DataSet       dsGraph  = new DataSet();
        List <string> listYMDs = new List <string>();
        Chart         objChart = this.chtPart;

        //dsGraph = TempData3();

        //관점별 1년치데이타
        foreach (string str in GetBeforeMonth(listYMDs))
        {
            dsGraph.Merge(objBSC.GetEstDeptKpiViewTypeList(this.IEstTermRefID
                                                           , str
                                                           , this.ISumType
                                                           , this.IEstDeptID));
        }

        dsGraph.AcceptChanges();

        dsGraph = this.ModifyData(dsGraph);

        foreach (DataRow dr in dsGraph.Tables[0].Rows)
        {
            dr["YMD"] = string.Format("{0}년{1}월", dr["YMD"].ToString().Substring(0, 4), DataTypeUtility.GetToInt32(dr["YMD"].ToString().Substring(4, 2)));
        }

        if (dsGraph.Tables[0].Rows.Count > 0)
        {
            DundasCharts.DundasChartBase(objChart
                                         , ChartImageType.Png
                                         , 680
                                         , 130
                                         , BorderSkinStyle.Emboss
                                         , Color.FromArgb(181, 64, 1)
                                         , 2
                                         , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                         , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                         , Color.FromArgb(0x20, 0x80, 0xD0)
                                         , ChartDashStyle.Solid
                                         , -1
                                         , ChartHatchStyle.None
                                         , GradientType.TopBottom
                                         , AntiAliasing.None);

            objChart.DataSource = dsGraph;

            objChart.Series.Clear();

            MicroBSC.BSC.Biz.Biz_Bsc_View_Info objViewInfo = new MicroBSC.BSC.Biz.Biz_Bsc_View_Info();

            DataSet rDs = objViewInfo.GetAllList();

            if (rDs.Tables != null && rDs.Tables[0].Rows.Count == 4)
            {
                Series series4 = DundasCharts.CreateSeries(objChart, "sp1", "Default", rDs.Tables[0].Rows[0]["VIEW_NAME"].ToString(), null, SeriesChartType.Area, 1, Color.FromArgb(240, 224, 64, 10), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 9, Color.FromArgb(64, 64, 64));
                Series series1 = DundasCharts.CreateSeries(objChart, "sp2", "Default", rDs.Tables[0].Rows[1]["VIEW_NAME"].ToString(), null, SeriesChartType.Area, 1, Color.FromArgb(240, 192, 192, 192), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 9, Color.FromArgb(64, 64, 64));
                Series series3 = DundasCharts.CreateSeries(objChart, "sp3", "Default", rDs.Tables[0].Rows[2]["VIEW_NAME"].ToString(), null, SeriesChartType.Area, 1, Color.FromArgb(240, 65, 140, 240), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 9, Color.FromArgb(64, 64, 64));
                Series series2 = DundasCharts.CreateSeries(objChart, "sp4", "Default", rDs.Tables[0].Rows[3]["VIEW_NAME"].ToString(), null, SeriesChartType.Area, 1, Color.FromArgb(240, 252, 180, 65), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 9, Color.FromArgb(64, 64, 64));

                series1.ValueMembersY = "ACHV_RATE1";
                series2.ValueMembersY = "ACHV_RATE2";
                series3.ValueMembersY = "ACHV_RATE3";
                series4.ValueMembersY = "ACHV_RATE4";
                series1.ValueMemberX  = "YMD";

                foreach (Series series in objChart.Series)
                {
                    objChart.ChartAreas[objChart.Series[series.Name].ChartArea].AxisX.Margin   = false;
                    objChart.ChartAreas[objChart.Series[series.Name].ChartArea].AxisY2.Enabled = AxisEnabled.False;
                    objChart.ChartAreas[objChart.Series[series.Name].ChartArea].AxisY.Interval = 30;

                    series.Href = HttpContext.Current.Request.Url.ToString().Substring(0
                                                                                       , HttpContext.Current.Request.Url.ToString().LastIndexOf('/')) + "/BSC0404S1.ASPX";
                }

                objChart.DataBind();
            }
        }
    }
Ejemplo n.º 3
0
    private void SetGraph()
    {
        int charWidth  = 300;
        int charHeight = 170;

        int    cntRow   = 0;
        int    cntCol   = 0;
        int    intLP    = 0;
        string strSerNm = "";

        //================================================================== 관점별 달성율
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet dsViw = objBSC.GetEstDeptKpiViewTypeList
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID);

        if (dsViw.Tables[0].Rows.Count > 0)
        {
            Chart chartMS = chartView;
            MSCharts.DundasChartBase(chartMS, ChartImageType.Jpeg, charWidth, charHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);
            Series serARate = MSCharts.CreateSeries(chartMS, "serA", "AreaView", "달성율", null, SeriesChartType.Bar, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            chartMS.Legends[0].Enabled = false;
            serARate.ToolTip           = "#VALY{P}";

            chartMS.ChartAreas["AreaView"].Area3DStyle.Enable3D = false;

            chartMS.DataSource     = dsViw;
            serARate.YValueMembers = "ACHV_RATE";
            serARate.XValueMember  = "VIEW_NAME";
            chartMS.DataBind();
        }

        //================================================================== 등급구간별별 점수현황
        DataSet dsGrd = objBSC.GetKpiGradeStatusForMap
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID);

        if (dsGrd.Tables[0].Rows.Count > 0)
        {
            Chart chartGD = chartGrade;
            MSCharts.DundasChartBase(chartGD, ChartImageType.Jpeg, charWidth, charHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);

            Series serCRate = MSCharts.CreateSeries(chartGD, "serA", "AreaGrade", "달성율", null, SeriesChartType.Pie, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            chartGD.Legends[0].Enabled = false;
            serCRate.ToolTip           = "#VALY{P}";

            chartGD.ChartAreas["AreaGrade"].Area3DStyle.Enable3D = true;
            serCRate["PieLabelStyle"] = "Outside";

            chartGD.DataSource     = dsGrd;
            serCRate.YValueMembers = "C_RATE";
            serCRate.XValueMember  = "THRESHOLD_KNAME";
            chartGD.DataBind();
        }

        //================================================================== 지표군별 점수현황
        MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard objBOR = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard();
        DataSet dsGroup = objBOR.GetDashBoardForKpiGroupScore(this.IEstTermRefID, this.IYmd, this.ISumType);

        if (dsGroup.Tables[0].Rows.Count > 0)
        {
            MSCharts.DundasChartBase(chartGroup, ChartImageType.Jpeg, charWidth, charHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.Graphics);
            Series serGroup = MSCharts.CreateSeries(chartGroup, "serA", "AreaGroup", "점수", null, SeriesChartType.Bar, 0, GetChartColor(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            chartGroup.Legends[0].Enabled = false;
            serGroup.ToolTip = "#VALY{P}";

            chartGroup.ChartAreas["AreaGroup"].Area3DStyle.Enable3D = false;

            chartGroup.DataSource  = dsGroup;
            serGroup.YValueMembers = "POINTS";
            serGroup.XValueMember  = "KPI_GROUP_NAME";
            chartGroup.DataBind();
        }
    }
Ejemplo n.º 4
0
    /// <summary>
    /// 관점별 / 등급별 현황 그래프
    /// </summary>
    private void SetGraph()
    {
        int chartWidth  = 310;
        int chartHeight = 400;

        double tempWidth  = DataTypeUtility.GetToInt32(hdfScreenWidth.Value) * 0.31;
        double tempHeight = DataTypeUtility.GetToInt32(hdfScreenHeight.Value) * 0.33;

        chartWidth  = DataTypeUtility.GetToInt32(Math.Round(tempWidth, 0));
        chartHeight = DataTypeUtility.GetToInt32(Math.Round(tempHeight, 0));

        chartView.Visible  = false;
        chartGrade.Visible = false;

        this.SetParameter();
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();

        DataSet dsViw = new DataSet();
        DataSet dsGrd = new DataSet();


        if (rdoGoalTong.SelectedIndex.Equals(0))
        {
            dsViw = objBSC.GetEstDeptKpiViewTypeList
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);



            dsGrd = objBSC.GetKpiGradeStatusForMap
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);
        }
        else
        {
            dsViw = objBSC.GetEstDeptKpiViewTypeList_Goal
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);


            dsGrd = objBSC.GetKpiGradeStatusForMap_Goal
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);
        }

        if (dsViw.Tables[0].Rows.Count > 0)
        {
            Chart chartMS = this.ugrdKpiStatusTab.FindControl("chartView") as Chart;

            chartMS.Visible = true;

            MSCharts.DundasChartBase(chartMS, ChartImageType.Jpeg, chartWidth, chartHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);
            Series serARate = MSCharts.CreateSeries(chartMS, "serA", "AreaView", "달성율", null, SeriesChartType.Column, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            chartMS.Legends[0].Enabled = false;
            serARate.ToolTip           = "#VALY{P}";

            chartMS.ChartAreas["AreaView"].Area3DStyle.Enable3D = true;

            chartMS.DataSource     = dsViw;
            serARate.YValueMembers = "ACHV_RATE";
            serARate.XValueMember  = "VIEW_NAME";
            chartMS.DataBind();
        }



        if (dsGrd.Tables[0].Rows.Count > 0)
        {
            Chart chartGD = this.ugrdKpiStatusTab.FindControl("chartGrade") as Chart;


            DataRow[] rows = dsGrd.Tables[0].Select(" C_RATE <> 0 ");

            if (rows.Length > 0)
            {
                chartGD.Visible = true;
            }

            MSCharts.DundasChartBase(chartGD, ChartImageType.Jpeg, chartWidth, chartHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);

            Series serCRate = MSCharts.CreateSeries(chartGD, "serA", "AreaGrade", "달성율", null, SeriesChartType.Doughnut, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            chartGD.Legends[0].Enabled = false;
            serCRate.ToolTip           = "#VALY{P}";

            chartGD.ChartAreas["AreaGrade"].Area3DStyle.Enable3D = true;

            chartGD.DataSource     = dsGrd;
            serCRate.YValueMembers = "C_RATE";
            serCRate.XValueMember  = "THRESHOLD_ENAME";
            chartGD.DataBind();
        }
    }
Ejemplo n.º 5
0
    /// <summary>
    /// 스코어카드 그리드 바인딩
    /// 엑셀출력의 경우 숨겨진 그리드에 바인딩하고 출력한다(this.IPrintType == "XLS" || this.IPrintType == "PDF")
    /// </summary>
    public void SetDeptScoreCard()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        //DataSet iDs = objBSC.GetEstDeptTotalScore( this.IEstTermRefID
        //                                         , this.IYmd
        //                                         , this.ISumType
        //                                         , this.IEstDeptID);

        DataSet dsViw = new DataSet();
        DataSet dsKpi = new DataSet();
        DataSet dsTot = new DataSet();

        if (rdoGoalTong.SelectedIndex.Equals(0))
        {
            dsViw = objBSC.GetEstDeptKpiViewTypeList
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);

            dsKpi = objBSC.GetEstDeptKpiScoreList
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);



            dsTot = objBSC.GetEstDeptTotalScore
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);
        }
        else
        {
            dsViw = objBSC.GetEstDeptKpiViewTypeList_Goal
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);

            dsKpi = objBSC.GetEstDeptKpiScoreList_Goal
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);

            dsTot = objBSC.GetEstDeptTotalScore_Goal
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);
        }



        DataSet dsTree = new DataSet();

        if (ddlMapLevel.SelectedValue == "SP")
        {
            DataSet dsStg = new DataSet();
            if (rdoGoalTong.SelectedIndex.Equals(0))
            {
                dsStg = objBSC.GetScorePerStrategy
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID
                            , this.IExtKpiYN);
            }
            else
            {
                dsStg = objBSC.GetScorePerStrategy_Goal
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID
                            , this.IExtKpiYN);
            }


            DataTable dtStg = dsStg.Tables[0].Copy();
            DataTable dtKpi = dsKpi.Tables[0].Copy();

            dsTree = dsViw.Copy();
            dsTree.Tables.Add(dtStg);
            dsTree.Tables.Add(dtKpi);


            dsTree.Relations.Add("SCORE_CARD_STG", dsTree.Tables[0].Columns["VIEW_REF_ID"], dsTree.Tables[1].Columns["VIEW_REF_ID"]);
            dsTree.Relations.Add("SCORE_CARD_KPI", dsTree.Tables[1].Columns["STG_REF_ID"], dsTree.Tables[2].Columns["STG_REF_ID"]);
        }
        else
        {
            DataTable dtKpi = dsKpi.Tables[0].Copy();

            dsTree = dsViw.Copy();
            dsTree.Tables.Add(dtKpi);

            dsTree.Relations.Add("SCORE_CARD_KPI", dsTree.Tables[0].Columns["VIEW_REF_ID"], dsTree.Tables[1].Columns["VIEW_REF_ID"]);
        }

        if (this.IPrintType == "MONITOR")
        {
            ugrdScoreCard.Clear();
            ugrdScoreCard.DataSource = dsTree.Tables[0].DefaultView;
            ugrdScoreCard.DataBind();
        }
        else if (this.IPrintType == "XLS" || this.IPrintType == "PDF")
        {
            ugrdScoreCardForPrint.Clear();
            ugrdScoreCardForPrint.DataSource = dsTree.Tables[0].DefaultView;
            ugrdScoreCardForPrint.DataBind();
        }

        lblTotalScore.Style.Add("align", "right");
        lblTotalScore.Text = (dsTot.Tables[0].Rows.Count > 0) ? double.Parse(dsTot.Tables[0].Rows[0]["POINT"].ToString()).ToString("#,##0.00") : "0";
    }
Ejemplo n.º 6
0
    private void SetKpiStatusGraph2()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();

        DataSet       dsGraph  = new DataSet();
        List <string> listYMDs = new List <string>();

        Dundas.Charting.WebControl.Chart objChart = this.chtPart;

        //dsGraph = TempData3();

        //관점별 1년치데이타
        foreach (string str in GetBeforeMonth(listYMDs))
        {
            dsGraph.Merge(objBSC.GetEstDeptKpiViewTypeList
                              (this.IEstTermRefID
                              , str
                              , this.ISumType
                              , this.IEstDeptID));
        }

        dsGraph.AcceptChanges();
        dsGraph = this.ModifyData(dsGraph);

        if (dsGraph.Tables[0].Rows.Count > 0)
        {
            DundasCharts.DundasChartBase(objChart
                                         , Dundas.Charting.WebControl.ChartImageType.Flash
                                         , 680, 180
                                         , Dundas.Charting.WebControl.BorderSkinStyle.None
                                         , Color.FromArgb(181, 64, 1)
                                         , 1
                                         , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                         , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                         , Color.FromArgb(0x20, 0x80, 0xD0)
                                         , Dundas.Charting.WebControl.ChartDashStyle.Solid
                                         , -1
                                         , Dundas.Charting.WebControl.ChartHatchStyle.None
                                         , Dundas.Charting.WebControl.GradientType.TopBottom
                                         , Dundas.Charting.WebControl.AntiAliasing.None);

            objChart.DataSource = dsGraph;
            objChart.Series.Clear();

            MicroBSC.BSC.Biz.Biz_Bsc_View_Info objViewInfo = new MicroBSC.BSC.Biz.Biz_Bsc_View_Info();
            DataSet rDs = objViewInfo.GetAllList();

            if (rDs.Tables != null && rDs.Tables[0].Rows.Count == 4)
            {
                Dundas.Charting.WebControl.Series series1 = DundasCharts.CreateSeries(objChart, "sp1", "AreaView", rDs.Tables[0].Rows[0]["VIEW_NAME"].ToString(), null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, Color.FromArgb(240, 224, 64, 10), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 5, Color.FromArgb(64, 64, 64));
                Dundas.Charting.WebControl.Series series2 = DundasCharts.CreateSeries(objChart, "sp2", "AreaView", rDs.Tables[0].Rows[1]["VIEW_NAME"].ToString(), null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, Color.FromArgb(240, 192, 192, 192), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 5, Color.FromArgb(64, 64, 64));
                Dundas.Charting.WebControl.Series series3 = DundasCharts.CreateSeries(objChart, "sp3", "AreaView", rDs.Tables[0].Rows[2]["VIEW_NAME"].ToString(), null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, Color.FromArgb(240, 65, 140, 240), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 5, Color.FromArgb(64, 64, 64));

                Dundas.Charting.WebControl.Series series4 = DundasCharts.CreateSeries(objChart, "sp4", "AreaView", rDs.Tables[0].Rows[3]["VIEW_NAME"].ToString(), null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, Color.FromArgb(240, 252, 180, 65), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 5, Color.FromArgb(64, 64, 64));

                series1.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
                series2.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
                series3.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
                series4.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
                series1.MarkerBorderColor = Color.FromArgb(240, 224, 64, 10);
                series1.MarkerColor       = Color.FromArgb(240, 224, 64, 10);
                series2.MarkerBorderColor = Color.FromArgb(240, 192, 192, 192);
                series2.MarkerColor       = Color.FromArgb(240, 192, 192, 192);
                series3.MarkerBorderColor = Color.FromArgb(240, 65, 140, 240);
                series3.MarkerColor       = Color.FromArgb(240, 65, 140, 240);
                series4.MarkerBorderColor = Color.FromArgb(240, 252, 180, 65);
                series4.MarkerColor       = Color.FromArgb(240, 252, 180, 65);

                series1.ValueMembersY = "ACHV_RATE1";
                series2.ValueMembersY = "ACHV_RATE2";
                series3.ValueMembersY = "ACHV_RATE3";
                series4.ValueMembersY = "ACHV_RATE4";
                series1.ValueMemberX  = "YMD";

                foreach (Dundas.Charting.WebControl.Series series in objChart.Series)
                {
                    //objChart.ChartAreas[objChart.Series[series.Name].ChartArea].AxisX.Margin = false;
                    //objChart.ChartAreas[objChart.Series[series.Name].ChartArea].AxisY2.Enabled = AxisEnabled.False;
                    //objChart.ChartAreas[objChart.Series[series.Name].ChartArea].AxisY.Interval = 30;
                    //series.Url = HttpContext.Current.Request.Url.ToString().Substring(0, HttpContext.Current.Request.Url.ToString().LastIndexOf('/')) + "/BSC0404S1.ASPX";
                }

                DundasAnimations.DundasChartBase(objChart, AnimationTheme.None, -1, -1, false, 1);
                DundasAnimations.GrowingAnimation(objChart, series1, 0.5, 2.0, true);
                DundasAnimations.GrowingAnimation(objChart, series2, 0.5, 2.0, true);
                DundasAnimations.GrowingAnimation(objChart, series3, 0.5, 2.0, true);
                DundasAnimations.GrowingAnimation(objChart, series4, 0.5, 2.0, true);

                objChart.DataBind();
            }
        }
    }
Ejemplo n.º 7
0
    public void SetDeptScoreCard()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet iDs = objBSC.GetEstDeptTotalScore(this.IEstTermRefID
                                                  , this.IYmd
                                                  , this.ISumType
                                                  , this.ISelDeptID
                                                  , this.IExtKpiYN);

        DataSet dsViw = objBSC.GetEstDeptKpiViewTypeList
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.ISelDeptID
                            , this.IExtKpiYN);

        DataSet dsKpi = objBSC.GetEstDeptKpiScoreList
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.ISelDeptID
                            , this.IExtKpiYN);

        DataSet dsTot = objBSC.GetEstDeptTotalScore
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.ISelDeptID
                            , this.IExtKpiYN);

        DataSet dsTree = new DataSet();

        if (ddlMapLevel.SelectedValue == "SP")
        {
            DataSet dsStg = objBSC.GetScorePerStrategy
                                (this.IEstTermRefID
                                , this.IYmd
                                , this.ISumType
                                , this.ISelDeptID
                                , this.IExtKpiYN);

            DataTable dtStg = dsStg.Tables[0].Copy();
            DataTable dtKpi = dsKpi.Tables[0].Copy();

            dsTree = dsViw.Copy();
            dsTree.Tables.Add(dtStg);
            dsTree.Tables.Add(dtKpi);


            dsTree.Relations.Add("SCORE_CARD_STG", dsTree.Tables[0].Columns["VIEW_REF_ID"], dsTree.Tables[1].Columns["VIEW_REF_ID"]);
            dsTree.Relations.Add("SCORE_CARD_KPI", dsTree.Tables[1].Columns["STG_REF_ID"], dsTree.Tables[2].Columns["STG_REF_ID"]);
        }
        else
        {
            DataTable dtKpi = dsKpi.Tables[0].Copy();

            dsTree = dsViw.Copy();
            dsTree.Tables.Add(dtKpi);

            dsTree.Relations.Add("SCORE_CARD_KPI", dsTree.Tables[0].Columns["VIEW_REF_ID"], dsTree.Tables[1].Columns["VIEW_REF_ID"]);
        }

        ugrdScoreCard.Clear();
        ugrdScoreCard.DataSource = dsTree.Tables[0].DefaultView;
        ugrdScoreCard.DataBind();

        lblTotalScore.Style.Add("align", "right");
        lblTotalScore.Text = (dsTot.Tables[0].Rows.Count > 0) ? double.Parse(dsTot.Tables[0].Rows[0]["POINT"].ToString()).ToString("#,##0.00") : "0";

        MicroBSC.BSC.Biz.Biz_Bsc_Map_Info objMap = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Info(this.IEstTermRefID
                                                                                         , this.ISelDeptID
                                                                                         , this.IYmd);
        lblDeptName.Text    = objMap.Iest_dept_name;
        lblDeptVision.Text  = objMap.Idept_vision;
        lblBSCChampion.Text = objMap.Ibscchampion_name;
    }