Ejemplo n.º 1
0
    protected void SetFormData_Detail()
    {
        //Biz_Bsc_Kpi_Target objBSC = new Biz_Bsc_Kpi_Target();
        //DataTable dtBsc = objBSC.GetAllList_Detail(intEstTermID, intKpiRefID, intTergetVersion).Tables[0];


        MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target objBSC = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target();
        DataTable dtBsc = objBSC.GetAllList_Detail(intEstTermID, intKpiRefID, intTergetVersion).Tables[0];

        UltraDetailList.DataSource = dtBsc;
        UltraDetailList.DataBind();
    }
Ejemplo n.º 2
0
    protected void iBtnUpdate_Click(object sender, EventArgs e)
    {
        //DoUpating();


        int             iesttermRefId;
        int             ikpiRefId;
        string          iymd;
        int             itxrUser;
        int             itargetVersionId;
        double          icalcMs;
        double          icalcTs;
        string          targetYM;
        TemplatedColumn template;
        CellItem        cellItemObject;

        Infragistics.WebUI.WebDataInput.WebNumericEdit calcMsTxt;
        Infragistics.WebUI.WebDataInput.WebNumericEdit calcTsTxt;
        System.Web.UI.HtmlControls.HtmlInputText       txtTargetMM;

        DataTable dtKpiTarget = new DataTable();

        dtKpiTarget.Columns.Add("ESTTERM_REF_ID");
        dtKpiTarget.Columns.Add("KPI_REF_ID");
        dtKpiTarget.Columns.Add("YMD");
        dtKpiTarget.Columns.Add("UPDATE_USER");
        dtKpiTarget.Columns.Add("TARGET_VERSION_ID");
        dtKpiTarget.Columns.Add("TARGET_MS");
        dtKpiTarget.Columns.Add("TARGET_TS");

        foreach (Infragistics.WebUI.UltraWebGrid.UltraGridRow row in this.ugridKpiTargetList.Rows)
        {
            string result_input_type = DataTypeUtility.GetValue(row.Cells.FromKey("resultInputType").Value);

            MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Result objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Result();
            iesttermRefId    = DataTypeUtility.GetToInt32(row.Cells.FromKey("estTermRefId").Value);
            ikpiRefId        = DataTypeUtility.GetToInt32(row.Cells.FromKey("kpiRefId").Value);
            iymd             = DataTypeUtility.GetValue(row.Cells.FromKey("estYmd").Value);
            itargetVersionId = DataTypeUtility.GetToInt32(row.Cells.FromKey("kpiTargetVersionId").Value);
            itxrUser         = this.gUserInfo.Emp_Ref_ID;

            if (result_input_type.Equals("MAN"))
            {
                for (int i = 1; i < 13; i++)
                {
                    string month = i.ToString().PadLeft(2, '0');

                    template       = (TemplatedColumn)row.Cells.FromKey(string.Format("m{0}Target", month)).Column;
                    cellItemObject = (CellItem)template.CellItems[row.Index];
                    calcMsTxt      = (Infragistics.WebUI.WebDataInput.WebNumericEdit)cellItemObject.FindControl(string.Format("txtM{0}Ms", month));
                    calcTsTxt      = (Infragistics.WebUI.WebDataInput.WebNumericEdit)cellItemObject.FindControl(string.Format("txtM{0}Ts", month));
                    txtTargetMM    = (System.Web.UI.HtmlControls.HtmlInputText)cellItemObject.FindControl(string.Format("txtTarget{0}", month));
                    icalcMs        = calcMsTxt.ValueDouble;
                    icalcTs        = calcTsTxt.ValueDouble;

                    if (string.IsNullOrEmpty(txtTargetMM.Value) == false)
                    {
                        targetYM = row.Cells.FromKey("perYear").Value.ToString() + txtTargetMM.Value;

                        DataRow rowKpiTarget = dtKpiTarget.NewRow();

                        rowKpiTarget["ESTTERM_REF_ID"]    = iesttermRefId;
                        rowKpiTarget["KPI_REF_ID"]        = ikpiRefId;
                        rowKpiTarget["YMD"]               = targetYM;
                        rowKpiTarget["UPDATE_USER"]       = targetYM;
                        rowKpiTarget["TARGET_VERSION_ID"] = itargetVersionId;
                        rowKpiTarget["TARGET_MS"]         = icalcMs;
                        rowKpiTarget["TARGET_TS"]         = icalcTs;

                        dtKpiTarget.Rows.Add(rowKpiTarget);
                    }
                }
            }
        }

        //MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Result objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Result();
        //objBSC.UpdateKpiTarget(null, null, iesttermRefId, ikpiRefId, targetYM, itxrUser, itargetVersionId, icalcMs, icalcTs);

        MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target bizBscKpiTarget = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target();

        int okCnt = bizBscKpiTarget.ModifyData(dtKpiTarget);

        if (okCnt > 0)
        {
            ltrScript.Text = JSHelper.GetAlertScript("저장이 완료되었습니다.");
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript("오류가 발생하였습니다.");
        }
    }
