コード例 #1
0
ファイル: BSC0306M1.aspx.cs プロジェクト: schifflee/bscgit
    public void SetDashBoardKpiGrid()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard();
        DataSet rDs = objBSC.GetDashBoardKpiList(this.IEstTermRefID);


        ugrdKPIPool.Clear();
        ugrdKPIPool.DataSource = rDs.Tables[0].DefaultView;
        ugrdKPIPool.DataBind();

        //lblCountRow.Text = "Total Rows : " + ds.Tables[0].Rows.Count.ToString();
    }
コード例 #2
0
ファイル: BSC0306M1.aspx.cs プロジェクト: schifflee/bscgit
    protected int RemoveKpiDashBoard()
    {
        CheckBox        chk;
        UltraGridRow    row;
        TemplatedColumn col;
        bool            isOK        = false;
        string          isSuccessed = "0";
        int             intTxrUser  = gUserInfo.Emp_Ref_ID;
        int             intRtn      = 0;
        int             intRow      = ugrdKPIPool.Rows.Count;

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

        for (int i = 0; i < intRow; i++)
        {
            row = ugrdKPIPool.Rows[i];
            col = (TemplatedColumn)row.Band.Columns.FromKey("selchk");
            chk = (CheckBox)((CellItem)col.CellItems[row.BandIndex]).FindControl("cBox");

            if (chk.Checked)
            {
                chk.Checked = false;


                //ltrScript.Text = JSHelper.GetAlertScript("그룹을 선택해주십시오.", false);


                int iKpiCode        = Convert.ToInt32(row.Cells.FromKey("KPI_REF_ID").Value.ToString());
                int iEstterm_ref_id = PageUtility.GetIntByValueDropDownList(ddlEstTermInfo);
                int iuser           = intTxrUser;


                intRtn += objBSC.DeleteData(iEstterm_ref_id
                                            , iKpiCode
                                            , gUserInfo.Emp_Ref_ID);
            }
        }

        return(intRtn);
    }
