示例#1
0
    protected void ibnDeleteRelGrp_Click(object sender, ImageClickEventArgs e)
    {
        Biz_RelGroupInfos relGroupInfo = new Biz_RelGroupInfos();

        bool isOK = relGroupInfo.RemoveRelGroupInfo(COMP_ID, REL_GRP_ID);

        if (isOK)
        {
            BindingRelGroupInfo(COMP_ID, EST_ID, ESTTERM_REF_ID);

            ButtonStatusByInit_RelGrp();
            ButtonStatusByInit_RelGrpPos();
            ClearValueControls_RelGrp();
            ClearValueControls_RelGrpPos();
            ClearValueControls_RelGrpDept();
            uwgRelGroupDept.Clear();
            uwgRelGrpPosInfo.Clear();
            uwgRelGrpPosData.Clear();
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript("정상적으로 삭제가 처리되지 않았습니다.");
            return;
        }
    }
示例#2
0
    private void SelectRelGrpInfo(int comp_id, string rel_grp_id)
    {
        Biz_RelGroupInfos relGroupInfo = new Biz_RelGroupInfos(comp_id, rel_grp_id);

        hdfRelGrpID.Value  = relGroupInfo.Rel_Grp_ID;
        txtRelGrpName.Text = relGroupInfo.Rel_Grp_Name;
        txtRelGrpDesc.Text = relGroupInfo.Rel_Grp_Desc;
    }
示例#3
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();
    }
示例#4
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);
    }
示例#5
0
    protected void ibnValidCheck_Click(object sender, ImageClickEventArgs e)
    {
        DataTable dtRelGrpData = GetRelGroupData(COMP_ID, EST_ID, ESTTERM_REF_ID);
        DataTable dtValid      = null;

        if (dtRelGrpData.Rows.Count == 0)
        {
            ltrScript.Text = JSHelper.GetAlertScript("상대그룹에 포함된 사원정보가 없습니다.");
            return;
        }

        dtValid = DataTypeUtility.GetGroupByDataTable(dtRelGrpData
                                                      , "TGT_EMP_ID"
                                                      , new string[] { "TGT_DEPT_ID", "TGT_EMP_ID" }
                                                      , "TGT_EMP_ID");

        dtValid = DataTypeUtility.FilterSortDataTable(dtValid, "CNT_TGT_EMP_ID > 1");

        int duplicate_emp_id_cnt = dtValid.Rows.Count;

        if (duplicate_emp_id_cnt > 0)
        {
            string temp = "\\r\\n";

            foreach (DataRow drRow in dtValid.Rows)
            {
                DataRow[] drArrTgt = dtRelGrpData.Select(string.Format("TGT_EMP_ID = {0}", drRow["TGT_EMP_ID"]));

                foreach (DataRow drRowTgt in drArrTgt)
                {
                    Biz_RelGroupInfos relGroupInfo = new Biz_RelGroupInfos(COMP_ID, DataTypeUtility.GetValue(drRowTgt["REL_GRP_ID"]));
                    Biz_EmpInfos      empInfo      = new Biz_EmpInfos(DataTypeUtility.GetToInt32(drRowTgt["TGT_EMP_ID"]));
                    temp += relGroupInfo.Rel_Grp_Name + " - " + empInfo.Emp_Name + "\\r\\n";
                }
            }

            ltrScript.Text = JSHelper.GetAlertScript(string.Format("{0}명의 사원이 상대그룹에 중복되어 있습니다.{1}", duplicate_emp_id_cnt, temp));
            return;
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript("상대그룹 설정에 오류가 없습니다.");
            return;
        }
    }
示例#6
0
    protected void ibnSaveRelGrp_Click(object sender, ImageClickEventArgs e)
    {
        Biz_RelGroupInfos relGrpInfo = new Biz_RelGroupInfos();

        if (PageWriteMode == WriteMode.New)
        {
            bool isOK = relGrpInfo.AddRelGroupInfo(COMP_ID
                                                   , EST_ID
                                                   , ESTTERM_REF_ID
                                                   , txtRelGrpName.Text
                                                   , txtRelGrpDesc.Text
                                                   , DateTime.Now
                                                   , EMP_REF_ID);

            if (isOK)
            {
                BindingRelGroupInfo(COMP_ID, EST_ID, ESTTERM_REF_ID);

                ButtonStatusByInit_RelGrp();
                ButtonStatusByInit_RelGrpPos();
                ClearValueControls_RelGrp();
                ClearValueControls_RelGrpPos();
                ClearValueControls_RelGrpDept();
                uwgRelGroupDept.Clear();
                uwgRelGrpPosInfo.Clear();
                uwgRelGrpPosData.Clear();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("정상적으로 등록되지 않았습니다.");
                return;
            }
        }
        else if (PageWriteMode == WriteMode.Modify)
        {
            if (REL_GRP_ID.Equals(""))
            {
                ltrScript.Text = JSHelper.GetAlertScript("");
                return;
            }

            bool isOK = relGrpInfo.ModifyRelGroupInfo(COMP_ID
                                                      , REL_GRP_ID
                                                      , EST_ID
                                                      , ESTTERM_REF_ID
                                                      , txtRelGrpName.Text
                                                      , txtRelGrpDesc.Text
                                                      , DateTime.Now
                                                      , EMP_REF_ID);

            if (isOK)
            {
                BindingRelGroupInfo(COMP_ID, EST_ID, ESTTERM_REF_ID);

                ButtonStatusByInit_RelGrp();
                ButtonStatusByInit_RelGrpPos();
                ClearValueControls_RelGrp();
                ClearValueControls_RelGrpPos();
                ClearValueControls_RelGrpDept();
                uwgRelGroupDept.Clear();
                uwgRelGrpPosInfo.Clear();
                uwgRelGrpPosData.Clear();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("정상적으로 수정되지 않았습니다.");
                return;
            }
        }

        ButtonStatusByInit_RelGrp();
    }
