Exemplo n.º 1
0
    private void DoInitializing()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtYear = bizNHIT.GetYear_DB();

        if (dtYear.Rows.Count > 0)
        {
            ddlYear.DataSource     = dtYear;
            ddlYear.DataTextField  = "CR_YEAR";
            ddlYear.DataValueField = "CR_YEAR";
            ddlYear.DataBind();
        }
        else
        {
            ddlYear.Items.Add(new ListItem(DateTime.Now.Year.ToString(), DateTime.Now.Year.ToString()));
        }

        DataTable dtMonth = bizNHIT.GetMonth_DB();

        if (dtMonth.Rows.Count > 0)
        {
            ddlMonth.DataSource     = dtMonth;
            ddlMonth.DataTextField  = "CR_MONTH";
            ddlMonth.DataValueField = "CR_MONTH";
            ddlMonth.DataBind();
        }
        else
        {
            ddlMonth.Items.Add(new ListItem(DateTime.Now.Month.ToString(), DateTime.Now.Month.ToString()));
        }
    }
Exemplo n.º 2
0
    private void DoBinding_ETC()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT_B = bizNHIT.GetEtc(GRP_ONE_ID.B.ToString()
                                            , CR_YEAR
                                            , CR_MONTH
                                            , TG_GUBUN);

        UltraWebGrid3.DataSource = dtNHIT_B;
        UltraWebGrid3.DataBind();

        DataTable dtNHIT_C = bizNHIT.GetEtc(GRP_ONE_ID.C.ToString()
                                            , CR_YEAR
                                            , CR_MONTH
                                            , TG_GUBUN);

        UltraWebGrid4.DataSource = dtNHIT_C;
        UltraWebGrid4.DataBind();

        DataTable dtNHIT_D = bizNHIT.GetEtc(GRP_ONE_ID.D.ToString()
                                            , CR_YEAR
                                            , CR_MONTH
                                            , TG_GUBUN);

        UltraWebGrid5.DataSource = dtNHIT_D;
        UltraWebGrid5.DataBind();
    }
Exemplo n.º 3
0
    private void DoBinding_JeonSa()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetJeonSa(GRP_ONE_ID.A.ToString()
                                             , (int)GRP_TWO_ID.GTO_10
                                             , CR_YEAR
                                             , CR_MONTH
                                             , "T");

        UltraWebGrid1.DataSource = dtNHIT;
        UltraWebGrid1.DataBind();

        //dtNHIT = bizNHIT.GetJeonSa(GRP_ONE_ID.A.ToString()
        //                           , (int)GRP_TWO_ID.GTO_10
        //                           , GRP_THREE_ID.ME.ToString()
        //                           , CR_YEAR
        //                           , CR_MONTH);

        DoDrawingJunsaChart1(dtNHIT, chart1);

        dtNHIT = bizNHIT.GetJeonSa(GRP_ONE_ID.A.ToString()
                                   , (int)GRP_TWO_ID.GTO_10
                                   , GRP_THREE_ID.DN.ToString()
                                   , CR_YEAR
                                   , ""
                                   , "T");

        DoDrawingJunsaChart2(dtNHIT, chartMM);
    }
Exemplo n.º 4
0
    private void DoBinding_ETC()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT_B = bizNHIT.GetEtc(GRP_ONE_ID.B.ToString()
                                            , CR_YEAR
                                            , CR_MONTH
                                            , "T");

        UltraWebGrid3.DataSource = dtNHIT_B;
        UltraWebGrid3.DataBind();
        DoDrawingEtcChart(dtNHIT_B, chart3, 4);


        DataTable dtNHIT_C = bizNHIT.GetEtc(GRP_ONE_ID.C.ToString()
                                            , CR_YEAR
                                            , CR_MONTH
                                            , "T");

        UltraWebGrid4.DataSource = dtNHIT_C;
        UltraWebGrid4.DataBind();
        DoDrawingEtcChart(dtNHIT_C, chart4, 17);


        DataTable dtNHIT_D = bizNHIT.GetEtc(GRP_ONE_ID.D.ToString()
                                            , CR_YEAR
                                            , CR_MONTH
                                            , "T");



        UltraWebGrid5.DataSource = dtNHIT_D;
        UltraWebGrid5.DataBind();
        DoDrawingEtcChart(dtNHIT_D, chart5, 13);
    }