コード例 #3
0
ファイル: BSC1010S1.aspx.cs プロジェクト: schifflee/bscgit
    private void SetKpiStatusGraph()
    {
        this.SetParameter(this.IEstDeptID);

        MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard();
        DataSet rDs = objBSC.GetAllList(this.IEstTermRefID);

        int cntRow = 0;
        int cntCol = 0;

        int    intEsttermRefID = 0;
        int    intKpiRefID     = 0;
        string strTrendType    = "";
        string strKpiName      = "";
        string strTypeName     = "";

        cntRow = rDs.Tables[0].Rows.Count;
        cntCol = rDs.Tables[0].Columns.Count;

        Chart objChart = null;

        for (int i = 0; i < cntRow; i++)
        {
            intEsttermRefID = Convert.ToInt32(rDs.Tables[0].Rows[i]["ESTTERM_REF_ID"].ToString());
            intKpiRefID     = Convert.ToInt32(rDs.Tables[0].Rows[i]["KPI_REF_ID"].ToString());
            strTrendType    = Convert.ToString(rDs.Tables[0].Rows[i]["SELECT_TYPE"].ToString());
            strKpiName      = Convert.ToString(rDs.Tables[0].Rows[i]["KPI_NAME"].ToString());
            strTypeName     = Convert.ToString(rDs.Tables[0].Rows[i]["SELECT_TYPE_NAME"].ToString());

            DataSet dsGraph = objBSC.GetDashBoardForKpiAnalysis(intEsttermRefID
                                                                , intKpiRefID
                                                                , this.IYmd
                                                                , "99999999"
                                                                , this.ISumType);

            switch (i)
            {
            case 0:
                objChart         = chtKPI1;
                objChart.Visible = true;
                break;

            case 1:
                objChart         = chtKPI2;
                objChart.Visible = true;
                break;

            case 2:
                objChart         = chtKPI3;
                objChart.Visible = true;
                break;

            case 3:
                objChart         = chtKPI4;
                objChart.Visible = true;
                break;

            case 4:
                objChart         = chtKPI5;
                objChart.Visible = true;
                break;

            case 5:
                objChart         = chtKPI6;
                objChart.Visible = true;
                break;

            default:
                return;
            }

            DundasCharts.DundasChartBase(objChart
                                         , ChartImageType.Flash
                                         , 300
                                         , 100
                                         , BorderSkinStyle.Emboss, Color.FromArgb(26, 59, 105), 2
                                         , Color.FromArgb(211, 223, 240)
                                         , Color.FromArgb(255, 255, 255)
                                         , Color.FromArgb(37, 58, 118)
                                         , ChartDashStyle.Solid
                                         , -1
                                         , ChartHatchStyle.None
                                         , GradientType.TopBottom
                                         , AntiAliasing.None);

            Series serKpi = DundasCharts.CreateSeries(objChart
                                                      , strTypeName
                                                      , objChart.ChartAreas[0].Name
                                                      , strTypeName
                                                      , null
                                                      , SeriesChartType.FastLine
                                                      , 2
                                                      , GetSignalColor(i)
                                                      , GetChartColor(i)
                                                      , Color.FromArgb(64, 0, 0, 0)
                                                      , 1
                                                      , 9
                                                      , Color.FromArgb(64, 64, 64));

            objChart.ChartAreas[objChart.Series[serKpi.Name].ChartArea].AxisX.Interval          = 4;
            objChart.ChartAreas[objChart.Series[serKpi.Name].ChartArea].Area3DStyle.Enable3D    = false;
            objChart.ChartAreas[objChart.Series[serKpi.Name].ChartArea].AxisY2.Enabled          = AxisEnabled.False;
            objChart.ChartAreas[objChart.Series[serKpi.Name].ChartArea].AxisY.LabelStyle.Format = "#,##0";


            //string strHerf = HttpContext.Current.Request.Url.ToString().Substring(0, HttpContext.Current.Request.Url.ToString().LastIndexOf('/'))
            //                                                                        + "/BSC0304S2.aspx?"
            //                                                                        + "ESTTERM_REF_ID=" + intEsttermRefID.ToString()
            //                                                                        + "&KPI_REF_ID="    + intKpiRefID.ToString()
            //                                                                        + "&YMD="           + this.IYmd;
            string strURL  = "gfOpenWindow('../BSC/BSC0304S2.aspx?iType=POP&ESTTERM_REF_ID=" + intEsttermRefID.ToString() + "&KPI_REF_ID=" + intKpiRefID.ToString() + "&YMD=" + this.IYmd + ", 840, 600, 'no', 'no');";
            string strHerf = HttpContext.Current.Request.Url.ToString().Substring(0, HttpContext.Current.Request.Url.ToString().LastIndexOf('/')) + strURL;


            objChart.DataSource  = dsGraph;
            serKpi.ValueMembersY = "RESULT_VALUE";
            serKpi.ValueMemberX  = "YMD";
            objChart.DataBind();
            objChart.Legends[0].Enabled = false;

            objChart.Titles[0].Text = strKpiName;
            objChart.Titles[0].Href = strHerf;

            dsGraph  = null;
            serKpi   = null;
            objChart = null;
        }
    }
