Пример #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
 private void SetDeptScoreCard()
 {
     MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
     ultraLegend.Clear();
     ultraLegend.DataSource = objBSC.GetEstDeptTotalScoreForMap
                                  (this.IEstTermRefID
                                  , this.IYmd
                                  , this.ISumType
                                  , this.IEstDeptID
                                  , this.IExtKpiYN
                                  );
     ultraLegend.DataBind();
 }
Пример #3
0
    private void SetDeptScoreCard()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet rDs = objBSC.GetEstDeptTotalScoreForMap
                          (this.IEstTermRefID
                          , this.IYmd
                          , this.ISumType
                          , this.IEstDeptID
                          , this.IExtKpiYN
                          );

        ultraLegend.DataSource = rDs.Tables[0].DefaultView;
        ultraLegend.DataBind();
    }
Пример #4
0
    // 전사 현재월 등급구성비
    public void SetEntGradeRate(Chart iChart)
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet dsGrd = objBSC.GetKpiEntGradeStatus
                            (this.IYmd
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID);

        MSCharts.GetDefaultChart(iChart, ChartImageType.Jpeg, 230, chartHeight, true, false, true);
        ChartArea FstChtArea = iChart.ChartAreas[0];

        FstChtArea.Position.Auto = true;

        string sTitle = PageUtility.GetByTextDropDownList(ddlMonthInfo) + " 현재 지표등급 구성비";

        MSCharts.CreateTitle(iChart, sTitle);


        if (dsGrd.Tables[0].Rows.Count > 0)
        {
            Series serCRate = MSCharts.CreateSeries(iChart, "serA", iChart.ChartAreas[0].Name, "달성율", null, SeriesChartType.Pie, 0, GetChartColor(0), Color.FromArgb(chartHeight, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            iChart.DataSource = dsGrd;

            iRow = dsGrd.Tables[0].Rows.Count;
            for (int i = 0; i < iRow; i++)
            {
                string sValue = dsGrd.Tables[0].Rows[i]["COMP_RATE"].ToString();
                string sColor = dsGrd.Tables[0].Rows[i]["THRESHOLD_COLOR"].ToString();
                serCRate.Points.Add(double.Parse(sValue));
                serCRate.Points[i].Color = ColorTranslator.FromHtml(sColor);
                if (sValue.IndexOf('.') > 0)
                {
                    serCRate.Points[i].Label = sValue.Substring(0, sValue.IndexOf('.')) + "%";
                }
                else
                {
                    serCRate.Points[i].Label = sValue + "%";
                }
            }

            //serCRate.ToolTip = "X value \t= #VALX{d}\nY value \t= #VALY{C}\nRadius \t= #VALY2{P}";
            serCRate.ToolTip = "#VALY{P}";
        }
    }
Пример #5
0
    // 전사 관점별 경고지표 구성비
    public void SetEntGradeView(Chart iChart)
    {
        MSCharts.GetDefaultChart(iChart, ChartImageType.Jpeg, 230, chartHeight, true, false, true);
        ChartArea FstChtArea = iChart.ChartAreas[0];

        FstChtArea.Position.Auto = true;

        string sTitle = PageUtility.GetByTextDropDownList(ddlMonthInfo) + " 현재 위험지표 구성비";

        MSCharts.CreateTitle(iChart, sTitle);

        if (this.IThresholdRefID < 1)
        {
            return;
        }

        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet dsGrd = objBSC.GetKpiEntGradeAlert
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IThresholdRefID);

        if (dsGrd.Tables[0].Rows.Count > 0)
        {
            Series serCRate = MSCharts.CreateSeries(iChart, "serA", iChart.ChartAreas[0].Name, "달성율", null, SeriesChartType.Pie, 0, GetChartColor(0), Color.FromArgb(chartHeight, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            iChart.DataSource = dsGrd;

            iRow = dsGrd.Tables[0].Rows.Count;
            for (int i = 0; i < iRow; i++)
            {
                string sValue = dsGrd.Tables[0].Rows[i]["COMP_RATE"].ToString();
                string sText  = dsGrd.Tables[0].Rows[i]["VIEW_NAME"].ToString();
                serCRate.Points.Add(double.Parse(sValue));
                serCRate.Points[i].Color = GetChartColor(i);
                serCRate.Points[i].Label = sText;
            }

            //serCRate.ToolTip = "X value \t= #VALX{d}\nY value \t= #VALY{C}\nRadius \t= #VALY2{P}";
            serCRate.ToolTip = "#VALY{P}";
        }
    }
Пример #6
0
    private void PrintFormGrid()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet dsKpi = objBSC.GetEstDeptKpiScoreList
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID
                            , this.IExtKpiYN);

        ugrdScoreCardPrint.Clear();
        ugrdScoreCardPrint.DataSource = dsKpi;
        ugrdScoreCardPrint.DataBind();

        string strCurDate = DateTime.Now.Year.ToString() + "_" + DateTime.Now.Month.ToString().PadRight(2, '0') + DateTime.Now.Minute.ToString().PadRight(2, '0') + DateTime.Now.Second.ToString().PadRight(2, '0');

        ugrdEEP.ExcelStartRow = 10;
        ugrdEEP.ExportMode    = ExportMode.Download;
        ugrdEEP.DownloadName  = "ScoreCard" + strCurDate + ".xls";
        ugrdEEP.WorksheetName = "ScoreCardFor" + lblDeptName.Text;
        ugrdEEP.Export(ugrdScoreCardPrint);
        ugrdScoreCardPrint.Clear();
    }
