示例#1
0
 public Biz_Prj_Info()
 {
     _data = new Dac_Prj_Info();
 }
示例#2
0
        /// <summary>
        /// PMS_INFO에서 프로젝트 투입인원 평가 및 프로젝트 평가 바탕 정보를 추가
        /// </summary>
        public int Add_Prj_Data(IDbConnection conn, IDbTransaction trx
                                , string PRJ_ID
                                , int COMP_ID
                                , string EST_ID
                                , int ESTTERM_REF_ID
                                , int ESTTERM_SUB_ID
                                , int ESTTERM_STEP_ID
                                , int USER_REF_ID)
        {
            MicroBSC.Integration.PMS.Dac.Dac_Pms_Info     dacPmsInfo    = new MicroBSC.Integration.PMS.Dac.Dac_Pms_Info();
            MicroBSC.Integration.COM.Dac.Dac_Rel_Dept_Emp dacRelDeptEmp = new MicroBSC.Integration.COM.Dac.Dac_Rel_Dept_Emp();
            Dac_Prj_Info dacPrjInfo = new Dac_Prj_Info();

            DataTable PmsInfo = dacPmsInfo.Select_Prj_Detail(conn, trx, PRJ_ID);


            int affectedRow = 0;

            int prj_ref_id = dacPrjInfo.Select_Prj_Ref_Id(conn, trx, PRJ_ID);

            _data.Delete_Prj_Data(conn, trx, prj_ref_id);



            for (int i = 0; i < PmsInfo.Rows.Count; i++)
            {
                string est_dept_id = PmsInfo.Rows[i]["TEAM_BSC_DEPT_ID"].ToString();
                string est_emp_id  = PmsInfo.Rows[i]["PM_BSC_EMP_ID"].ToString();


                string tgt_emp_id  = PmsInfo.Rows[i]["EMPLOYEE_BSC_EMP_ID"].ToString();
                string tgt_dept_id = dacRelDeptEmp.Select_Dept_ID_of_Emp_ID(conn, trx, tgt_emp_id);


                string STATUS_ID = "N";



                //PM이 피평가자로 설정되어있는 경우는 프로젝트 평가로 입력
                if (tgt_emp_id.Equals(est_emp_id))
                {
                    tgt_dept_id = "-1";
                    tgt_emp_id  = "-1";

                    affectedRow += _data.Insert_Prj_Data(conn, trx
                                                         , 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
                                                         , prj_ref_id.ToString()
                                                         , DBNull.Value
                                                         , DBNull.Value
                                                         , STATUS_ID
                                                         , USER_REF_ID);
                }
                else
                {
                    affectedRow += _data.Insert_Prj_Data(conn, trx
                                                         , 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
                                                         , prj_ref_id.ToString()
                                                         , DBNull.Value
                                                         , DBNull.Value
                                                         , STATUS_ID
                                                         , USER_REF_ID);
                }
            }


            return(affectedRow);
        }