Exemplo n.º 5
0
    private void DoBinding_ETC()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT_B = bizNHIT.GetEtc(GRP_ONE_ID.B.ToString()
                                            , CR_YEAR
                                            , CR_MONTH, TG_GUBUN);

        DoDrawing3(dtNHIT_B, chart3);
        //DoDrawingEtcChart(dtNHIT_B, chart3,4);



        DataTable dtNHIT_C = bizNHIT.GetEtc(GRP_ONE_ID.C.ToString()
                                            , CR_YEAR
                                            , CR_MONTH, TG_GUBUN);

        DoDrawing3(dtNHIT_C, chart4);
        //DoDrawingEtcChart(dtNHIT_C, chart4,17);


        DataTable dtNHIT_D = bizNHIT.GetEtc(GRP_ONE_ID.D.ToString()
                                            , CR_YEAR
                                            , CR_MONTH, TG_GUBUN);


        DoDrawing3(dtNHIT_D, chart5);
        //DoDrawingEtcChart(dtNHIT_D, chart5,13);
    }
    private void DoBinding_Project()
    {
        UltraWebGrid1.Clear();

        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetProjectDetail(CR_YEAR, GRP_ONE_B_CODE, GRP_ONE_C_CODE, GRP_ONE_D_CODE);

        UltraWebGrid1.DataSource = dtNHIT;
        UltraWebGrid1.DataBind();

        string title = "{0} 프로젝트 현황";
        string gubun = string.Empty;

        if (GRP_ONE_B_CODE.Length > 0)
        {
            gubun = "고객사 별";
        }

        if (GRP_ONE_C_CODE.Length > 0)
        {
            gubun = "사업유형 별";
        }

        if (GRP_ONE_D_CODE.Length > 0)
        {
            gubun = "본부 별";
        }

        if (dtNHIT.Rows.Count > 0)
        {
            lblTitle.Text        = string.Format(title, gubun);
            lblProjectTotal.Text = string.Format("(Total : {0})", dtNHIT.Rows.Count);
        }
    }
Exemplo n.º 7
0
    private void DoBinding_InPower()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetInPower(CR_YEAR);

        DoDrawingInPower(dtNHIT, chart2);
    }
Exemplo n.º 8
0
    private void DoBinding_InPower()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetInPower(CR_YEAR);

        UltraWebGrid2.DataSource = dtNHIT;
        UltraWebGrid2.DataBind();
    }
Exemplo n.º 9
0
    private void DoBinding_JeonSa()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetJeonSa(GRP_ONE_ID.A.ToString()
                                             , (int)GRP_TWO_ID.GTO_10
                                             , CR_YEAR
                                             , CR_MONTH
                                             , TG_GUBUN);

        UltraWebGrid1.DataSource = dtNHIT;
        UltraWebGrid1.DataBind();
    }
Exemplo n.º 10
0
    private void DoBinding_Emp(string cr_year, string cr_month, string project_name)
    {
        UltraWebGrid2.Clear();

        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetEmpProjectDetail(cr_year
                                                       , cr_month
                                                       , project_name);

        UltraWebGrid2.DataSource = dtNHIT;
        UltraWebGrid2.DataBind();

        lblEmpTotal.Text = string.Format("(Total : {0})", dtNHIT.Rows.Count);
    }
Exemplo n.º 11
0
    private void DoInitializing()
    {
        DropDownListCommom.BindEstTerm(ddlEstTermRefID);
        IEstTermRefID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID);

        MicroBSC.Integration.BSC.Biz.Biz_My_Kpi bizMyKpi = new MicroBSC.Integration.BSC.Biz.Biz_My_Kpi();
        IYmd = bizMyKpi.SelectCurrentYYYYMM();

        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtYear = bizNHIT.GetYear_DB();

        if (dtYear.Rows.Count > 0)
        {
            ddlYear.DataSource     = dtYear;
            ddlYear.DataTextField  = "CR_YEAR_NAME";
            ddlYear.DataValueField = "CR_YEAR";
            ddlYear.DataBind();
        }
        else
        {
            ddlYear.Items.Add(new ListItem(DateTime.Now.Year.ToString(), DateTime.Now.Year.ToString()));
        }

        DataTable dtMonth = bizNHIT.GetMonth_DB();

        if (dtMonth.Rows.Count > 0)
        {
            ddlMonth.DataSource     = dtMonth;
            ddlMonth.DataTextField  = "CR_MONTH_NAME";
            ddlMonth.DataValueField = "CR_MONTH";
            ddlMonth.DataBind();
        }
        else
        {
            ddlMonth.Items.Add(new ListItem(DateTime.Now.Month.ToString(), DateTime.Now.Month.ToString()));
        }

        ddlResolution.Items.Add(new ListItem("1024", "330*245"));
        ddlResolution.Items.Add(new ListItem("1280", "415*250"));
    }