示例#7
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);
    }
示例#8
0
    protected void ibnSave_Click(object sender, ImageClickEventArgs e)
    {
        if (ESTTERM_REF_ID_FROM == ESTTERM_REF_ID_TO &&
            ESTTERM_SUB_ID_FROM == ESTTERM_SUB_ID_TO)
        {
            ltrScript.Text = JSHelper.GetAlertScript("기준대상과 피참조대상의 기간이 같습니다. 다시 설정하세요.");
            return;
        }

        bool isOK = false;

        if (TYPE.Equals("1"))
        {
            if (ESTTERM_REF_ID_FROM == ESTTERM_REF_ID_TO)
            {
                ltrScript.Text = JSHelper.GetAlertScript("기준대상과 피참조대상의 기간이 같습니다. 다시 설정하세요.");
                return;
            }

            Biz_DeptEstDetails deptEstDetail = new Biz_DeptEstDetails();
            Biz_DeptPosScales  deptPosScale  = new Biz_DeptPosScales();

            isOK = deptEstDetail.CopyDataFromTo(COMP_ID
                                                , ESTTERM_REF_ID_FROM
                                                , ESTTERM_REF_ID_TO
                                                , DateTime.Now
                                                , EMP_REF_ID);

            if (isOK)
            {
                deptPosScale.CopyDataFromTo(COMP_ID
                                            , ESTTERM_REF_ID_FROM
                                            , ESTTERM_REF_ID_TO
                                            , DateTime.Now
                                            , EMP_REF_ID);
            }
        }
        else if (TYPE.Equals("2"))
        {
            if (ESTTERM_REF_ID_FROM == ESTTERM_REF_ID_TO)
            {
                ltrScript.Text = JSHelper.GetAlertScript("기준대상과 피참조대상의 기간이 같습니다. 다시 설정하세요.");
                return;
            }

            Biz_DeptPosDetails deptPosScale = new Biz_DeptPosDetails();
            isOK = deptPosScale.CopyDataFromTo(COMP_ID
                                               , ESTTERM_REF_ID_FROM
                                               , ESTTERM_REF_ID_TO
                                               , DateTime.Now
                                               , EMP_REF_ID);
        }
        else if (TYPE.Equals("3"))
        {
            if (ESTTERM_REF_ID_FROM == ESTTERM_REF_ID_TO)
            {
                ltrScript.Text = JSHelper.GetAlertScript("기준대상과 피참조대상의 기간이 같습니다. 다시 설정하세요.");
                return;
            }

            Biz_RelGroupInfos relGroupInfo = new Biz_RelGroupInfos();
            isOK = relGroupInfo.CopyDataFromTo(COMP_ID
                                               , ESTTERM_REF_ID_FROM
                                               , ESTTERM_REF_ID_TO
                                               , DateTime.Now
                                               , EMP_REF_ID);
        }
        else if (TYPE.Equals("4"))
        {
            Biz_EmpEstTargetMaps empEstTgtMap = new Biz_EmpEstTargetMaps();
            isOK = empEstTgtMap.CopyDataFromTo(COMP_ID
                                               , ""
                                               , ESTTERM_REF_ID_FROM
                                               , ESTTERM_SUB_ID_FROM
                                               , ESTTERM_STEP_ID_FROM
                                               , ESTTERM_REF_ID_TO
                                               , ESTTERM_SUB_ID_TO
                                               , ESTTERM_STEP_ID_TO
                                               , DateTime.Now
                                               , EMP_REF_ID);
        }
        else if (TYPE.Equals("5"))
        {
            if (ESTTERM_REF_ID_FROM == ESTTERM_REF_ID_TO &&
                ESTTERM_SUB_ID_FROM == ESTTERM_SUB_ID_TO)
            {
                ltrScript.Text = JSHelper.GetAlertScript("기준대상과 피참조대상의 기간이 같습니다. 다시 설정하세요.");
                return;
            }

            Biz_QuestionDeptEmpMaps questionDeptEmp = new Biz_QuestionDeptEmpMaps();
            isOK = questionDeptEmp.CopyEstDataFromTo(COMP_ID
                                                     , ESTTERM_REF_ID_FROM
                                                     , ESTTERM_SUB_ID_FROM
                                                     , ESTTERM_REF_ID_TO
                                                     , ESTTERM_SUB_ID_TO
                                                     , DateTime.Now
                                                     , EMP_REF_ID);
        }

        if (isOK)
        {
            ltrScript.Text = JSHelper.GetAlertScript("정상적으로 데이터가 참조되었습니다.");
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript("참조 중 오류가 발생하였습니다.");
        }
    }