/// <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(); } }
/// <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"; }