コード例 #1
0
    private void SetKpiStatusGrid()
    {
        this.SetMapinfo();

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

        DataSet dsScore = objBSC.GetEstDeptTotalScore
                          (
            this.IEstTermRefID
            , this.IYmd
            , this.ISumType
            , this.IEstDeptID
            , chkApplyExtScore.Checked
                          );

        if (dsScore.Tables[0].Rows.Count > 0)
        {
            string strs = dsScore.Tables[0].Rows[0]["POINT"].ToString();
        }


        DataSet dsKpi = objBSC.GetEstDeptKpiScoreList
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID
                            , chkApplyExtScore.Checked);

        ugrdKpiStatus.Clear();
        ugrdKpiStatus.DataSource = dsKpi;
        ugrdKpiStatus.DataBind();
    }
コード例 #2
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";
    }
コード例 #3
0
ファイル: BSC1010S1.aspx.cs プロジェクト: schifflee/bscgit
    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;
                }
            }
        }
    }
コード例 #4
0
ファイル: BSC0403S1.aspx.cs プロジェクト: schifflee/bscgit
    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;
    }