コード例 #4
0
ファイル: BSC0306M1.aspx.cs プロジェクト: schifflee/bscgit
    protected int SaveDashBoardKpi()
    {
        CheckBox        chk;
        UltraGridRow    row;
        TemplatedColumn col;
        bool            isOK        = false;
        string          isSuccessed = "0";
        int             intTxrUser  = gUserInfo.Emp_Ref_ID;
        int             intRtn      = 0;
        int             intRow      = ugrdKPIPool.Rows.Count;

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

        DropDownList    ddlTempSelectType;
        TemplatedColumn selecttype_col = (TemplatedColumn)ugrdKPIPool.Columns.FromKey("SELECT_TYPE");

        DropDownList    ddlTempGraphType;
        TemplatedColumn graphtype_col = (TemplatedColumn)ugrdKPIPool.Columns.FromKey("GRAPH_TYPE");

        DropDownList    ddlTempSortOrder;
        TemplatedColumn sortorder_col = (TemplatedColumn)ugrdKPIPool.Columns.FromKey("SORT_ORDER");



        for (int i = 0; i < intRow; i++)
        {
            row = ugrdKPIPool.Rows[i];
            col = (TemplatedColumn)row.Band.Columns.FromKey("selchk");
            chk = (CheckBox)((CellItem)col.CellItems[row.BandIndex]).FindControl("cBox");

            if (true)
            {
                chk.Checked = false;



                int iKpiCode        = Convert.ToInt32(row.Cells.FromKey("KPI_REF_ID").Value.ToString());
                int iEstterm_ref_id = PageUtility.GetIntByValueDropDownList(ddlEstTermInfo);
                ddlTempSelectType = (DropDownList)((CellItem)selecttype_col.CellItems[ugrdKPIPool.Rows[i].BandIndex]).FindControl("ddlSelectType");
                //string iSelect_type = row.Cells.FromKey("SELECT_TYPE").ToString();
                ddlTempGraphType = (DropDownList)((CellItem)graphtype_col.CellItems[ugrdKPIPool.Rows[i].BandIndex]).FindControl("ddlGraphType");

                //string iGraph_type = Convert.ToString(row.Cells.FromKey("GRAPH_TYPE").Value);

                ddlTempSortOrder = (DropDownList)((CellItem)sortorder_col.CellItems[ugrdKPIPool.Rows[i].BandIndex]).FindControl("ddlSortOrder");


                // int iSort_order = Convert.ToInt32(row.Cells.FromKey("SORT_ORDER").Value.ToString());
                int iuser = intTxrUser;


                intRtn += objBSC.UpdateData(iEstterm_ref_id
                                            , iKpiCode
                                            , ddlTempSelectType.SelectedValue
                                            , ddlTempGraphType.SelectedValue
                                            , Convert.ToInt32(ddlTempSortOrder.SelectedValue)
                                            , gUserInfo.Emp_Ref_ID);
            }
        }

        return(intRtn);
    }