Пример #7
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();
            }
        }
    }
Пример #8
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;
                }
            }
        }
    }
Пример #9
0
    protected void BindGrid()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card bizScoreCard = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();


        MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Score_Goal bizKpiScoreGoal = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Score_Goal();
        MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Score      bizKpiScore     = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Score();


        DataTable dt_kpiScore            = new DataTable();
        DataTable dt_kpiScore_monthly_TS = new DataTable();

        if (rdoGoalTong.SelectedValue.Equals("GOAL"))
        {
            dt_kpiScore            = bizScoreCard.GetEstDeptKpiScoreList(ESTTERM_REF_ID, YMD, "TS", DEPT_REF_ID, false).Tables[0];
            dt_kpiScore_monthly_TS = bizKpiScoreGoal.Get_Kpi_Monthly_Total_Sum(ESTTERM_REF_ID, DEPT_REF_ID);
        }
        else
        {
            dt_kpiScore            = bizScoreCard.GetEstDeptKpiScoreList_Goal(ESTTERM_REF_ID, YMD, "TS", DEPT_REF_ID, false).Tables[0];
            dt_kpiScore_monthly_TS = bizKpiScore.Get_Kpi_Monthly_Total_Sum(ESTTERM_REF_ID, DEPT_REF_ID);
        }



        //월별 컬럼 생성
        string year = YMD.Substring(0, 4);

        for (int j = 1; j <= 12; j++)
        {
            string month = j.ToString().PadLeft(2, '0');
            dt_kpiScore.Columns.Add(year + month);
        }



        //월별 컬럼에 값 추가
        for (int i = 0; i < dt_kpiScore.Rows.Count; i++)
        {
            string kpi_ref_id = DataTypeUtility.GetString(dt_kpiScore.Rows[i]["KPI_REF_ID"]);

            for (int j = 1; j <= 12; j++)
            {
                string month = j.ToString().PadLeft(2, '0');

                string    filter = string.Format("KPI_REF_ID='{0}' AND YMD='{1}'", kpi_ref_id, year + month);
                DataTable dt_tmp_monthly_score = DataTypeUtility.FilterSortDataTable(dt_kpiScore_monthly_TS, filter);

                if (dt_tmp_monthly_score.Rows.Count > 0)
                {
                    dt_kpiScore.Rows[i][year + month] = DataTypeUtility.GetString(dt_tmp_monthly_score.Rows[0]["SCORE_TS"]);
                }
            }
        }



        UltraWebGrid1.Clear();
        UltraWebGrid1.DataSource = dt_kpiScore;
        UltraWebGrid1.DataBind();
    }
