Пример #1
0
 protected void setBtnState()
 {
     if (STATUS_ID.Equals("E"))
     {
         iBtnInsert.Visible = false;
         iBtnInsert.Enabled = false;
     }
 }
Пример #2
0
    protected void ugrdEstQuestion_InitializeRow(object sender, RowEventArgs e)
    {
        string q_sbj_id = DataTypeUtility.GetString(e.Row.Cells.FromKey("Q_SBJ_ID").Value);


        //자기평가 결과
        //DataTable ItemDt = new MicroBSC.Integration.EST.Biz.Biz_Est_Question_Data().SelectEstQuestionDataSelfPoint(Q_OBJ_ID, q_sbj_id);


        Biz_QuestionDatas questionDatas = new Biz_QuestionDatas(COMP_ID
                                                                , EST_ID
                                                                , ESTTERM_REF_ID
                                                                , ESTTERM_SUB_ID
                                                                , ESTTERM_STEP_ID
                                                                , TGT_DEPT_ID
                                                                , TGT_EMP_ID
                                                                , TGT_DEPT_ID
                                                                , TGT_EMP_ID
                                                                , q_sbj_id);


        Biz_QuestionItems questionItems = new Biz_QuestionItems();
        DataTable         ItemDt        = questionItems.GetQuestionItem(questionDatas.Q_Itm_ID, q_sbj_id, Q_OBJ_ID).Tables[0];


        UltraGridCell uc = e.Row.Cells.FromKey("Q_ITEM_NAME_SELF");

        uc.Value = ItemDt.Rows[0]["Q_ITEM_NAME"].ToString();

        UltraGridCell ugItemNo = e.Row.Cells.FromKey("Q_ITM_ID");

        ugItemNo.Value = ItemDt.Rows[0]["Q_ITM_ID"].ToString();

        UltraGridCell ugobjId = e.Row.Cells.FromKey("Q_OBJ_ID");

        ugobjId.Value = ItemDt.Rows[0]["Q_OBJ_ID"].ToString();


        //다면평가 결과
        DataTable dtPoint = new MicroBSC.Integration.EST.Biz.Biz_Est_Question_Data().SelectEstQuestionDataSelfPointResultPoint(
            ESTTERM_REF_ID, ESTTERM_SUB_ID, ESTTERM_STEP_ID, Q_OBJ_ID, TGT_EMP_ID, "3O");


        int    count = 0;
        double sum   = 0;

        for (int i = 0; i < dtPoint.Rows.Count; i++)
        {
            if (dtPoint.Rows[i]["Q_SBJ_ID"].ToString().Equals(q_sbj_id))
            {
                UltraGridCell ugc = e.Row.Cells.FromKey((dtPoint.Rows[i]["EST_EMP_ID"].ToString()));
                ugc.Value = dtPoint.Rows[i]["POINT"].ToString();
                sum      += double.Parse(dtPoint.Rows[i]["POINT"].ToString());
                count++;
            }
        }

        //다면평가 평균
        UltraGridCell ugAv = e.Row.Cells.FromKey("Q_AVERAGE");

        if (count == 0)
        {
            ugAv.Value = "-";
        }
        else
        {
            ugAv.Value = Math.Round(sum / count, 2);
        }


        //1차 평가 결과
        questionDatas = new Biz_QuestionDatas(COMP_ID
                                              , EST_ID
                                              , ESTTERM_REF_ID
                                              , ESTTERM_SUB_ID
                                              , ESTTERM_STEP_ID
                                              , EST_DEPT_ID
                                              , EST_EMP_ID
                                              , TGT_DEPT_ID
                                              , TGT_EMP_ID
                                              , q_sbj_id);

        TemplatedColumn tc = (TemplatedColumn)e.Row.Band.Columns.FromKey("Q_FIRST");

        Infragistics.WebUI.WebDataInput.WebNumericEdit ne = (Infragistics.WebUI.WebDataInput.WebNumericEdit)((CellItem)tc.CellItems[e.Row.Index]).FindControl("Q_FIRST");
        ne.Value = DataTypeUtility.GetToDouble(questionDatas.Point);

        if (STATUS_ID.Equals("E"))
        {
            ne.ReadOnly = true;
        }
    }