Esempio n. 1
0
    protected void UltraWebGrid1_InitializeRow(object sender, RowEventArgs e)
    {
        int dept_ref_id = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("DEPT_REF_ID").Value);

        int est_cnt = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("EST_CNT").Value);
        int tgt_cnt = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("TGT_CNT").Value);

        DataRow[] rows = DT_ESTTARGETMAP_GROUPBYTGT.Select(string.Format(" EST_DEPT_ID = {0} AND DIRECTION_TYPE = '{1}' ", dept_ref_id, ConDIRECTION_TYPE));

        e.Row.Cells.FromKey("EST_CNT").Value = string.Format("{0}/{1}", rows.Length, est_cnt);
        if (rows.Length > 0)
        {
            e.Row.Cells.FromKey("EST_CNT").Style.ForeColor = System.Drawing.Color.Red;
            e.Row.Cells.FromKey("EST_CNT").Style.Font.Bold = true;
        }

        rows = DT_ESTTARGETMAP_GROUPBYEST.Select(string.Format(" TGT_DEPT_ID = {0} AND DIRECTION_TYPE= '{1}' ", dept_ref_id, ConDIRECTION_TYPE));

        e.Row.Cells.FromKey("TGT_CNT").Value = string.Format("{0}/{1}", rows.Length, tgt_cnt);
        if (rows.Length > 0)
        {
            e.Row.Cells.FromKey("TGT_CNT").Style.ForeColor = System.Drawing.Color.Red;
            e.Row.Cells.FromKey("TGT_CNT").Style.Font.Bold = true;
        }

        //int tgt_cnt = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("TGT_CNT").Value);

        //if (est_cnt > 0)
        //{
        //    e.Row.Cells.FromKey("EST_CNT").Style.ForeColor = System.Drawing.Color.Red;
        //    e.Row.Cells.FromKey("EST_CNT").Style.Font.Bold = true;
        //}

        //if (tgt_cnt > 0)
        //{
        //    e.Row.Cells.FromKey("TGT_CNT").Style.ForeColor = System.Drawing.Color.Red;
        //    e.Row.Cells.FromKey("TGT_CNT").Style.Font.Bold = true;
        //}

        //TemplatedColumn selchk = (TemplatedColumn)e.Row.Band.Columns.FromKey("selchk");
        //CheckBox cBox = (CheckBox)((CellItem)selchk.CellItems[e.Row.BandIndex]).FindControl("cBox");

        //int total_cnt = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("TOTAL_CNT").Value);

        //if (total_cnt == est_cnt + tgt_cnt)
        //{
        //    cBox.Checked = true;
        //}
    }
Esempio n. 2
0
    protected void UltraWebGrid1_InitializeRow(object sender, RowEventArgs e)
    {
        int dept_ref_id = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("DEPT_REF_ID").Value);

        int est_cnt = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("EST_CNT").Value);
        int tgt_cnt = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("TGT_CNT").Value);

        DataRow[] rows = DT_ESTTARGETMAP_GROUPBYTGT.Select(string.Format(" EST_DEPT_ID = {0} AND DIRECTION_TYPE = '{1}' ", dept_ref_id, ConDIRECTION_TYPE));

        e.Row.Cells.FromKey("EST_CNT").Value = string.Format("{0}/{1}", rows.Length, est_cnt);
        if (rows.Length > 0)
        {
            e.Row.Cells.FromKey("EST_CNT").Style.ForeColor = System.Drawing.Color.Red;
            e.Row.Cells.FromKey("EST_CNT").Style.Font.Bold = true;
        }

        rows = DT_ESTTARGETMAP_GROUPBYEST.Select(string.Format(" TGT_DEPT_ID = {0} AND DIRECTION_TYPE= '{1}' ", dept_ref_id, ConDIRECTION_TYPE));

        e.Row.Cells.FromKey("TGT_CNT").Value = string.Format("{0}/{1}", rows.Length, tgt_cnt);
        if (rows.Length > 0)
        {
            e.Row.Cells.FromKey("TGT_CNT").Style.ForeColor = System.Drawing.Color.Red;
            e.Row.Cells.FromKey("TGT_CNT").Style.Font.Bold = true;
        }

        //status_id 체크 후 체크박스 비활성화
        //수정 - est_data로 들어갔으면 다면평가 랜덤 지정/해제가 불가능하도록 설정

        /*
         * if (DT_DEPTEMP != null)
         * {
         *  bool allowModify = CheckModifyPossiblity(dept_ref_id);
         *
         *  TemplatedColumn selchk = (TemplatedColumn)e.Row.Band.Columns.FromKey("selchk");
         *  CheckBox cBox = (CheckBox)((CellItem)selchk.CellItems[e.Row.BandIndex]).FindControl("cBox");
         *
         *  cBox.Enabled = allowModify;
         * }
         */
    }