Exemplo n.º 12
0
    private void DoBinding_Project()
    {
        UltraWebGrid1.Clear();

        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetEmpProject(CR_YEAR, CR_MONTH);

        UltraWebGrid1.DataSource = dtNHIT;
        UltraWebGrid1.DataBind();

        if (dtNHIT.Rows.Count > 0)
        {
            lblProjectTotal.Text = string.Format("(Total : {0})", dtNHIT.Rows.Count);
            UltraWebGrid1.Rows[0].Activate();
            UltraWebGrid1.Rows[0].Selected = true;

            string cr_year      = DataTypeUtility.GetValue(UltraWebGrid1.Rows[0].Cells.FromKey("CR_YEAR").Value);
            string cr_month     = DataTypeUtility.GetValue(UltraWebGrid1.Rows[0].Cells.FromKey("CR_MONTH").Value);
            string project_name = DataTypeUtility.GetValue(UltraWebGrid1.Rows[0].Cells.FromKey("PROJECT_NAME").Value);

            DoBinding_Emp(cr_year, cr_month, project_name);
        }
    }
Exemplo n.º 13
0
    private void DoInitializing()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtYear = bizNHIT.GetYear_DB();

        if (dtYear.Rows.Count > 0)
        {
            ddlYear.DataSource     = dtYear;
            ddlYear.DataTextField  = "CR_YEAR_NAME";
            ddlYear.DataValueField = "CR_YEAR";
            ddlYear.DataBind();
        }
        else
        {
            ddlYear.Items.Add(new ListItem(DateTime.Now.Year.ToString(), DateTime.Now.Year.ToString()));
        }

        DataTable dtMonth = bizNHIT.GetMonth_DB();

        if (dtMonth.Rows.Count > 0)
        {
            ddlMonth.DataSource     = dtMonth;
            ddlMonth.DataTextField  = "CR_MONTH_NAME";
            ddlMonth.DataValueField = "CR_MONTH";
            ddlMonth.DataBind();
        }
        else
        {
            ddlMonth.Items.Add(new ListItem(DateTime.Now.Month.ToString(), DateTime.Now.Month.ToString()));
        }

        ddlResolution.Items.Add(new ListItem("1024", "330*245"));
        ddlResolution.Items.Add(new ListItem("1280", "415*250"));

        //ddlResolution.SelectedItem.Text = WIDTH.ToString();
    }
