Example #1
0
    private void BindingGrid(int comp_id, string est_id, int estterm_ref_id, int estterm_sub_id)
    {
        Biz_Datas data = new Biz_Datas();

        DT_EST_DATA = data.GetData(COMP_ID
                                   , EST_ID
                                   , ESTTERM_REF_ID
                                   , ESTTERM_SUB_ID
                                   , ESTTERM_STEP_ID
                                   , 0
                                   , 0
                                   , 0
                                   , 0
                                   , YEAR_YN
                                   , MERGE_YN
                                   , OwnerType.Dept).Tables[0];


        DataTable dataTable = BizUtility.GetDeptTree("     ");

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

        lblRowCount.Text = dataTable.Rows.Count.ToString();
    }
Example #2
0
    private void GridBinding(int comp_id)
    {
        if (CheckParam() == false)
        {
            ltrScript.Text = JSHelper.GetAlertScript("평가정보나 평가방법이 설정되지 않았습니다.");
            return;
        }

        Biz_ScaleInfos scaleInfo = new Biz_ScaleInfos();
        DataTable      dtScale   = scaleInfo.GetScaleInfos(comp_id).Tables[0];

        _dwScale      = dtScale.DefaultView;
        _dwScale.Sort = "SCALE_ID";

        Biz_DeptEstDetails deptEstDetail = new Biz_DeptEstDetails();

        _dtEstScale = deptEstDetail.GetDeptEstDetail(comp_id, ESTTERM_REF_ID, 0, EST_ID).Tables[0];

        UltraWebGrid1.Clear();
        UltraWebGrid1.DataSource = BizUtility.GetDeptTree("     ");
        UltraWebGrid1.DataBind();

        EstJobUtility.SetConfirmButtonVisible(COMP_ID
                                              , EST_ID
                                              , ESTTERM_REF_ID
                                              , ESTTERM_SUB_ID
                                              , ESTTERM_STEP_ID
                                              , EST_JOB_ID
                                              , ibnConfirm
                                              , ibnConfirmCancel);
    }
Example #3
0
    private void BindingGrid(int comp_id, string est_id)
    {
        Biz_DeptOpinionTgtEmps deptOpinionTgtEmp = new Biz_DeptOpinionTgtEmps();

        DT_TGT_OPINION = deptOpinionTgtEmp.GetDeptOpinionTgtEmp(COMP_ID, est_id).Tables[0];

        DataTable dataTable = BizUtility.GetDeptTree("     ");

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

        lblRowCount.Text = dataTable.Rows.Count.ToString();
    }
Example #4
0
    private void GridBinding2(int comp_id, int estterm_ref_id, string est_id)
    {
        Biz_DeptEstDetails deptEstDetail = new Biz_DeptEstDetails();

        _dtEstScale = deptEstDetail.GetDeptEstDetail(comp_id, estterm_ref_id, 0, est_id).Tables[0];

        Biz_DeptPosScales deptPosScale = new Biz_DeptPosScales();

        _dtPosScale = deptPosScale.GetDeptPosScale(comp_id, estterm_ref_id, 0, est_id).Tables[0];

        UltraWebGrid2.Clear();
        UltraWebGrid2.DataSource = BizUtility.GetDeptTree("     ");
        UltraWebGrid2.DataBind();
    }