Пример #10
0
    private void SetScoreGrid()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail objTerm = new MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail();
        DataSet rDs = objTerm.GetAllList(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));

        DataSet dsTScore = new DataSet();

        dsTScore.Tables.Add("TSCORE");
        dsTScore.Tables.Add("TSCORE2");

        string strMM = "";

        this.IcntCol = rDs.Tables[0].Rows.Count;

        for (int i = 0; i < this.IcntCol; i++)
        {
            strMM = rDs.Tables[0].Rows[i]["YMD"].ToString();
            dsTScore.Tables[1].Columns.Add("TC_" + strMM + "_01", typeof(string));  // YMD
            dsTScore.Tables[1].Columns.Add("TC_" + strMM + "_02", typeof(string));  // EST_DEPT_REF_ID
            dsTScore.Tables[1].Columns.Add("TC_" + strMM + "_06", typeof(string));  // EST_YN

            dsTScore.Tables[0].Columns.Add("TC_" + strMM + "_03", typeof(string));  // RANK_ID
            dsTScore.Tables[0].Columns.Add("TC_" + strMM + "_04", typeof(string));  // DEPT_NAME
            dsTScore.Tables[0].Columns.Add("TC_" + strMM + "_05", typeof(string));  // SCORE
        }

        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet dsRtn = objSC.GetYearlyTotalScoreTrend(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo)
                                                       , PageUtility.GetIntByValueDropDownList(ddlComTypeInfo)
                                                       , PageUtility.GetByValueDropDownList(ddlSumType)
                                                       , (hdfDeptID.Value == "") ? 0 : int.Parse(hdfDeptID.Value)
                                                       , (chkApplyExtScore.Checked) ? "Y" : "N"
                                                       , gUserInfo.Emp_Ref_ID);

        int    cntRow     = dsRtn.Tables[0].Rows.Count;       // 조회행수
        int    cntCol     = dsRtn.Tables[0].Columns.Count;    // 컬럼수
        int    intRowIdx  = 0;                                // DataSet Row Index
        int    intColIdx  = 0;                                // DataSet Col Index
        int    intRowNum  = 0;                                // Row Num
        string strPTmcode = "";                               // 이전행 월코드
        string strCTmcode = "";                               // 현재행 월코드
        string strNTmcode = "";                               // 다음행 월코드
        int    iGrpRow    = 0;
        int    iTotRow    = 0;

        try
        {
            DataRow drRow  = dsTScore.Tables[0].NewRow();
            DataRow drRow2 = dsTScore.Tables[1].NewRow();
            for (int i = 0; i < cntRow; i++)
            {
                strPTmcode = (i > 0) ? dsRtn.Tables[0].Rows[i - 1]["YMD"].ToString() : dsRtn.Tables[0].Rows[i]["YMD"].ToString();
                strCTmcode = dsRtn.Tables[0].Rows[i]["YMD"].ToString();
                strNTmcode = (i >= cntRow - 1) ? dsRtn.Tables[0].Rows[i]["YMD"].ToString() : dsRtn.Tables[0].Rows[i + 1]["YMD"].ToString();

                if (strPTmcode != strCTmcode)
                {
                    iGrpRow = 1;
                }
                else
                {
                    iGrpRow += 1;
                }

                for (int j = 0; j < cntCol; j++)
                {
                    //if (intRowIdx == 0)
                    if (iGrpRow > iTotRow)
                    {
                        if (j == 0 || j == 1 || j == 5)
                        {
                            drRow2[intColIdx + (j == 5 ? 2 : j)] = dsRtn.Tables[0].Rows[i][j];
                        }
                        else
                        {
                            drRow[intColIdx + j - 2] = dsRtn.Tables[0].Rows[i][j];
                        }
                    }
                    else
                    {
                        if (j == 0 || j == 1 || j == 5)
                        {
                            dsTScore.Tables[1].Rows[intRowNum][intColIdx + (j == 5 ? 2 : j)] = dsRtn.Tables[0].Rows[i][j];
                        }
                        else
                        {
                            dsTScore.Tables[0].Rows[intRowNum][intColIdx + j - 2] = dsRtn.Tables[0].Rows[i][j];
                        }
                    }
                }

                //if (intRowIdx == 0)
                if (iGrpRow > iTotRow)
                {
                    dsTScore.Tables[0].Rows.Add(drRow);
                    dsTScore.Tables[1].Rows.Add(drRow2);
                    drRow    = dsTScore.Tables[0].NewRow();
                    drRow2   = dsTScore.Tables[1].NewRow();
                    iTotRow += 1;
                }

                if (strCTmcode != strNTmcode)
                {
                    intRowIdx += 1;
                    intColIdx += 3;
                    intRowNum  = 0;
                }
                else
                {
                    intRowNum += 1;
                }
            }
        }
        catch (Exception e)
        {
            ltrScript.Text = JSHelper.GetAlertScript(e.Message, false);
        }

        ugrdMScore2.DataSource = dsTScore.Tables[1];
        ugrdMScore2.DataBind();

        ugrdMScore.DataSource = dsTScore.Tables[0];
        ugrdMScore.DataBind();

        //if (ugrdMScore.Rows.Count > 0)
        //{
        //    ugrdMScore.Visible = true;
        //    imgNoData.Visible  = false;
        //}
        //else
        //{
        //    ugrdMScore.Visible = false;
        //    imgNoData.Visible  = true;
        //}
    }