Exemplo n.º 14
0
    private void DoBinding_JeonSa()
    {
        UltraWebGrid1.Clear();

        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetJeonSaPOPUP(GRP_ONE_ID.A.ToString()
                                                  , (int)GRP_TWO_ID.GTO_10
                                                  , CR_YEAR
                                                  , TG_GUBUN);

        #region 차트용 datatable 생성
        DataTable dtChart = new DataTable();
        dtChart.Columns.Add("CR_YEAR");
        dtChart.Columns.Add("CR_MONTH");
        dtChart.Columns.Add("ME_RATE", typeof(double));
        dtChart.Columns.Add("YG_RATE", typeof(double));
        dtChart.Columns.Add("DN_RATE", typeof(double));

        for (int i = 0; i < 12; i++)
        {
            DataRow dr = dtChart.NewRow();

            dr["CR_YEAR"]  = CR_YEAR;
            dr["CR_MONTH"] = DataTypeUtility.GetString(i + 1).PadLeft(2, '0');
            dr["ME_RATE"]  = 0;
            dr["YG_RATE"]  = 0;
            dr["DN_RATE"]  = 0;

            dtChart.Rows.Add(dr);
        }

        string cr_year        = "";
        string cr_month       = "";
        string grp_three_code = "";
        int    iRow           = 0;

        for (int i = 0; i < dtNHIT.Rows.Count; i++)
        {
            cr_year        = DataTypeUtility.GetString(dtNHIT.Rows[i]["CR_YEAR"]);
            cr_month       = DataTypeUtility.GetString(dtNHIT.Rows[i]["CR_MONTH"]);
            grp_three_code = DataTypeUtility.GetString(dtNHIT.Rows[i]["GRP_THREE_CODE"]);

            iRow = DataTypeUtility.GetToInt32(cr_month) - 1;

            if (grp_three_code == "ME")
            {
                dtChart.Rows[iRow]["ME_RATE"] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["DAL_RATE_100"]);
            }
            else if (grp_three_code == "YG")
            {
                dtChart.Rows[iRow]["YG_RATE"] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["DAL_RATE_100"]);
            }
            else if (grp_three_code == "DN")
            {
                dtChart.Rows[iRow]["DN_RATE"] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["DAL_RATE_100"]);
            }
        }

        DrawChart(dtChart);

        #endregion


        #region 그리드용 datatable 생성
        DataTable dtGrid = new DataTable();
        dtGrid.Columns.Add("ACC");
        dtGrid.Columns.Add("GUBUN");
        dtGrid.Columns.Add("M01", typeof(double));
        dtGrid.Columns.Add("M02", typeof(double));
        dtGrid.Columns.Add("M03", typeof(double));
        dtGrid.Columns.Add("M04", typeof(double));
        dtGrid.Columns.Add("M05", typeof(double));
        dtGrid.Columns.Add("M06", typeof(double));
        dtGrid.Columns.Add("M07", typeof(double));
        dtGrid.Columns.Add("M08", typeof(double));
        dtGrid.Columns.Add("M09", typeof(double));
        dtGrid.Columns.Add("M10", typeof(double));
        dtGrid.Columns.Add("M11", typeof(double));
        dtGrid.Columns.Add("M12", typeof(double));

        for (int i = 0; i < 9; i++)
        {
            DataRow dr = dtGrid.NewRow();

            switch (i)
            {
            case 0:

                dr["ACC"] = "매출";
                break;

            case 3:

                dr["ACC"] = "영업이익";
                break;

            case 6:

                dr["ACC"] = "당기순이익";
                break;
            }

            switch (i)
            {
            case 0:
            case 3:
            case 6:
                dr["GUBUN"] = "목표";
                break;

            case 1:
            case 4:
            case 7:
                dr["GUBUN"] = "실적";
                break;

            case 2:
            case 5:
            case 8:
                dr["GUBUN"] = "달성률";
                break;
            }
            dr["M01"] = 0;
            dr["M02"] = 0;
            dr["M03"] = 0;
            dr["M04"] = 0;
            dr["M05"] = 0;
            dr["M06"] = 0;
            dr["M07"] = 0;
            dr["M08"] = 0;
            dr["M09"] = 0;
            dr["M10"] = 0;
            dr["M11"] = 0;
            dr["M12"] = 0;

            dtGrid.Rows.Add(dr);
        }

        cr_year        = "";
        cr_month       = "";
        grp_three_code = "";

        int iCol = 0;
        for (int i = 0; i < dtNHIT.Rows.Count; i++)
        {
            cr_year        = DataTypeUtility.GetString(dtNHIT.Rows[i]["CR_YEAR"]);
            cr_month       = DataTypeUtility.GetString(dtNHIT.Rows[i]["CR_MONTH"]);
            grp_three_code = DataTypeUtility.GetString(dtNHIT.Rows[i]["GRP_THREE_CODE"]);

            iCol = DataTypeUtility.GetToInt32(cr_month) + 1;

            if (grp_three_code == "ME")
            {
                dtGrid.Rows[0][iCol] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["TARGET_TS"]);
                dtGrid.Rows[1][iCol] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["RESULT_TS"]);
                dtGrid.Rows[2][iCol] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["DAL_RATE_100"]);
            }
            else if (grp_three_code == "YG")
            {
                dtGrid.Rows[3][iCol] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["TARGET_TS"]);
                dtGrid.Rows[4][iCol] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["RESULT_TS"]);
                dtGrid.Rows[5][iCol] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["DAL_RATE_100"]);
            }
            else if (grp_three_code == "DN")
            {
                dtGrid.Rows[6][iCol] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["TARGET_TS"]);
                dtGrid.Rows[7][iCol] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["RESULT_TS"]);
                dtGrid.Rows[8][iCol] = DataTypeUtility.GetToDouble(dtNHIT.Rows[i]["DAL_RATE_100"]);
            }
        }



        UltraWebGrid1.DataSource = dtGrid;
        UltraWebGrid1.DataBind();


        #endregion
    }
