コード例 #1
0
    private void SetResultGrid()
    {
        this.IYMD = PageUtility.GetByValueDropDownList(ddlMonthInfo);

        Biz_Bsc_Kpi_Result objBSC = new Biz_Bsc_Kpi_Result(this.IEstTermRefID, this.IKpiRefID, this.IYMD);
        DataSet            rDs    = objBSC.GetResultAnalysisList(this.IEstTermRefID, this.IKpiRefID, this.IYMD, this.IGoalTong_YN);

        txtPlan_Month.Text   = objBSC.Imeasure_text_ms;
        txtPlan_Sum.Text     = objBSC.Imeasure_text_ts;
        txtReason_Month.Text = objBSC.Icause_text_ms;
        txtReason_Sum.Text   = objBSC.Icause_text_ts;

        if (objBSC.Icause_file_id == "")
        {
            iBtnCauseFileID.Visible = false;
        }
        else
        {
            iBtnCauseFileID.Visible = true;
            hdfCauseDocNo.Value     = objBSC.Icause_file_id;
        }



        if (objBSC.Imeasure_file_id == "")
        {
            iBtnMeasureFileID.Visible = false;
        }
        else
        {
            iBtnMeasureFileID.Visible = false;
            hdfMeasureDocNo.Value     = objBSC.Imeasure_file_id;
        }

        ugrdKpiResultStatus.Clear();
        ugrdKpiResultStatus.DataSource = rDs;
        ugrdKpiResultStatus.DataBind();

        try
        {
            this.SetResutlGraph(rDs);
        }
        catch (Exception e)
        {
            string msg = e.Message;
        }
    }