Пример #11
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();
        }
    }
Пример #12
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();
        }
    }
Пример #13
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";
    }
Пример #14
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();
            }
        }
    }
Пример #15
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;
    }
Пример #16
0
    public void SetScoreRank()
    {
        this.SetParameter();
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet iDs = new DataSet();

        if (this.IExtKpiYN)
        {
            iDs = objBSC.GetEstDeptRank
                      (this.IEstTermRefID
                      , this.IYmd
                      , this.IDeptType
                      , this.ISumType
                      , (hdfDeptID.Value == "") ? 0 : int.Parse(hdfDeptID.Value.ToString())
                      , (this.chkInSubDept.Checked) ? "Y" : "N"
                      , this.chkApplyExtScore.Checked
                      , gUserInfo.Emp_Ref_ID
                      , this.IExtKpiYN
                      );
        }
        else
        {
            iDs = objBSC.GetEstDeptRank
                      (this.IEstTermRefID
                      , this.IYmd
                      , this.IDeptType
                      , this.ISumType
                      , (hdfDeptID.Value == "") ? 0 : int.Parse(hdfDeptID.Value.ToString())
                      , (this.chkInSubDept.Checked) ? "Y" : "N"
                      , this.chkApplyExtScore.Checked
                      , gUserInfo.Emp_Ref_ID
                      );
        }

        ugrdScore.Clear();
        ugrdScore.DataSource = iDs.Tables[0].DefaultView;
        ugrdScore.DataBind();

        //2012.05.04 박효동 : 권기풍차 요청(부경양돈)으로 전사내 동위레벨의 순위 표출)
        if (this.IType == "POP")
        {
            //DataSet dsPOP = objBSC.GetEstDeptRankPOP(this.IEstTermRefID, this.IYmd, this.IDeptType);

            MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Weight bizBscKpiWeight = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Weight();
            DataTable dtPop1 = bizBscKpiWeight.GetBscKpiWeight_DB(this.IEstTermRefID, this.IYmd, this.IDeptType);

            MicroBSC.Integration.BSC.Biz.Biz_Bsc_Est_Dept_Grade bizBscEstDeptGrade = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Est_Dept_Grade();
            DataTable dtPop2 = bizBscEstDeptGrade.GetBscEstDeptGrade_DB(this.IEstTermRefID, this.IDeptType);

            if (dtPop1.Rows.Count > 0)
            {
                DataRow[] drr = dtPop1.Select(string.Format("EST_DEPT_REF_ID = {0}", DataTypeUtility.GetToInt32(hdfDeptID.Value)));
                if (drr.Length > 0)
                {
                    double currScore = DataTypeUtility.GetToDouble(drr[0]["SCORE_" + this.ISumType]);
                    lblRank.Text    = (dtPop1.Rows.Count - dtPop1.Select(string.Format("SCORE_{0} < {1}", this.ISumType, currScore)).Length).ToString();
                    lblRankAll.Text = dtPop1.Rows.Count.ToString();

                    if (dtPop2.Rows.Count > 0)
                    {
                        DataRow[] drrSub = dtPop2.Select(string.Format("MIN_VALUE <= {0} AND MAX_VALUE >= {0}", currScore));
                        if (drrSub.Length > 0)
                        {
                            lblGrade.Text = drrSub[0]["GRADE_NAME"].ToString();
                        }
                    }
                }
            }
        }

        ugrdScoreRankPrint.Clear();
        ugrdScoreRankPrint.DataSource = iDs;
        ugrdScoreRankPrint.DataBind();

        cntRow = iDs.Tables[0].Rows.Count;

        if (cntRow < 1)
        {
            ugrdScoreCard.Clear();
            this.IEstDeptID       = 0;
            lblDeptName.Text      = " ";
            lblDeptVision.Text    = " ";
            lblBSCChampion.Text   = " ";
            lblRank.Text          = " ";
            lblTotalScore.Text    = " ";
            lblGrade.Text         = " ";
            lblRankAll.Text       = " ";
            iBtnPrintRank.Visible = false;
        }
        else
        {
            iBtnPrintRank.Visible = true;
        }
    }