Exemplo n.º 15
0
    private void DoCompute()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetJeonSa("A"
                                             , 10
                                             , ""
                                             , "", TG_GUBUN);

        //object objMaxYear =  dtNHIT.Compute("MAX(CR_YEAR)", "");
        //object objMaxMonth = dtNHIT.Compute("MAX(CR_MONTH)", string.Format(" CR_YEAR = '{0}' ", objMaxYear));

        object objMaxYear  = CR_YEAR;
        object objMaxMonth = CR_MONTH;

        DataRow[] rows = dtNHIT.Select(string.Format(" CR_YEAR = '{0}' AND CR_MONTH = '{1}' ", objMaxYear, objMaxMonth), " SORT_ORDER ");

        if (rows.Length > 0)
        {
            lblYearMonth.Text = string.Format("{0}년 {1}월", objMaxYear, objMaxMonth);

            double rate1p = 0;
            double rate2p = 0;
            double rate3p = 0;


            lblMeDon.Text = String.Format("{0:##,##0}", DataTypeUtility.GetToInt32(rows[0][10]));
            lblMePer.Text = String.Format("{0:##,##0.00}", DataTypeUtility.GetToDouble(rows[0][11]) * 100) + "%";

            lblYoungDon.Text = String.Format("{0:##,##0}", DataTypeUtility.GetToInt32(rows[1][10]));
            lblYoungPer.Text = String.Format("{0:##,##0.00}", DataTypeUtility.GetToDouble(rows[1][11]) * 100) + "%";

            lblDangDon.Text = String.Format("{0:##,##0}", DataTypeUtility.GetToInt32(rows[2][10]));
            lblDangPer.Text = String.Format("{0:##,##0.00}", DataTypeUtility.GetToDouble(rows[2][11]) * 100) + "%";

            rate1p = DataTypeUtility.GetToDouble(rows[0][11]) * 100 * 0.5;
            rate2p = DataTypeUtility.GetToDouble(rows[1][11]) * 100 * 0.5;
            rate3p = DataTypeUtility.GetToDouble(rows[2][11]) * 100 * 0.5;

            //if (rate < rate1p)
            //{
            //    rate = rate1p;
            //}

            //if (rate < rate2p)
            //{
            //    rate = rate2p;
            //}

            //if (rate < rate3p)
            //{
            //    rate = rate3p;
            //}

            //if (rate > 100)
            //{
            //    rate1p = (rate1p == 0) ? rate1p : (rate1p / rate * 100);
            //    rate2p = (rate2p == 0) ? rate2p : (rate2p / rate * 100);
            //    rate3p = (rate3p == 0) ? rate3p : (rate3p / rate * 100);
            //}

            if (rate1p < 0)
            {
                rate1p = 0;
            }
            if (rate1p > 100)
            {
                rate1p = 100;
            }

            if (rate2p < 0)
            {
                rate2p = 0;
            }
            if (rate2p > 100)
            {
                rate2p = 100;
            }

            if (rate3p < 0)
            {
                rate3p = 0;
            }
            if (rate3p > 100)
            {
                rate3p = 100;
            }

            string wid1        = @"width:{0}%";
            string widthvalue1 = string.Format(wid1, rate1p);
            divMe.Attributes.Add("style", widthvalue1);

            string wid2        = @"width:{0}%";
            string widthvalue2 = string.Format(wid2, rate2p);
            divYoung.Attributes.Add("style", widthvalue2);

            string wid3        = @"width:{0}%";
            string widthvalue3 = string.Format(wid3, rate3p);
            divDang.Attributes.Add("style", widthvalue3);

            double avg       = (rate1p + rate2p + rate2p / 3);
            string grade     = "U";
            string colorCode = "#b8b8b8";

            if (avg >= 100)
            {
                grade     = "S";
                colorCode = "#6fe1e0";
            }
            else if (avg >= 90 && avg < 100)
            {
                grade     = "A";
                colorCode = "#6fe1e0";
            }
            else if (avg >= 80 && avg < 90)
            {
                grade     = "B";
                colorCode = "#a8f620";
            }
            else if (avg >= 70 && avg < 80)
            {
                grade     = "C";
                colorCode = "#f6c739";
            }
            else if (avg < 70)
            {
                grade     = "D";
                colorCode = "#fb7716";
            }
            //else if(avg <= 50)
            //{
            //    grade = "U";
            //    colorCode = "#b8b8b8";
            //}


            lblG.Text      = grade;
            lblG.ForeColor = Color.FromName(colorCode);

            //            .fcols{color: #8fc9fa;}
            //.fcola{color: #6fe1e0;}
            //.fcolb{color: #a8f620;}
            //.fcolc{color: #f6c739;}
            //.fcold{color: #fb7716;}
            //.fcolu{color: #b8b8b8;}
        }
    }