Example #5
0
    private void DataBindingGrid(int comp_id
                                 , string est_id
                                 , int estterm_ref_id
                                 , int estterm_sub_id
                                 , int estterm_step_id
                                 , string year_yn
                                 , string merge_yn
                                 , string owner_type)
    {
        _eOwnerType = BizUtility.GetOwnerType(owner_type);

        Biz_Datas data = new Biz_Datas();

        DT_EST_DATA = data.GetData(comp_id
                                   , est_id
                                   , estterm_ref_id
                                   , estterm_sub_id
                                   , estterm_step_id
                                   , 0
                                   , 0
                                   , 0
                                   , 0
                                   , year_yn
                                   , merge_yn
                                   , _eOwnerType).Tables[0];

        Biz_Grades grade = new Biz_Grades();

        DT_GRADE = grade.GetEstGrades(comp_id).Tables[0];

        DataTable dataDept = BizUtility.GetDeptTree("     ");

        if (_eOwnerType == OwnerType.Dept)
        {
            dataDept.Columns.Add("B_POINT", typeof(double));
            dataDept.Columns.Add("A_POINT", typeof(double));
            dataDept.Columns.Add("B_GRADE", typeof(string));
            dataDept.Columns.Add("A_GRADE", typeof(string));
            dataDept.Columns.Add("IS_EST", typeof(string));

            foreach (DataRow dataRow in dataDept.Rows)
            {
                dataRow["B_POINT"] = "0";
                dataRow["A_POINT"] = "0";
                dataRow["B_GRADE"] = "-";
                dataRow["A_GRADE"] = "-";
                dataRow["IS_EST"]  = "N";
            }

            foreach (DataRow drDept in dataDept.Rows)
            {
                DataRow[] drEstData = DT_EST_DATA.Select(string.Format("TGT_DEPT_ID = {0}", drDept["DEPT_REF_ID"]));

                foreach (DataRow dataEstData in drEstData)
                {
                    drDept["A_POINT"] = DataTypeUtility.GetToDouble(dataEstData["POINT"]);
                    drDept["A_GRADE"] = DataTypeUtility.GetValue(dataEstData["GRADE_ID"]);;
                    drDept["IS_EST"]  = "Y";
                }
            }
        }
        else if (_eOwnerType == OwnerType.Emp_User)
        {
            foreach (DataRow drGrade in DT_GRADE.Rows)
            {
                dataDept.Columns.Add("B_" + drGrade["GRADE_ID"].ToString(), typeof(string));
                dataDept.Columns.Add("A_" + drGrade["GRADE_ID"].ToString(), typeof(string));
            }

            dataDept.Columns.Add("IS_EST", typeof(string));

            foreach (DataRow dataRow in dataDept.Rows)
            {
                foreach (DataRow drGrade in DT_GRADE.Rows)
                {
                    dataRow["B_" + drGrade["GRADE_ID"].ToString()] = "0";
                    dataRow["A_" + drGrade["GRADE_ID"].ToString()] = "0";
                    dataRow["IS_EST"] = "N";
                }
            }

            foreach (DataRow drDept in dataDept.Rows)
            {
                DataRow[] drEstData = DT_EST_DATA.Select(string.Format("TGT_DEPT_ID = {0}", drDept["DEPT_REF_ID"]));

                foreach (DataRow dataEstData in drEstData)
                {
                    if (dataEstData["GRADE_ID"] != DBNull.Value)
                    {
                        drDept["A_" + DataTypeUtility.GetValue(dataEstData["GRADE_ID"])] = DataTypeUtility.GetToInt32(drDept["A_" + DataTypeUtility.GetValue(dataEstData["GRADE_ID"])]) + 1;
                    }

                    drDept["IS_EST"] = "Y";
                }
            }

            DataRow dr = dataDept.NewRow();
            dr["DEPT_REF_ID"] = -9999;
            dr["DEPT_NAME"]   = "<div align='center'><b>합&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;계</b></center>";
            dr["IS_EST"]      = "T";
            dataDept.Rows.Add(dr);

            foreach (DataRow drGrade in DT_GRADE.Rows)
            {
                foreach (DataRow drEstSum in dataDept.Rows)
                {
                    if (DataTypeUtility.GetToInt32(drEstSum["DEPT_REF_ID"]) > 0)
                    {
                        dataDept.Rows[dataDept.Rows.Count - 1]["B_" + DataTypeUtility.GetValue(drGrade["GRADE_ID"])]
                            = DataTypeUtility.GetToInt32(dataDept.Rows[dataDept.Rows.Count - 1]["B_" + DataTypeUtility.GetValue(drGrade["GRADE_ID"])])
                              + DataTypeUtility.GetToInt32(drEstSum["B_" + DataTypeUtility.GetValue(drGrade["GRADE_ID"])]);

                        dataDept.Rows[dataDept.Rows.Count - 1]["A_" + DataTypeUtility.GetValue(drGrade["GRADE_ID"])]
                            = DataTypeUtility.GetToInt32(dataDept.Rows[dataDept.Rows.Count - 1]["A_" + DataTypeUtility.GetValue(drGrade["GRADE_ID"])])
                              + DataTypeUtility.GetToInt32(drEstSum["A_" + DataTypeUtility.GetValue(drGrade["GRADE_ID"])]);
                    }
                }
            }
        }

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

        //GridView1.DataSource = dataDept;
        //GridView1.DataBind();
    }