protected void Page_Load(object sender, EventArgs e) { COMP_ID = GetRequestByInt("COMP_ID"); REL_GRP_ID = GetRequest("REL_GRP_ID"); EST_ID = GetRequest("EST_ID"); ESTTERM_REF_ID = GetRequestByInt("ESTTERM_REF_ID"); ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); SENTENCE = BizUtility.GetRelGroupWhereString(COMP_ID , EST_ID , ESTTERM_REF_ID , REL_GRP_ID , "TM"); if (!Page.IsPostBack) { Biz_EstInfos estInfo = new Biz_EstInfos(COMP_ID, EST_ID); OwnerTypeMode = BizUtility.GetOwnerType(estInfo.Owner_Type); DropDownListCommom.BindEstTermSubByYearYN(ddlEstTermSubID, COMP_ID, ""); GridBinding(WebUtility.GetIntByValueDropDownList(ddlEstTermSubID), OwnerTypeMode); } ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); ltrScript.Text = ""; }
protected void ddlEstTermStepID_SelectedIndexChanged(object sender, EventArgs e) { if (MERGE_YN.Equals("Y")) { this.IESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } else { this.IESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } DoBindingData(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DropDownListCommom.BindComp(ddlCompID, lblCompTitle); DropDownListCommom.BindEstTerm(ddlEstTermRefID); DropDownListCommom.BindDefaultValue(ddlEstTermSubID, "----------", ""); DropDownListCommom.BindDefaultValue(ddlEstTermStepID, "----------", ""); ibnSearch.Attributes.Add("onclick", "return Search();"); iBtnPrjRemove.Attributes.Add("onclick", "return confirm('선택된 프로젝트를 질의지와의 매핑을 삭제하시겠습니까?');"); ibnConfirm.Attributes.Add("onclick", "return confirm('프로젝트 질의매핑을 확정하시겠습니까?')"); ibnConfirmCancel.Attributes.Add("onclick", "return confirm('확정을 취소하시겠습니까?')"); DropDownListCommom.BindEstStyle(ddlEstList, WebUtility.GetIntByValueDropDownList(ddlCompID), "PRJ"); int marker = 0; for (int i = 0; i < ddlEstList.Items.Count; i++) { if (ddlEstList.Items[marker].Text.Equals("프로젝트기여도평가")) { marker++; continue; } else { ddlEstList.Items.RemoveAt(marker); } } } COMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID); EST_ID = WebUtility.GetByValueDropDownList(ddlEstList); hdfSearchEstID.Value = EST_ID; ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID); ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); if (ddlEstTermStepID.Visible) { ESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } else { ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } Q_OBJ_ID = hdfQObjID.Value; ltrScript.Text = ""; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { EST_JOB_ID = "JOB_18"; DropDownListCommom.BindComp(ddlCompID, lblCompTitle); DropDownListCommom.BindEstTerm(ddlEstTermRefID); DropDownListCommom.BindDefaultValue(ddlEstTermSubID, "----------", ""); DropDownListCommom.BindDefaultValue(ddlEstTermStepID, "----------", ""); UltraWebGrid2.DisplayLayout.Bands[0].Columns.FromKey("DEPT_NAME").Hidden = true; UltraWebGrid2.DisplayLayout.Bands[0].Columns.FromKey("EMP_NAME").Hidden = true; UltraWebGrid2.DisplayLayout.Bands[0].Columns.FromKey("POS_CLS_NAME").Hidden = true; UltraWebGrid2.DisplayLayout.Bands[0].Columns.FromKey("POS_RNK_NAME").Hidden = true; UltraWebGrid2.DisplayLayout.Bands[0].Columns.FromKey("POS_DUT_NAME").Hidden = true; UltraWebGrid2.DisplayLayout.Bands[0].Columns.FromKey("POS_GRP_NAME").Hidden = true; ibnSearch.Attributes.Add("onclick", "return Search();"); iBtnDeptRemove.Attributes.Add("onclick", "return confirm('선택된 부서를 삭제하시겠습니까?');"); iBtnEmpRemove.Attributes.Add("onclick", "return confirm('선택된 사원을 삭제하시겠습니까?');"); ibnConfirm.Attributes.Add("onclick", "return confirm('피평가자 질의매핑을 확정하시겠습니까?')"); ibnConfirmCancel.Attributes.Add("onclick", "return confirm('확정을 취소하시겠습니까?')"); } COMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID); EST_ID = hdfSearchEstID.Value; ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID); ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); if (ddlEstTermStepID.Visible) { ESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } else { ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } Q_OBJ_ID = hdfQObjID.Value; ltrScript.Text = ""; }
private void DoBindingData() { this.IESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); if (MERGE_YN.Equals("Y")) { this.IESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } else { this.IESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } Biz_BiasDatas bizBiasData = new Biz_BiasDatas(); DataTable dtBiasData = bizBiasData.GetBiasData(this.ICOMP_ID, this.IEST_ID, this.IESTTERM_REF_ID, this.IESTTERM_SUB_ID, this.IESTTERM_STEP_ID, this.IBIAS_GRP_ID); ugrdBias.DataSource = dtBiasData; ugrdBias.DataBind(); if (ugrdBias.Rows.Count == 0) { ddlPointType.Visible = ibtnInsert.Visible = ibtnDownload.Visible = false;//ibtnConfirm.Visible = } else { //평가마감되었는지 확인 BizUtility.SetButtonVisibleByEstJobID(this.IEST_JOB_IDS , ibtnCalc , this.ICOMP_ID , this.IEST_ID , this.IESTTERM_REF_ID , this.IESTTERM_SUB_ID , this.IESTTERM_STEP_ID); ibtnInsert.Visible = ddlPointType.Visible = ibtnCalc.Visible;//ibtnConfirm.Visible = ibtnDownload.Visible = true; } lblRowCount.Text = ugrdBias.Rows.Count.ToString(); }
/// <summary> /// 그리드 바인딩 메소드 /// </summary> /// <param name="comp_id"></param> /// <param name="est_id"></param> /// <param name="estterm_ref_id"></param> /// <param name="estterm_sub_id"></param> /// <param name="estterm_step_id"></param> private void GridBidingData(int comp_id , string est_id , int estterm_ref_id , int estterm_sub_id , int estterm_step_id , int est_emp_id , bool isAll) { Biz_EstInfos estInfo = new Biz_EstInfos(comp_id, est_id); if (!estInfo.IsExists(comp_id, est_id)) { ltrScript.Text = JSHelper.GetAlertScript("선택된 회사의 평가정보가 없습니다."); return; } DropDownListCommom.BindEstTermSub(ddlEstTermSubID, comp_id, est_id, ""); DropDownListCommom.BindEstTermStep(ddlEstTermStepID, comp_id, est_id); // 처음 실행될때 if (estterm_sub_id.Equals(0)) { ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); } // 만약 주기가 년간일 경우 if (YEAR_YN.Equals("Y")) { ESTTERM_SUB_ID = BizUtility.GetEstTermSubIDByYearYN(COMP_ID); } // 만약 차수가 합산일 경우 if (MERGE_YN.Equals("Y")) { ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } else { // 만약 모든 차수를 보여 줘야하는 경우 if (ESTTERM_STEP_ALL_USE_YN.Equals("Y")) { ESTTERM_STEP_ID = 0; ddlEstTermStepID.Visible = false; } } WebUtility.FindByValueDropDownList(ddlEstTermRefID, estterm_ref_id); if (ddlEstTermSubID.Visible) { WebUtility.FindByValueDropDownList(ddlEstTermSubID, estterm_sub_id); } if (ddlEstTermStepID.Visible) { WebUtility.FindByValueDropDownList(ddlEstTermStepID, estterm_step_id); } // 상태 html HtmlScriptCommon.CreateStatusHtmlTable(tblViewStatus, est_id); Biz_Prj_Data objPrjData = new Biz_Prj_Data(); if (isAll) { est_emp_id = 0; } DataTable dt = objPrjData.GetPrjData(comp_id , est_id , estterm_ref_id , estterm_sub_id , estterm_step_id , 0 , est_emp_id , 0 , YEAR_YN , MERGE_YN).Tables[0]; UltraWebGrid1.Clear(); UltraWebGrid1.DataSource = dt; UltraWebGrid1.DataBind(); lblRowCount.Text = dt.Rows.Count.ToString(); }
protected void Page_Load(object sender, EventArgs e) { EST_JOB_IDS = WebUtility.GetRequest("EST_JOB_IDS"); EST_TGT_TYPE = WebUtility.GetRequest("EST_TGT_TYPE", "EST"); YEAR_YN = WebUtility.GetRequest("YEAR_YN", "N"); MERGE_YN = WebUtility.GetRequest("MERGE_YN", "N"); DEPT_COLUMN_NO_USE_YN = WebUtility.GetRequest("DEPT_COLUMN_NO_USE_YN", "N"); ESTTERM_SUB_ALL_USE_YN = WebUtility.GetRequest("ESTTERM_SUB_ALL_USE_YN", "N"); ESTTERM_STEP_ALL_USE_YN = WebUtility.GetRequest("ESTTERM_STEP_ALL_USE_YN", "N"); if (!Page.IsPostBack) { DropDownListCommom.BindComp(ddlCompID, lblCompTitle); DropDownListCommom.BindEstTerm(ddlEstTermRefID); DropDownListCommom.BindDefaultValue(ddlEstTermSubID, "----------", ""); DropDownListCommom.BindDefaultValue(ddlEstTermStepID, "----------", ""); if (COMP_ID == 0) { COMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID); } if (ESTTERM_REF_ID == 0) { ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID); } if (ESTTERM_SUB_ID == 0) { ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); } if (ESTTERM_STEP_ID == 0) { ESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } ibnSearch.Attributes.Add("onclick", "return Search();"); ibnConfirmEstQ.Attributes.Add("onclick", "return confirm('질의평가를 확정하시겠습니까?');"); ibnAggEstTermStep.Attributes.Add("onclick", "return confirm('평가차수 간에 가중치를 반영하여 점수를 집계하시겠습니까?');"); ibnGetPrjPoint.Attributes.Add("onclick", "return confirm('프로젝트 점수를 반영하시겠습니까?');"); ibnProjectToEmpData.Attributes.Add("onclick", "return confirm('사원별 점수로 반영하시겠습니까?');"); if (!WebUtility.GetRequest("EST_ID").Equals("")) { txtSearchEstName.Visible = false; imgEstButton.Visible = false; ibnSearch.Visible = false; hdfSearchEstID.Value = WebUtility.GetRequest("EST_ID"); EST_ID = hdfSearchEstID.Value; GridBidingData(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , EMP_REF_ID , SEARCH_ALL); BizUtility.SetButtonVisibleCommandNameByRolID(EMP_REF_ID, tdImgBox.Controls); BizUtility.SetButtonVisibleByEstJobID(EST_JOB_IDS , tdImgBox.Controls , COMP_ID , hdfSearchEstID.Value , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID); SetConfirmStatusHtml(EST_JOB_IDS); } } COMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID); EST_ID = hdfSearchEstID.Value; ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID); if (YEAR_YN.Equals("Y")) { ESTTERM_SUB_ID = BizUtility.GetEstTermSubIDByYearYN(COMP_ID); } else { ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); } if (MERGE_YN.Equals("Y")) { ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } else { if (ESTTERM_STEP_ALL_USE_YN.Equals("Y")) { ESTTERM_STEP_ID = 0; } else { ESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } } ltrScript.Text = ""; // 상태 html HtmlScriptCommon.CreateStatusHtmlTable(tblViewStatus, EST_ID); }
protected void Page_Load(object sender, EventArgs e) { EST_JOB_IDS = WebUtility.GetRequest("EST_JOB_IDS"); EST_TGT_TYPE = WebUtility.GetRequest("EST_TGT_TYPE", "EST"); YEAR_YN = WebUtility.GetRequest("YEAR_YN", "N"); MERGE_YN = WebUtility.GetRequest("MERGE_YN", "N"); DEPT_COLUMN_NO_USE_YN = WebUtility.GetRequest("DEPT_COLUMN_NO_USE_YN", "N"); ESTTERM_SUB_ALL_USE_YN = WebUtility.GetRequest("ESTTERM_SUB_ALL_USE_YN", "N"); ESTTERM_STEP_ALL_USE_YN = WebUtility.GetRequest("ESTTERM_STEP_ALL_USE_YN", "N"); EST_JOB_ID = "JOB_04"; EST_JOB_IDS = "JOB_04"; BizUtility.SetButtonVisibleCommandNameByRolID(EMP_REF_ID, ibnApplyBiasPoint); BizUtility.SetButtonVisibleCommandNameByRolID(EMP_REF_ID, ibnCalcBiasPoint); if (!Page.IsPostBack) { DropDownListCommom.BindComp(ddlCompID, lblCompTitle); DropDownListCommom.BindEstTerm(ddlEstTermRefID); DropDownListCommom.BindDefaultValue(ddlEstTermSubID, "----------", ""); DropDownListCommom.BindDefaultValue(ddlEstTermStepID, "----------", ""); DropDownListCommom.BindBiasType(ddlBiasTypeID); if (COMP_ID == 0) { COMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID); } if (ESTTERM_REF_ID == 0) { ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID); } if (ESTTERM_SUB_ID == 0) { ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); } if (ESTTERM_STEP_ID == 0) { ESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } ibnSearch.Attributes.Add("onclick", "return Search();"); ibnApplyBiasPoint.Attributes.Add("onclick", "return confirm('정말 선택된 조정방식으로 점수를 Bias 조정 하시겠습니까?');"); ibnCalcBiasPoint.Attributes.Add("onclick", "return confirm('Bias 조정점수를 계산 실행하시겠습니까?');"); if (!WebUtility.GetRequest("EST_ID").Equals("")) { txtSearchEstName.Visible = false; imgEstButton.Visible = false; ibnSearch.Visible = false; hdfSearchEstID.Value = WebUtility.GetRequest("EST_ID"); EST_ID = hdfSearchEstID.Value; BindingData(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , GraphType , DataType); //2011.12.27 박효동 : 아래는 없던건데 만들어놓았다..일단은 없이 가자고 함(허성덕과장) //Biz_EstInfos bizEstInfo = new Biz_EstInfos(COMP_ID, EST_ID); //if (bizEstInfo.Bias_Type_ID != "" && bizEstInfo.Bias_YN != "") //{ // PageUtility.FindByValueDropDownList(ddlBiasTypeID, bizEstInfo.Bias_Type_ID); // ddlBiasTypeID.Enabled = false; //} } } COMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID); EST_ID = hdfSearchEstID.Value; ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID); if (YEAR_YN.Equals("Y")) { ESTTERM_SUB_ID = BizUtility.GetEstTermSubIDByYearYN(COMP_ID); } else { ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); } if (MERGE_YN.Equals("Y")) { ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } else { if (ESTTERM_STEP_ALL_USE_YN.Equals("Y")) { ESTTERM_STEP_ID = 0; } else { ESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } } DEPT_VALUES = hdfEstDept.Value; ltrScript.Text = ""; }
private void BindingData(int comp_id , string est_id , int estterm_ref_id , int estterm_sub_id , int estterm_step_id , string graphType , BiasType dataType) { Biz_EstInfos estInfo = new Biz_EstInfos(comp_id, est_id); if (!estInfo.IsExists(comp_id, est_id)) { ltrScript.Text = JSHelper.GetAlertScript("선택된 회사의 평가정보가 없습니다."); return; } DropDownListCommom.BindEstTermSub(ddlEstTermSubID, comp_id, est_id, ""); DropDownListCommom.BindEstTermStep(ddlEstTermStepID, comp_id, est_id); // 처음 실행될때 if (estterm_sub_id.Equals(0)) { ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); } // 만약 주기가 년간일 경우 if (YEAR_YN.Equals("Y")) { ESTTERM_SUB_ID = BizUtility.GetEstTermSubIDByYearYN(COMP_ID); } // 만약 차수가 합산일 경우 if (MERGE_YN.Equals("Y")) { ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } else { // 만약 모든 차수를 보여 줘야하는 경우 if (ESTTERM_STEP_ALL_USE_YN.Equals("Y")) { ESTTERM_STEP_ID = 0; ddlEstTermStepID.Visible = false; } } WebUtility.FindByValueDropDownList(ddlEstTermRefID, estterm_ref_id); if (ddlEstTermSubID.Visible) { WebUtility.FindByValueDropDownList(ddlEstTermSubID, estterm_sub_id); } if (ddlEstTermStepID.Visible) { WebUtility.FindByValueDropDownList(ddlEstTermStepID, estterm_step_id); } if (estInfo.Owner_Type.Equals("D")) { OwnerTypeMode = OwnerType.Dept; } else { OwnerTypeMode = OwnerType.Emp_User; } ScaleTypeMode = estInfo.Scale_Type; WeightTypeMode = estInfo.Weight_Type; if (estInfo.Bias_YN.Equals("Y")) { BiasYN = YesNo.Yes; } else { BiasYN = YesNo.No; } if (estInfo.Grade_Confirm_YN.Equals("Y")) { GradeConfirmYN = YesNo.Yes; } else { GradeConfirmYN = YesNo.No; } Biz_Datas est_data = new Biz_Datas(); int est_emp_id = 0;; int tgt_dept_id = 0; int tgt_emp_id = 0; if (OwnerTypeMode == OwnerType.Dept) { if (EST_TGT_TYPE.Equals("EST")) { est_emp_id = EMP_REF_ID; tgt_dept_id = 0; tgt_emp_id = 0; } else if (EST_TGT_TYPE.Equals("TGT")) { est_emp_id = 0; tgt_dept_id = BizUtility.GetDeptID(EMP_REF_ID); tgt_emp_id = -1; } } else if (OwnerTypeMode == OwnerType.Emp_User) { if (EST_TGT_TYPE.Equals("EST")) { est_emp_id = EMP_REF_ID; tgt_dept_id = 0; tgt_emp_id = 0; } else if (EST_TGT_TYPE.Equals("TGT")) { est_emp_id = 0; tgt_dept_id = 0; tgt_emp_id = EMP_REF_ID; } } if (OwnerTypeMode == OwnerType.Dept && COL_DEPT_TO_EMP_DATA.Equals("Y")) { OwnerTypeMode = OwnerType.Emp_User; } else if (OwnerTypeMode == OwnerType.Emp_User && COL_DEPT_TO_EMP_DATA.Equals("Y")) { OwnerTypeMode = OwnerType.Dept; } if (estInfo.Bias_Dept_Use_YN.Equals("Y")) { tdBiasDept.Visible = true; } else { tdBiasDept.Visible = false; hdfEstDept.Value = ""; } BindChart(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , GraphType , DataType , DEPT_VALUES); }
/// <summary> /// 그리드 바인딩 메소드 /// </summary> /// <param name="comp_id"></param> /// <param name="est_id"></param> /// <param name="estterm_ref_id"></param> /// <param name="estterm_sub_id"></param> /// <param name="estterm_step_id"></param> private void GridBidingData(int comp_id , string est_id , int estterm_ref_id , int estterm_sub_id , int estterm_step_id) { Biz_EstInfos estInfo = new Biz_EstInfos(comp_id, est_id); if (!estInfo.IsExists(comp_id, est_id)) { return; } // 만약 주기가 년간일 경우 if (YEAR_YN.Equals("Y")) { ESTTERM_SUB_ID = BizUtility.GetEstTermSubIDByYearYN(COMP_ID); } // 만약 차수가 합산일 경우 if (MERGE_YN.Equals("Y")) { ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } if (estInfo.Owner_Type != null && estInfo.Owner_Type.Equals("D")) { OwnerTypeMode = OwnerType.Dept; } else { OwnerTypeMode = OwnerType.Emp_User; } //if (estInfo.Owner_Type.Equals("D")) // OwnerTypeMode = OwnerType.Dept; //else // OwnerTypeMode = OwnerType.Emp_User; ScaleTypeMode = estInfo.Scale_Type; WeightTypeMode = estInfo.Weight_Type; if (estInfo.Bias_YN.Equals("Y")) { BiasYN = YesNo.Yes; } else { BiasYN = YesNo.No; } if (estInfo.Grade_Confirm_YN.Equals("Y")) { GradeConfirmYN = YesNo.Yes; } else { GradeConfirmYN = YesNo.No; } Biz_Datas est_data = new Biz_Datas(); int est_emp_id = 0;; int tgt_dept_id = 0; int tgt_emp_id = 0; if (OwnerTypeMode == OwnerType.Dept && DEPT_COLUMN_NO_USE_YN.Equals("Y")) { OwnerTypeMode = OwnerType.Emp_User; } else if (OwnerTypeMode == OwnerType.Emp_User && DEPT_COLUMN_NO_USE_YN.Equals("Y")) { OwnerTypeMode = OwnerType.Dept; } if (OwnerTypeMode == OwnerType.Dept) { if (EST_TGT_TYPE.Equals("EST")) { est_emp_id = 0; tgt_dept_id = TGT_DEPT_ID; tgt_emp_id = -1; } else if (EST_TGT_TYPE.Equals("TGT")) { est_emp_id = 0; tgt_dept_id = TGT_DEPT_ID; tgt_emp_id = -1; } } else if (OwnerTypeMode == OwnerType.Emp_User) { if (EST_TGT_TYPE.Equals("EST")) { est_emp_id = 0; tgt_dept_id = 0; tgt_emp_id = TGT_EMP_ID; } else if (EST_TGT_TYPE.Equals("TGT")) { est_emp_id = 0; tgt_dept_id = 0; tgt_emp_id = TGT_EMP_ID; } } DT_EST_DATA = est_data.GetEstData(comp_id , est_id , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , 0 , est_emp_id , tgt_dept_id , tgt_emp_id , YEAR_YN , MERGE_YN , OwnerTypeMode).Tables[0]; // 조회된 데이터가 존재할 경우 if (DT_EST_DATA != null) { // 만약 가중치 보이기 Y 일때 if (COL_WEIGHT_VISIBLE_YN.Equals("Y")) { //2012.01.16 박효동 : 하위평가를 가져오니 문제가 있어서 수정 // - MBO의 하위평가를 가져오도록 평가컬럼설정이 되있는데 현재는 현재평가의 하위차수를 가져오니 안나오더라 // - 해서 평가컬럼설정에 등록되어있는 POINT_평가아이디에 해당하는 평가아이디를 가져오도록 수정 휴~~ // 하위평가 정보를 가지고 온다. //DataTable _dtEstID = estInfo.GetEstInfoByUpEstID(comp_id, est_id).Tables[0]; DataTable _dtEstID = estInfo.GetEstInfoByUpEstID(comp_id, est_id).Tables[0]; _dtEstID.Rows.Clear(); Biz_ColumnInfos colInfo = new Biz_ColumnInfos(); DataTable dtEstID = colInfo.GetColumnInfo(COMP_ID, EST_ID).Tables[0]; foreach (DataRow dr in dtEstID.Rows) { string colnames = dr[6].ToString(); if (colnames.Length > 5) { if (colnames.Substring(0, 6) == "POINT_" && colnames.Length == 8) { DataRow insertDR = _dtEstID.NewRow(); insertDR["EST_ID"] = colnames.Remove(0, 6); _dtEstID.Rows.Add(insertDR); insertDR = null; } } } foreach (DataRow dataRow in _dtEstID.Rows) { DT_EST_DATA.Columns.Add(string.Format("WEIGHT_{0}", dataRow["EST_ID"]), typeof(double)); // 평가별 점수 보이기 여부에 따라 if (COL_POINT_VISIBLE_YN.Equals("Y")) { DT_EST_DATA.Columns.Add(string.Format("POINT_{0}", dataRow["EST_ID"]), typeof(double)); DataTable dtEstData = est_data.GetData(comp_id , dataRow["EST_ID"].ToString() , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , 0 , est_emp_id , tgt_dept_id , tgt_emp_id , YEAR_YN , MERGE_YN , OwnerTypeMode).Tables[0]; foreach (DataRow drEstData in dtEstData.Rows) { DataRow[] drArrEstData = DT_EST_DATA.Select(string.Format(@"ESTTERM_REF_ID = {0} AND ESTTERM_SUB_ID = {1} AND ESTTERM_STEP_ID = {2} AND TGT_DEPT_ID = {3} AND TGT_EMP_ID = {4}" , drEstData["ESTTERM_REF_ID"] , drEstData["ESTTERM_SUB_ID"] , drEstData["ESTTERM_STEP_ID"] , drEstData["TGT_DEPT_ID"] , drEstData["TGT_EMP_ID"])); if (drArrEstData.Length > 0) { drArrEstData[0][string.Format("POINT_{0}", dataRow["EST_ID"])] = drEstData["POINT"]; } } } } } // 등급 컬럼 보이기가 Y 일경우 (이건 DT_EST_DATA 과 관계 없음) if (COL_GRADE_VISIBLE_YN.Equals("Y") || COL_GRADE_TO_POINT_VISIBLE_YN.Equals("Y")) { Biz_DeptEstDetails deptEstDetail = new Biz_DeptEstDetails(); DT_DEPT_SCALE = deptEstDetail.GetDeptEstDetail(comp_id, estterm_ref_id, 0, est_id).Tables[0]; Biz_DeptPosScales deptPosScale = new Biz_DeptPosScales(); DT_POS_SCALE = deptPosScale.GetDeptPosScale(comp_id, estterm_ref_id, 0, est_id).Tables[0]; Biz_Scopes scope = new Biz_Scopes(); DT_SCOPE = scope.GetScope(comp_id, est_id).Tables[0]; DT_EST_DATA.Columns.Add("RANK", typeof(double)); DT_EST_DATA.Columns.Add("SCALE_ID", typeof(string)); DT_EST_DATA.Columns.Add("SCALE_NAME", typeof(string)); DT_EST_DATA.Columns.Add("GRADE_CALC_ID", typeof(string)); } if (COL_ESTTERM_SUB_AGG_VISIBLE_YN.Equals("Y")) { } if (COL_ESTTERM_STEP_AGG_VISIBLE_YN.Equals("Y")) { } if (COL_CTRL_POINT_VISIBLE_YN.Equals("Y") || COL_CTRL_GRADE_VISIBLE_YN.Equals("Y")) { Biz_CtrlEstMaps ctrlEstDeptMap = new Biz_CtrlEstMaps(); DT_CTRL_INFO = ctrlEstDeptMap.GetCtrlInfoByEstID(COMP_ID, EST_ID).Tables[0]; DT_CTRL_EST_DEPT_MAP = ctrlEstDeptMap.GetCtrlEstDeptByEstID(COMP_ID, EST_ID).Tables[0]; if (COL_CTRL_POINT_VISIBLE_YN.Equals("Y")) { Biz_CtrlPointDatas ctrlPointData = new Biz_CtrlPointDatas(); DT_CTRL_POINT_DATA = ctrlPointData.GetCtrlPointData(comp_id , est_id , estterm_ref_id , estterm_sub_id , estterm_step_id , 0 , 0 , 0 , 0).Tables[0]; } if (COL_CTRL_GRADE_VISIBLE_YN.Equals("Y")) { Biz_CtrlGradeDatas ctrlGradeData = new Biz_CtrlGradeDatas(); DT_CTRL_GRADE_DATA = ctrlGradeData.GetCtrlGradeData(comp_id , est_id , estterm_ref_id , estterm_sub_id , estterm_step_id , 0 , 0 , 0 , 0).Tables[0]; } } UltraWebGrid1.Clear(); UltraWebGrid1.DataSource = DT_EST_DATA; UltraWebGrid1.DataBind(); } }
/// <summary> /// 평가차수에 따른 점수를 가중치로 계산하여 집계하는 메소드 /// </summary> /// <param name="est_id"></param> /// <param name="estterm_ref_id"></param> /// <param name="estterm_sub_id"></param> /// <returns></returns> public bool AggregateEstTermStepEstData(int comp_id , string est_id , int estterm_ref_id , int estterm_sub_id , int estterm_step_id_merge_y , double total_weight_estterm_step , string year_yn , string merge_yn) { int affectedRow = 0; IDbConnection conn = DbAgentHelper.CreateDbConnection(); conn.Open(); IDbTransaction trx = conn.BeginTransaction(); try { // 존재하는 테이터를 우선 삭제한다. affectedRow += _data.Delete(conn , trx , comp_id , est_id , estterm_ref_id , estterm_sub_id , BizUtility.GetEstTermStepIDByMergeYN(comp_id) , 0 , 0 , 0 , year_yn , "Y"); DataTable dtBlank = GetDataTableSchema(); DataRow dataRow = null; DataTable dtPrjData = _data.SelectPrjData(comp_id , est_id , estterm_ref_id , estterm_sub_id , 0 , 0 , 0 , 0 , 0 , 0 , year_yn , merge_yn).Tables[0]; foreach (DataRow drPrjData in dtPrjData.Rows) { // 빈 데이터 테이블에 존재하는 피평가 대상자 있는 지 확인 후 // 있다면 존재하는 데이터에 가중치를 계산하여 수정하지만 // 존재하지 않다면 새로운 데이터 Row를 생성하여 삽입한다. DataRow[] drArr = dtBlank.Select(string.Format(@"COMP_ID = {0} AND EST_ID = '{1}' AND ESTTERM_REF_ID = {2} AND ESTTERM_SUB_ID = {3} AND ESTTERM_STEP_ID = {4} AND PRJ_REF_ID = {5}" , drPrjData["COMP_ID"] , drPrjData["EST_ID"] , drPrjData["ESTTERM_REF_ID"] , drPrjData["ESTTERM_SUB_ID"] , estterm_step_id_merge_y , drPrjData["PRJ_REF_ID"])); if (drArr.Length == 0) { dataRow = dtBlank.NewRow(); } else { dataRow = drArr[0]; } dataRow["COMP_ID"] = drPrjData["COMP_ID"]; dataRow["EST_ID"] = drPrjData["EST_ID"]; dataRow["ESTTERM_REF_ID"] = drPrjData["ESTTERM_REF_ID"]; dataRow["ESTTERM_SUB_ID"] = drPrjData["ESTTERM_SUB_ID"]; dataRow["ESTTERM_STEP_ID"] = BizUtility.GetEstTermStepIDByMergeYN(comp_id); dataRow["EST_DEPT_ID"] = drPrjData["EST_DEPT_ID"]; dataRow["EST_EMP_ID"] = drPrjData["EST_EMP_ID"]; dataRow["PRJ_REF_ID"] = drPrjData["PRJ_REF_ID"]; dataRow["POINT"] = DataTypeUtility.GetToDouble(dataRow["POINT"]) + DataTypeUtility.GetToDouble(drPrjData["POINT"]) * (DataTypeUtility.GetToDouble(drPrjData["WEIGHT_ESTTERM_STEP"]) / total_weight_estterm_step); dataRow["POINT_DATE"] = DateTime.Now; dataRow["STATUS_ID"] = "E"; dataRow["STATUS_DATE"] = DateTime.Now; dataRow["DATE"] = DateTime.Now; dataRow["USER"] = drPrjData["UPDATE_USER"]; if (drArr.Length == 0) { dtBlank.Rows.Add(dataRow); } } foreach (DataRow drBlank in dtBlank.Rows) { affectedRow += _data.Insert(conn , trx , drBlank["COMP_ID"] , drBlank["EST_ID"] , drBlank["ESTTERM_REF_ID"] , drBlank["ESTTERM_SUB_ID"] , drBlank["ESTTERM_STEP_ID"] , drBlank["EST_DEPT_ID"] , drBlank["EST_EMP_ID"] , drBlank["PRJ_REF_ID"] , drBlank["POINT"] , drBlank["POINT_DATE"] , drBlank["STATUS_ID"] , drBlank["STATUS_DATE"] , dataRow["DATE"] , dataRow["USER"]); } trx.Commit(); } catch (Exception ex) { trx.Rollback(); return(false); } finally { conn.Close(); } return((affectedRow > 0) ? true : false); }
protected void Page_Load(object sender, EventArgs e) { YEAR_YN = WebUtility.GetRequest("YEAR_YN", "N"); MERGE_YN = WebUtility.GetRequest("MERGE_YN", "N"); EST_JOB_IDS = WebUtility.GetRequest("EST_JOB_IDS"); //BizUtility.SetButtonVisibleCommandNameByRolID(EMP_REF_ID, ibnApplyBiasPoint); //BizUtility.SetButtonVisibleCommandNameByRolID(EMP_REF_ID, ibnCalcBiasPoint); if (!Page.IsPostBack) { this.IEST_ID = WebUtility.GetRequest("EST_ID", ""); this.IEST_JOB_IDS = WebUtility.GetRequest("EST_JOB_IDS", ""); lblCalc1.Font.Size = lblCalc2.Font.Size = FontUnit.Point(8); DropDownListCommom.BindComp(ddlCompID, lblCompTitle); DropDownListCommom.BindEstTerm(ddlEstTermRefID); DropDownListCommom.BindDefaultValue(ddlEstTermSubID, "----------", ""); DropDownListCommom.BindDefaultValue(ddlEstTermStepID, "----------", ""); if (this.ICOMP_ID == 0) { this.ICOMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID); } if (this.IESTTERM_REF_ID == 0) { this.IESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID); } DropDownListCommom.BindEstTermSub(ddlEstTermSubID, this.ICOMP_ID, this.IEST_ID, ""); DropDownListCommom.BindEstTermStep(ddlEstTermStepID, this.ICOMP_ID, this.IEST_ID); if (this.IESTTERM_SUB_ID == 0) { this.IESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); } if (this.IESTTERM_STEP_ID == 0) { this.IESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } if (MERGE_YN.Equals("Y")) { this.IESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } else { if (ESTTERM_STEP_ALL_USE_YN.Equals("Y")) { this.IESTTERM_STEP_ID = 0; } else { this.IESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } } //평가마감되었는지 확인 BizUtility.SetButtonVisibleByEstJobID(this.IEST_JOB_IDS , ibtnCalc , this.ICOMP_ID , this.IEST_ID , this.IESTTERM_REF_ID , this.IESTTERM_SUB_ID , this.IESTTERM_STEP_ID); ibtnInsert.Visible = ddlPointType.Visible = ibtnCalc.Visible;//ibtnConfirm.Visible = Biz_BiasDatas bizBiasData = new Biz_BiasDatas(); DataTable dtGroup = bizBiasData.GetBiasGroup(this.ICOMP_ID, this.IEST_ID, "Y"); ddlGroup.DataTextField = "BIAS_GRP_NM"; ddlGroup.DataValueField = "BIAS_GRP_ID"; ddlGroup.DataSource = dtGroup; ddlGroup.DataBind(); ddlGroup.Width = Unit.Pixel(200); this.IBIAS_GRP_ID = WebUtility.GetIntByValueDropDownList(ddlGroup); DataTable dtPointType = bizBiasData.GetBiasColumns(this.ICOMP_ID, this.IEST_ID, "Y", "Y"); if (dtPointType.Rows.Count > 0) { DataRow[] drPointType = dtPointType.Select("COL_TYPE = 'USERKEY' AND PROC_TYPE = 'Y'", "COL_ORDER ASC"); foreach (DataRow dr in drPointType) { ddlPointType.Items.Add(new ListItem(dr["COL_NAME"].ToString(), dr["COL_KEY"].ToString())); } if (ddlPointType.Items.Count > 0) { ddlPointType.Items[0].Selected = true; } } if (!this.IEST_ID.Equals("")) { DoBindingData(); } else { ibtnCalc.Visible = ddlPointType.Visible = ibtnInsert.Visible = ibtnDownload.Visible = false;//ibtnConfirm.Visible = } DoBindingBiasMethod(); } if (YEAR_YN.Equals("Y")) { this.IESTTERM_SUB_ID = BizUtility.GetEstTermSubIDByYearYN(COMP_ID); } else { this.IESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID); } if (MERGE_YN.Equals("Y")) { this.IESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID); } else { this.IESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID); } DoSortColumn(); if (ddlPointType.Items.Count == 0) { ibtnInsert.Visible = ddlPointType.Visible = false;//ibtnConfirm.Visible = } ltrScript.Text = ""; }