Exemplo n.º 16
0
    private void SetIndiGrid()
    {
        writeLog(string.Format("{0} : SetIndiGrid() Start", Request.PhysicalPath));

        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetJeonSa("A"
                                             , 10
                                             , ""
                                             , "", "T");

        object objMaxYear  = dtNHIT.Compute("MAX(CR_YEAR)", "");
        object objMaxMonth = dtNHIT.Compute("MAX(CR_MONTH)", string.Format(" CR_YEAR = '{0}' ", objMaxYear));

        DataRow[] rows = dtNHIT.Select(string.Format(" CR_YEAR = '{0}' AND CR_MONTH = '{1}' ", objMaxYear, objMaxMonth), " SORT_ORDER ");

        if (rows.Length > 0)
        {
            double rate   = 0;
            double rate1p = 0;
            double rate2p = 0;
            double rate3p = 0;


            amt1.Text  = String.Format("{0:##,##0}", DataTypeUtility.GetToInt32(rows[0][10]));
            rate1.Text = String.Format("{0:##,##0.00}", DataTypeUtility.GetToDouble(rows[0][11]) * 100);

            amt2.Text  = String.Format("{0:##,##0}", DataTypeUtility.GetToInt32(rows[1][10]));
            rate2.Text = String.Format("{0:##,##0.00}", DataTypeUtility.GetToDouble(rows[1][11]) * 100);

            amt3.Text  = String.Format("{0:##,##0}", DataTypeUtility.GetToInt32(rows[2][10]));
            rate3.Text = String.Format("{0:##,##0.00}", DataTypeUtility.GetToDouble(rows[2][11]) * 100);

            rate1p = DataTypeUtility.GetToDouble(rows[0][11]) * 100 * 0.5;
            rate2p = DataTypeUtility.GetToDouble(rows[1][11]) * 100 * 0.5;
            rate3p = DataTypeUtility.GetToDouble(rows[2][11]) * 100 * 0.5;

            //if (rate < rate1p)
            //{
            //    rate = rate1p;
            //}

            //if (rate < rate2p)
            //{
            //    rate = rate2p;
            //}

            //if (rate < rate3p)
            //{
            //    rate = rate3p;
            //}

            //if (rate > 100)
            //{
            //    rate1p = (rate1p == 0) ? rate1p : (rate1p / rate * 100);
            //    rate2p = (rate2p == 0) ? rate2p : (rate2p / rate * 100);
            //    rate3p = (rate3p == 0) ? rate3p : (rate3p / rate * 100);
            //}

            if (rate1p < 0)
            {
                rate1p = 0;
            }
            if (rate1p > 100)
            {
                rate1p = 100;
            }

            if (rate2p < 0)
            {
                rate2p = 0;
            }
            if (rate2p > 100)
            {
                rate2p = 100;
            }

            if (rate3p < 0)
            {
                rate3p = 0;
            }
            if (rate3p > 100)
            {
                rate3p = 100;
            }

            string wid1        = @"width:{0}%";
            string widthvalue1 = string.Format(wid1, rate1p);
            ratediv1.Attributes.Add("style", widthvalue1);

            string wid2        = @"width:{0}%";
            string widthvalue2 = string.Format(wid2, rate2p);
            ratediv2.Attributes.Add("style", widthvalue2);

            string wid3        = @"width:{0}%";
            string widthvalue3 = string.Format(wid3, rate3p);
            ratediv3.Attributes.Add("style", widthvalue3);
        }

        writeLog(string.Format("{0} : SetIndiGrid() End", Request.PhysicalPath));
    }