Пример #1
0
    private void BindingRelGroupInfo(int comp_id, string est_id, int estterm_ref_id)
    {
        Biz_RelGroupInfos relGroupInfo = new Biz_RelGroupInfos();
        DataSet           ds           = relGroupInfo.GetRelGroupInfo(comp_id, "", est_id, estterm_ref_id);

        uwgRelGroup.DataSource = ds;
        uwgRelGroup.DataBind();

        //lblRowCount.Text              = ds.Tables[0].Rows.Count.ToString();
    }
Пример #2
0
    private DataTable GetRelGroupData(int comp_id, string est_id, int estterm_ref_id)
    {
        Biz_EmpInfos        empInfo      = new Biz_EmpInfos();
        Biz_RelGroupInfos   relGrpInfo   = new Biz_RelGroupInfos();
        Biz_RelGroupTgtMaps relGrpTgtMap = new Biz_RelGroupTgtMaps();
        DataTable           dataTable    = relGrpTgtMap.GetDataTableSchema();
        DataRow             dataRow      = null;
        DataTable           dtRelGrp     = relGrpInfo.GetRelGroupInfo(comp_id, "", est_id, estterm_ref_id).Tables[0];

        foreach (DataRow dataRowRelGrp in dtRelGrp.Rows)
        {
            DataTable dtTgt          = null;
            string    rel_grp_id     = dataRowRelGrp["REL_GRP_ID"].ToString();
            string    where_sentence = "";

            where_sentence = BizUtility.GetRelGroupWhereString(COMP_ID
                                                               , EST_ID
                                                               , ESTTERM_REF_ID
                                                               , rel_grp_id
                                                               , "TM");

            if (OwnerTypeMode == OwnerType.Dept)
            {
                dtTgt = empInfo.GetRelDeptList("WHERE", where_sentence, "TM").Tables[0];
            }
            else if (OwnerTypeMode == OwnerType.Emp_User)
            {
                dtTgt = empInfo.GetRelEmpList("WHERE", where_sentence, "TM").Tables[0];
            }

            foreach (DataRow dataRowTgt in dtTgt.Rows)
            {
                dataRow = dataTable.NewRow();

                dataRow["COMP_ID"]        = comp_id;
                dataRow["REL_GRP_ID"]     = rel_grp_id;
                dataRow["EST_ID"]         = est_id;
                dataRow["ESTTERM_REF_ID"] = estterm_ref_id;
                dataRow["TGT_DEPT_ID"]    = dataRowTgt["TGT_DEPT_ID"];
                dataRow["TGT_EMP_ID"]     = dataRowTgt["TGT_EMP_ID"];
                dataRow["DATE"]           = DateTime.Now;
                dataRow["USER"]           = EMP_REF_ID;

                dataTable.Rows.Add(dataRow);
            }
        }

        return(dataTable);
    }
Пример #3
0
    private string GetScaleName(string est_id)
    {
        //if(est_id.Equals("3B"))
        //    System.Diagnostics.Debugger.Break();

        Biz_EstInfos estInfo = new Biz_EstInfos(COMP_ID, est_id);

        string scale_id   = string.Empty;
        string scale_name = "";

        if (estInfo.Scale_Type.Equals("DPT"))
        {
            DataRow[] rows = DS_DETAIL.Tables[0].Select(string.Format(" EST_ID = '{0}' ", est_id));

            if (rows.Length > 0)
            {
                scale_id = rows[0]["SCALE_ID"].ToString();

                if (scale_id.Equals("ABS"))
                {
                    scale_name = "<b>절대평가</b>";
                }
                else if (scale_id.Equals("REL"))
                {
                    string            temp = string.Empty;
                    Biz_RelGroupInfos biz  = new Biz_RelGroupInfos();
                    DataSet           ds   = biz.GetRelGroupInfo(COMP_ID, "", est_id, ESTTERM_REF_ID);

                    StringBuilder sbTemp = new StringBuilder();
                    int           cnt    = 0;

                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        cnt++;
                        temp = string.Format("<a href='#' onclick=ViewEmpList('{0}','{1}','{2}','{3}')>{4}</a>"
                                             , COMP_ID
                                             , est_id
                                             , ESTTERM_REF_ID
                                             , row["REL_GRP_ID"].ToString()
                                             , row["REL_GRP_NAME"].ToString());

                        sbTemp.Append("<br>&nbsp;" + cnt.ToString() + ". " + temp);
                    }

                    temp = (temp.Length > 0) ? temp.Remove(temp.Length - 1, 1) : string.Empty;

                    scale_name = "<b>상대평가</b>" + sbTemp.ToString();
                }
            }
        }
        else if (estInfo.Scale_Type.Equals("POS"))
        {
            Biz_DeptPosScales deptPosScale = new Biz_DeptPosScales();
            DataSet           ds           = deptPosScale.GetDeptPosScale(COMP_ID
                                                                          , ESTTERM_REF_ID
                                                                          , DataTypeUtility.GetToInt32(TreeView1.SelectedNode.Value)
                                                                          , est_id);

            if (ds.Tables[0].Rows.Count > 0)
            {
                scale_name = "";
                bool isFirst = true;

                foreach (DataRow row in ds.Tables[0].Rows)
                {
                    string no = "&nbsp;" + row["SEQ"].ToString() + ".";

                    string pos_id = GetPosName(row["POS_ID"].ToString(), row["POS_VALUE"].ToString());
                    string temp   = "<b>" + row["SCALE_NAME"].ToString().Replace("평가", "") + "</b>";

                    if (isFirst)
                    {
                        scale_name += no + pos_id + temp;
                        isFirst     = false;
                    }
                    else
                    {
                        scale_name += "<br>" + no + pos_id + temp;
                    }
                }
            }
            else
            {
                scale_name = "&nbsp;-";
            }
        }

        return(scale_name);
    }