コード例 #2
0
ファイル: BSC0604S1.aspx.cs プロジェクト: schifflee/bscgit
    public void SetChildKpiGrid()
    {
        Biz_Bsc_Kpi_Result objRst  = new Biz_Bsc_Kpi_Result();
        DataSet            dsChild = objRst.GetChildKpiStatustList(this.IEstTermRefID, this.IKpiRefID, this.IYMD);

        ugrdInterface.Clear();
        if (dsChild.Tables.Count > 0)
        {
            ugrdInterface.DisplayLayout.AutoGenerateColumns = true;
            ugrdInterface.DataSource = dsChild.Tables[0].DefaultView;
            ugrdInterface.DataBind();

            if (ugrdInterface.Columns.Exists("YMD"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("YMD");
                ugc.MergeCells = true;
                ugc.Width      = Unit.Pixel(50);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Center;
                ugc.Header.Caption            = "년월";
            }

            if (ugrdInterface.Columns.Exists("KPI_CODE"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("KPI_CODE");
                ugc.Width = Unit.Pixel(50);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Center;
                ugc.Header.Caption            = "코드";
            }

            if (ugrdInterface.Columns.Exists("KPI_NAME"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("KPI_NAME");
                ugc.Width = Unit.Pixel(120);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Left;
                ugc.Header.Caption            = "지표명";
            }

            if (ugrdInterface.Columns.Exists("KPI_LEVEL"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("KPI_LEVEL");
                ugc.Width = Unit.Pixel(20);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Center;
                ugc.Header.Caption            = "L";
            }

            if (ugrdInterface.Columns.Exists("DEPT_NAME"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("DEPT_NAME");
                ugc.Width = Unit.Pixel(100);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Left;
                ugc.Header.Caption            = "부서명";
            }

            if (ugrdInterface.Columns.Exists("CHAMPION_EMP_NAME"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("CHAMPION_EMP_NAME");
                ugc.Width = Unit.Pixel(80);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Left;
                ugc.Header.Caption            = "챔피언";
            }

            if (ugrdInterface.Columns.Exists("TARGET_MS"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("TARGET_MS");
                ugc.Width = Unit.Pixel(80);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Right;
                ugc.Format         = "#,###,###,###,###,###,###,###,##0.####";
                ugc.Header.Caption = "당월목표";
            }

            if (ugrdInterface.Columns.Exists("RESULT_MS"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("RESULT_MS");
                ugc.Width = Unit.Pixel(80);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Right;
                ugc.Format         = "#,###,###,###,###,###,###,###,##0.####";
                ugc.Header.Caption = "당월실적";
            }

            if (ugrdInterface.Columns.Exists("ARATE_MS"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("ARATE_MS");
                ugc.Width = Unit.Pixel(60);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Right;
                ugc.Format         = "#,###,###,###,###,###,###,###,##0.##";
                ugc.Header.Caption = "달성율";
            }

            if (ugrdInterface.Columns.Exists("TARGET_TS"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("TARGET_TS");
                ugc.Width = Unit.Pixel(80);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Right;
                ugc.Format         = "#,###,###,###,###,###,###,###,##0.####";
                ugc.Header.Caption = "누계목표";
            }

            if (ugrdInterface.Columns.Exists("RESULT_TS"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("RESULT_TS");
                ugc.Width = Unit.Pixel(80);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Right;
                ugc.Format         = "#,###,###,###,###,###,###,###,##0.####";
                ugc.Header.Caption = "누계실적";
            }

            if (ugrdInterface.Columns.Exists("ARATE_TS"))
            {
                UltraGridColumn ugc = ugrdInterface.Columns.FromKey("ARATE_TS");
                ugc.Width = Unit.Pixel(60);
                ugc.CellStyle.HorizontalAlign = HorizontalAlign.Right;
                ugc.Format         = "#,###,###,###,###,###,###,###,##0.##";
                ugc.Header.Caption = "달성율";
            }
        }
    }
コード例 #3
0
ファイル: BSC0604S1.aspx.cs プロジェクト: schifflee/bscgit
    public void SetMonthlyResultGraph()
    {
        Biz_Bsc_Kpi_Info objKpi = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID);

        lblKpiCode.Text         = objKpi.Ikpi_code;
        lblKpiName.Text         = objKpi.Ikpi_name;
        lblResultInputType.Text = objKpi.Iresult_input_type_name;
        lblUnitName.Text        = objKpi.Iunit_name;

        Biz_Bsc_Kpi_Result objBSC = new Biz_Bsc_Kpi_Result(this.IEstTermRefID, this.IKpiRefID, this.IYMD);
        DataSet            rDs    = objBSC.GetResultAnalysisList(this.IEstTermRefID, this.IKpiRefID, this.IYMD, this.IGoalTong_YN);

        DataTable dtMs = new DataTable("TBL_MS");
        DataTable dtTs = new DataTable("TBL_TS");

        dtMs.Columns.Add("MM", typeof(string));
        dtMs.Columns.Add("TARGET", typeof(double));
        dtMs.Columns.Add("RESULT", typeof(double));

        dtTs.Columns.Add("MM", typeof(string));
        dtTs.Columns.Add("TARGET", typeof(double));
        dtTs.Columns.Add("RESULT", typeof(double));

        double dTargetMs = 0;
        double dTargetTs = 0;
        double dResultMs = 0;
        double dResultTs = 0;

        DataRow[] arrDr = null;
        DataRow   rDr   = null;

        if (rDs.Tables.Count > 0)
        {
            if (rDs.Tables[0].Rows.Count > 0)
            {
                string sFilter = "KPI_REF_ID=" + this.IKpiRefID.ToString() + " AND YMD='" + this.IYMD + "'";
                arrDr = rDs.Tables[0].Select(sFilter);

                if (arrDr.GetLength(0) > 0)
                {
                    dTargetMs = double.Parse(arrDr[0]["TARGET_MS"].ToString());
                    dTargetTs = double.Parse(arrDr[0]["TARGET_TS"].ToString());
                    dResultMs = double.Parse(arrDr[0]["RESULT_MS"].ToString());
                    dResultTs = double.Parse(arrDr[0]["RESULT_TS"].ToString());
                }
            }
        }

        rDr           = dtMs.NewRow();
        rDr["MM"]     = this.IYMD;
        rDr["TARGET"] = dTargetMs;
        rDr["RESULT"] = dResultMs;
        dtMs.Rows.Add(rDr);

        rDr           = dtTs.NewRow();
        rDr["MM"]     = this.IYMD;
        rDr["TARGET"] = dTargetTs;
        rDr["RESULT"] = dResultTs;
        dtTs.Rows.Add(rDr);

        DundasCharts.DundasChartBase(chartMs, ChartImageType.Flash, 360, 200
                                     , 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);

        Series serTargetMs = DundasCharts.CreateSeries(chartMs, "Series1", "Default", "계획", null, SeriesChartType.Column, 1, GetChartColor(0), GetChartColor(0), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series serResultMs = DundasCharts.CreateSeries(chartMs, "Series2", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor(1), GetChartColor(1), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        serTargetMs.ToolTip = "#VALY{N0}";
        serResultMs.ToolTip = "#VALY{N0}";

        chartMs.ChartAreas[chartMs.Series[serTargetMs.Name].ChartArea].AxisY.LabelStyle.Format = "N0";
        chartMs.ChartAreas[chartMs.Series[serTargetMs.Name].ChartArea].Area3DStyle.Enable3D    = true;
        chartMs.ToolTip = "#VALY{N0}";


        chartMs.DataSource        = dtMs.DefaultView;
        serTargetMs.ValueMemberX  = "MM";
        serTargetMs.ValueMembersY = "TARGET";
        serResultMs.ValueMembersY = "RESULT";

        chartMs.DataBind();

        DundasCharts.DundasChartBase(chartTs, ChartImageType.Flash, 360, 200
                                     , 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);

        Series serTargetTs = DundasCharts.CreateSeries(chartTs, "Series1", "Default", "계획", null, SeriesChartType.Column, 1, GetChartColor(0), GetChartColor(0), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series serResultTs = DundasCharts.CreateSeries(chartTs, "Series2", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor(1), GetChartColor(1), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        serTargetTs.ToolTip = "#VALY{N0}";
        serResultTs.ToolTip = "#VALY{N0}";

        chartTs.ChartAreas[chartTs.Series[serTargetTs.Name].ChartArea].AxisY.LabelStyle.Format = "N0";
        chartTs.ChartAreas[chartTs.Series[serTargetTs.Name].ChartArea].Area3DStyle.Enable3D    = true;
        chartTs.ToolTip = "#VALY{N0}";

        chartTs.DataSource        = dtTs.DefaultView;
        serTargetTs.ValueMemberX  = "MM";
        serTargetTs.ValueMembersY = "TARGET";
        serResultTs.ValueMembersY = "RESULT";

        chartTs.DataBind();

        if (objKpi.Iresult_input_type == "KPI")
        {
            this.SetChildKpiGrid();
        }
        else
        {
            this.SetInterfaceGrid();
        }
    }