Ejemplo n.º 3
0
    private void DoCharting(int kpi_ref_id, string kpi_name)
    {
        chartMM.Visible  = true;
        chartDal.Visible = true;

        int chartWidth  = 500;
        int chartHeight = 250;


        lblKpiName1.Text = kpi_name;
        lblKpiName2.Text = kpi_name;

        MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target bizBscKpiTarget = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target();
        DataTable dtBscKpiTarget = bizBscKpiTarget.GetBscKpiTargetGoalTongMM_DB(IEstTermRefID
                                                                                , kpi_ref_id
                                                                                , "");

        // 목표 실적 그래프
        MSCharts.DundasChartBase(chartMM
                                 , ChartImageType.Jpeg
                                 , chartWidth
                                 , chartHeight
                                 , 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
                                 , MsGradientType.TopBottom
                                 , MsAntiAliasing.None);

        chartMM.DataSource = dtBscKpiTarget;

        Series series1 = MSCharts.CreateSeries(chartMM, "serTarget", "Default", "Target", null, SeriesChartType.Column, 1, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2 = MSCharts.CreateSeries(chartMM, "serGoal", "Default", "Goal", null, SeriesChartType.Column, 1, GetChartColor(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series3 = MSCharts.CreateSeries(chartMM, "serActl", "Default", "실적", null, SeriesChartType.Line, 1, GetChartColor(2), GetChartColor(2), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //series3.YAxisType = AxisType.Secondary;

        //series1.ValueMembersY = "TARGET_MS";
        //series2.ValueMembersY = "RESULT_MS";
        //series3.ValueMembersY = "GR_RATE_MS";
        //series1.ValueMemberX = "MM";


        string series2_col = "GOAL_MS";
        string series1_col = "TARGET_MS";
        string series3_col = "RESULT_MS";

        if (rdoMethod.SelectedIndex.Equals(1))
        {
            series2_col = "GOAL_TS";
            series1_col = "TARGET_TS";
            series3_col = "RESULT_TS";
        }


        series1.YValueMembers = series1_col;
        series2.YValueMembers = series2_col;
        series3.YValueMembers = series3_col;
        series1.XValueMember  = "MM";

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

        string sChartArea = chartMM.Series[series2.Name].ChartArea;

        chartMM.ChartAreas[sChartArea].AxisY.LabelStyle.Format = "N0";
        //chartMM.ChartAreas[sChartArea].AxisY2.LabelStyle.Format = "N0";

        //DundasAnimations.DundasChartBase(chartMM, AnimationTheme.None, -1, -1, false, 1);
        //DundasAnimations.GrowingAnimation(chartMM, series1, 1.0, 1.0, true);
        //DundasAnimations.GrowingAnimation(chartMM, series2, 2.0, 2.0, true);
        //DundasAnimations.GrowingAnimation(chartMM, series3, 2.0, 1.0, true);

        chartMM.DataBind();


        // 달성율 그래프
        MSCharts.DundasChartBase(chartDal
                                 , ChartImageType.Jpeg
                                 , chartWidth
                                 , chartHeight
                                 , 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
                                 , MsGradientType.TopBottom
                                 , MsAntiAliasing.None);

        chartDal.DataSource = dtBscKpiTarget;

        Series series1D = MSCharts.CreateSeries(chartDal, "serTarget", "Default", "Target", null, SeriesChartType.Column, 1, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2D = MSCharts.CreateSeries(chartDal, "serGoal", "Default", "Goal", null, SeriesChartType.Column, 1, GetChartColor(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //series3.YAxisType = AxisType.Secondary;

        //series1.ValueMembersY = "TARGET_MS";
        //series2.ValueMembersY = "RESULT_MS";
        //series3.ValueMembersY = "GR_RATE_MS";
        //series1.ValueMemberX = "MM";


        string series2D_col = "GOAL_DAL_MS";
        string series1D_col = "TARGET_DAL_MS";

        if (rdoMethod.SelectedIndex.Equals(1))
        {
            series2D_col = "GOAL_DAL_TS";
            series1D_col = "TARGET_DAL_TS";
        }


        series1D.YValueMembers = series1D_col;
        series2D.YValueMembers = series2D_col;
        series1D.XValueMember  = "MM";

        series1D.ToolTip = "#VALY{N0}";
        series2D.ToolTip = "#VALY{N0}";

        string sChartAreaD = chartDal.Series[series2D.Name].ChartArea;

        chartDal.ChartAreas[sChartAreaD].AxisY.LabelStyle.Format = "N0";
        //chartDal.ChartAreas[sChartAreaD].AxisY2.LabelStyle.Format = "N0";

        //DundasAnimations.DundasChartBase(chartDal, AnimationTheme.None, -1, -1, false, 1);
        //DundasAnimations.GrowingAnimation(chartDal, series1, 1.0, 1.0, true);
        //DundasAnimations.GrowingAnimation(chartDal, series2, 2.0, 2.0, true);
        //DundasAnimations.GrowingAnimation(chartDal, series3, 2.0, 1.0, true);

        chartDal.DataBind();
    }
Ejemplo n.º 4
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        string col_goal       = "GOAL_MS";
        string col_target     = "TARGET_MS";
        string col_result     = "RESULT_MS";
        string col_goal_dal   = "GOAL_DAL_MS";
        string col_target_dal = "TARGET_DAL_MS";

        if (rdoMethod.SelectedIndex.Equals(1))
        {
            col_goal       = "GOAL_TS";
            col_target     = "TARGET_TS";
            col_result     = "RESULT_TS";
            col_goal_dal   = "GOAL_DAL_TS";
            col_target_dal = "TARGET_DAL_TS";
        }

        double goal_p   = 0;
        double target_p = 0;

        double result = 0;

        double goal_dal   = 0;
        double target_dal = 0;

        DataRowView drw = (DataRowView)e.Data;

        int kpi_ref_id = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("KPI_REF_ID").Value);

        // 목표
        MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target_Goal bizBscKpiTargetGoal = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target_Goal();

        DataTable dtBscKpiTargetGoal = bizBscKpiTargetGoal.GetBscKpiTargetGoalTong_DB(IEstTermRefID
                                                                                      , kpi_ref_id
                                                                                      , IYmd);

        if (dtBscKpiTargetGoal.Rows.Count > 0)
        {
            goal_p   = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiTargetGoal.Rows[0][col_goal]).Replace("-", "0"));
            goal_dal = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiTargetGoal.Rows[0][col_goal_dal]).Replace("-", "0"));
        }

        // 실적
        MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Result bizBscKpiResult = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Result();

        DataTable dtBscKpiResult = bizBscKpiResult.GetBscKpiTargetGoalTong_DB(IEstTermRefID
                                                                              , kpi_ref_id
                                                                              , IYmd);

        if (dtBscKpiResult.Rows.Count > 0)
        {
            result = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiResult.Rows[0][col_result]).Replace("-", "0"));
        }


        // 달성율
        MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target bizBscKpiTarget = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target();

        DataTable dtBscKpiTarget = bizBscKpiTarget.GetBscKpiTargetGoalTong_DB(IEstTermRefID
                                                                              , kpi_ref_id
                                                                              , IYmd);

        if (dtBscKpiTarget.Rows.Count > 0)
        {
            target_p   = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiTarget.Rows[0][col_target]).Replace("-", "0"));
            target_dal = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiTarget.Rows[0][col_target_dal]).Replace("-", "0"));
        }

        e.Row.Cells.FromKey("GOAL_P").Value     = goal_p;
        e.Row.Cells.FromKey("TARGET_P").Value   = target_p;
        e.Row.Cells.FromKey("RESULT").Value     = result;
        e.Row.Cells.FromKey("GOAL_DAL").Value   = goal_dal;
        e.Row.Cells.FromKey("TARGET_DAL").Value = target_dal;
    }