コード例 #5
0
    //private void SetResultGrid()
    //{

    //    Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info();



    //    DataSet ds = objBSC.GetKpiListForResultAnalysis(this.IEstTermRefID
    //                                                                   , this.IYmd
    //                                                                   , ""
    //                                                                   , ""
    //                                                                   , ""
    //                                                                   , ""
    //                                                                   , this.IDeptID
    //                                                                   , 1 // 우수
    //                                                                   , this.ISumType
    //                                                                   , ""
    //                                                                   , "");

    //    if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
    //    {
    //        ds.Tables[0].Columns.Add("RANK", typeof(int));
    //        ds.Tables[0].Columns.Add("SORT_TYPE", typeof(string));

    //        DataTable dataTable = null;

    //        // 순위정렬 성격에 따라 처리 내용
    //        dataTable = PageUtility.FilterSortData(ds.Tables[0], "", "ACHIEVE_RATE_DIFF DESC");
    //        SetRowNum(dataTable, "H");

    //        // DataRow 삭제
    //        DeleteExtraRowsByRowNum(dataTable, 10);

    //        ugrdResultStatus.Clear();
    //        ugrdResultStatus.DataSource = dataTable;
    //        ugrdResultStatus.DataBind();
    //    }

    //}

    private void SetKpiStatusGraph()
    {
        this.SetParameter();

        MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard();
        DataSet rDs = objBSC.GetAllList(this.IEstTermRefID);

        int cntRow = 0;
        int cntCol = 0;


        int    intEsttermRefID = 0;
        int    intKpiRefID     = 0;
        string strTrendType    = "";
        string strKpiName      = "";
        string strTypeName     = "";

        cntRow = rDs.Tables[0].Rows.Count;
        cntCol = rDs.Tables[0].Columns.Count;
        Dundas.Charting.WebControl.Chart objChart = null;

        for (int i = 0; i < cntRow; i++)
        {
            intEsttermRefID = Convert.ToInt32(rDs.Tables[0].Rows[i]["ESTTERM_REF_ID"].ToString());
            intKpiRefID     = Convert.ToInt32(rDs.Tables[0].Rows[i]["KPI_REF_ID"].ToString());
            strTrendType    = Convert.ToString(rDs.Tables[0].Rows[i]["SELECT_TYPE"].ToString());
            strKpiName      = Convert.ToString(rDs.Tables[0].Rows[i]["KPI_NAME"].ToString());
            strTypeName     = Convert.ToString(rDs.Tables[0].Rows[i]["SELECT_TYPE_NAME"].ToString());

            DataSet dsGraph = objBSC.GetDashBoardForKpiAnalysis(intEsttermRefID, intKpiRefID, "00000000", this.IYmd, this.ISumType);
            //DataSet dsGraph = objBSC.GetDashBoardForKpiAnalysis(intEsttermRefID, intKpiRefID, this.IYmd, "99999999", this.ISumType);



            switch (i)
            {
            case 0:
                objChart         = chtKPI1;
                objChart.Visible = true;
                break;

            case 1:
                objChart         = chtKPI2;
                objChart.Visible = true;
                break;

            case 2:
                objChart         = chtKPI3;
                objChart.Visible = true;
                break;

            case 3:
                objChart         = chtKPI4;
                objChart.Visible = true;
                break;

            case 4:
                objChart         = chtKPI5;
                objChart.Visible = true;
                break;

            case 5:
                objChart         = chtKPI6;
                objChart.Visible = true;
                break;

            default:
                return;
            }

            DundasCharts.DundasChartBase(objChart
                                         , Dundas.Charting.WebControl.ChartImageType.Flash
                                         , 400, 200
                                         , Dundas.Charting.WebControl.BorderSkinStyle.None
                                         , Color.FromArgb(181, 64, 1)
                                         , 0
                                         , 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);

            //MSCharts.DundasChartBase(objChart, ChartImageType.Jpeg, 400, 300
            //    , BorderSkinStyle.Emboss, Color.FromArgb(26, 59, 105), 2
            //    , Color.FromArgb(211, 223, 240)
            //    , Color.FromArgb(255, 255, 255), Color.FromArgb(37, 58, 118), ChartDashStyle.Solid
            //    , -1
            //    , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);



            objChart.DataSource = dsGraph;

            Dundas.Charting.WebControl.Series series1 = DundasCharts.CreateSeries(objChart, objChart.ChartAreas[0].Name,
                                                                                  "Default",
                                                                                  strKpiName, null, Dundas.Charting.WebControl.SeriesChartType.Column, 1,
                                                                                  GetSignalColor(i), GetChartColor2(i), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));


            objChart.ChartAreas[0].AxisX.Interval = 1;

            string strHerf = HttpContext.Current.Request.Url.ToString().Substring(0, HttpContext.Current.Request.Url.ToString().LastIndexOf('/')) + "/BSC0304S2.aspx?ESTTERM_REF_ID=" + intEsttermRefID.ToString() + "&KPI_REF_ID=" + intKpiRefID.ToString() + "&YMD=" + this.IYmd;


            series1.Color        = GetChartColor2(i);
            series1.BorderWidth  = 0;
            series1.ShadowOffset = 0;
            //series1.BorderColor = GetChartColor2(0);
            series1.Label = "#VALY{N0}";

            series1.ValueMembersY = "RESULT_VALUE";
            series1.ValueMemberX  = "YMD";


            series1.ToolTip = "#VALY{N0}";

            objChart.Series[objChart.ChartAreas[0].Name]["PointWidth"] = "0.5";

            //string sChartArea2 = chart.Series[series2.Name].ChartArea;
            //chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format = "P0";
            //chart.ChartAreas[sChartArea2].AxisY.IsStartedFromZero = false;
            //chart.ChartAreas[sChartArea2].AxisX.IsMarginVisible = true;
            //chart.ChartAreas[sChartArea2].AxisY2.Enabled = AxisEnabled.False;

            //DoSettingChartStyles(chart,"#%");

            // Show as 3D
            //if (rdoChartType.SelectedIndex == 0)
            //    chart.ChartAreas[sChartArea2].Area3DStyle.Enable3D = false;
            //else
            //    chart.ChartAreas[sChartArea2].Area3DStyle.Enable3D = true;

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

            objChart.DataBind();

            dsGraph = null;

            objChart = null;
        }
    }