Beispiel #1
0
    protected void UltraWebGrid1_InitializeRow(object sender, RowEventArgs e)
    {
        if (!e.Row.Cells.FromKey("STATUS_N_CNT").Value.ToString().Equals("0"))
        {
            e.Row.Cells.FromKey("STATUS_N_CNT").Style.ForeColor = Color.Red;
            e.Row.Cells.FromKey("STATUS_N_CNT").Style.Font.Bold = true;
        }

        if (!e.Row.Cells.FromKey("STATUS_P_CNT").Value.ToString().Equals("0"))
        {
            e.Row.Cells.FromKey("STATUS_P_CNT").Style.ForeColor = Color.Orange;
            e.Row.Cells.FromKey("STATUS_P_CNT").Style.Font.Bold = true;
        }

        if (!e.Row.Cells.FromKey("STATUS_E_CNT").Value.ToString().Equals("0"))
        {
            e.Row.Cells.FromKey("STATUS_E_CNT").Style.ForeColor = Color.Green;
            e.Row.Cells.FromKey("STATUS_E_CNT").Style.Font.Bold = true;
        }



        //진행률 처리
        int    TOTAL_EST_CNT = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("TOTAL_EST_CNT").Value);
        int    STATUS_E_CNT  = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("STATUS_E_CNT").Value);
        string EST_PROGRESS;

        if (TOTAL_EST_CNT == 0)
        {
            EST_PROGRESS = "-";
        }
        else
        {
            EST_PROGRESS = Math.Round(((double)STATUS_E_CNT / TOTAL_EST_CNT) * 100, 1).ToString() + "%";
        }

        e.Row.Cells.FromKey("EST_PROGRESS").Value = EST_PROGRESS;
        e.Row.Cells.FromKey("EST_PROGRESS").Style.HorizontalAlign = HorizontalAlign.Right;

        if (EST_PROGRESS.Equals("100%"))
        {
            e.Row.Cells.FromKey("TGT_DEPT_NAME").Style.Font.Bold = true;
            e.Row.Cells.FromKey("EST_PROGRESS").Style.Font.Bold  = true;
        }
    }
Beispiel #2
0
    protected void UltraWebGrid2_InitializeRow(object sender, RowEventArgs e)
    {
        if (!e.Row.Cells.FromKey("STATUS_N_CNT").Value.ToString().Equals("0"))
        {
            e.Row.Cells.FromKey("STATUS_N_CNT").Style.ForeColor = Color.Red;
            e.Row.Cells.FromKey("STATUS_N_CNT").Style.Font.Bold = true;
        }

        if (!e.Row.Cells.FromKey("STATUS_P_CNT").Value.ToString().Equals("0"))
        {
            e.Row.Cells.FromKey("STATUS_P_CNT").Style.ForeColor = Color.Orange;
            e.Row.Cells.FromKey("STATUS_P_CNT").Style.Font.Bold = true;
        }

        if (!e.Row.Cells.FromKey("STATUS_E_CNT").Value.ToString().Equals("0"))
        {
            e.Row.Cells.FromKey("STATUS_E_CNT").Style.ForeColor = Color.Green;
            e.Row.Cells.FromKey("STATUS_E_CNT").Style.Font.Bold = true;
        }



        //진행률 처리
        int    TOTAL_EST_CNT = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("TOTAL_EST_CNT").Value);
        int    STATUS_E_CNT  = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("STATUS_E_CNT").Value);
        string EST_PROGRESS;

        if (TOTAL_EST_CNT == 0)
        {
            EST_PROGRESS = "-";
        }
        else
        {
            EST_PROGRESS = Math.Round(((double)STATUS_E_CNT / TOTAL_EST_CNT) * 100, 1).ToString() + "%";
        }

        e.Row.Cells.FromKey("EST_PROGRESS").Value = EST_PROGRESS;
        e.Row.Cells.FromKey("EST_PROGRESS").Style.HorizontalAlign = HorizontalAlign.Right;

        if (EST_PROGRESS.Equals("100%"))
        {
            e.Row.Cells.FromKey("TGT_EMP_NAME").Style.Font.Bold = true;
            e.Row.Cells.FromKey("EST_PROGRESS").Style.Font.Bold = true;
        }



        if (DETAIL_VIEW.Equals("Y"))
        {
            string imgUrl = "../images/tree/search.gif";
            string popupScript;

            string TGT_DEPT_ID;
            string TGT_EMP_ID;



            TGT_DEPT_ID = e.Row.Cells.FromKey("TGT_DEPT_ID").Value.ToString();
            TGT_EMP_ID  = e.Row.Cells.FromKey("TGT_EMP_ID").Value.ToString();

            popupScript = string.Format("javascript:Show_Est_Stat_Detail_By_Emp('{0}', '{1}');"
                                        , TGT_DEPT_ID, TGT_EMP_ID);

            e.Row.Cells.FromKey("DETAIL").Value = string.Format("<a href=\"{0}\"><img src=\"{1}\" /></a>"
                                                                , popupScript, imgUrl);
            e.Row.Cells.FromKey("DETAIL").Style.HorizontalAlign = HorizontalAlign.Center;
        }
    }