protected void ibnEmp_Click(object sender, ImageClickEventArgs e) { int cnt = UltraWebGrid2.Rows.Count; string emp_ref_id_list = string.Empty; for (int i = 0; i < cnt; i++) { UltraGridRow row = UltraWebGrid2.Rows[i]; TemplatedColumn selchk = (TemplatedColumn)row.Band.Columns.FromKey("selchk"); CheckBox cBox = (CheckBox)((CellItem)selchk.CellItems[row.BandIndex]).FindControl("cBox"); if (cBox.Checked) { emp_ref_id_list += "," + DataTypeUtility.GetValue(row.Cells.FromKey("EMP_REF_ID").Value); } } DataTable dtEmp = new DataTable(); if (emp_ref_id_list.Length > 0) { emp_ref_id_list = emp_ref_id_list.Remove(0, 1); dtEmp = DataTypeUtility.FilterSortDataTable(DT_DEPTEMP, string.Format(" EMP_REF_ID IN ({0}) ", emp_ref_id_list)); } DataTable dtDelEmp = DataTypeUtility.FilterSortDataTable(DT_DEPTEMP, string.Format(" DEPT_REF_ID IN ({0}) ", DEPT_REF_ID)); MicroBSC.Integration.MUL.Biz.Biz_Mul_Est_Emp BizMulEstEmp = new MicroBSC.Integration.MUL.Biz.Biz_Mul_Est_Emp(); string okMsg = BizMulEstEmp.AddEstEmp(dtDelEmp , dtEmp , COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , rdoEstTypeList.SelectedValue , DateTime.Now , this.gUserInfo.Emp_Ref_ID); if (okMsg.Length == 0) { ltrScript.Text = JSHelper.GetAlertScript("정상 처리 되었습니다.", false); DoBinding_Dept(); DEPT_REF_ID = -1; UltraWebGrid2.Clear(); } else { ltrScript.Text = JSHelper.GetAlertScript(okMsg); } }
private void DoBinding_Dept() { DEPT_REF_ID = -1; UltraWebGrid1.Clear(); UltraWebGrid2.Clear(); MicroBSC.Integration.EST.Biz.Biz_Est_Emp_Est_Target_Map bizEmpEstTargetMaps = new MicroBSC.Integration.EST.Biz.Biz_Est_Emp_Est_Target_Map(); //MicroBSC.Estimation.Biz.Biz_EmpEstTargetMaps bizEmpEstTargetMaps = new Biz_EmpEstTargetMaps(); DT_ESTTARGETMAP = bizEmpEstTargetMaps.GetEmpEstTargetMap(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ConESTTERM_STEP_ID , 0 , 0 , 0 , 0).Tables[0]; DataRow[] rows = DT_ESTTARGETMAP.Select(string.Format(" DIRECTION_TYPE = '{0}' ", ConDIRECTION_TYPE)); if (rows.Length > 0) { ibnDeptAdd.Visible = false; ibnDeptDel.Visible = false; ibnEmp.Visible = false; } else { ibnDeptAdd.Visible = true; ibnDeptDel.Visible = true; ibnEmp.Visible = true; } MicroBSC.Integration.MUL.Biz.Biz_Mul_Est_Emp bizMulEstEmp = new MicroBSC.Integration.MUL.Biz.Biz_Mul_Est_Emp(); DataTable dtMulEstEmp = bizMulEstEmp.GetDeptMapping_DB(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID); UltraWebGrid1.DataSource = dtMulEstEmp; UltraWebGrid1.DataBind(); if (dtMulEstEmp.Rows.Count > 0) { ibnDeptAdd.Enabled = true; ibnDeptDel.Enabled = true; } else { ibnDeptAdd.Enabled = false; ibnDeptDel.Enabled = false; } // 평가자 목록 (EST_TYPE : EST) DT_ESTEMP = bizMulEstEmp.GetEstEmp_DB(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , 0 , ""); //// 피평가자 목록 (EST_TYPE : TGT) //DT_TGTEMP = bizMulEstEmp.GetEstEmp_DB(COMP_ID // , EST_ID // , ESTTERM_REF_ID // , ESTTERM_SUB_ID // , 0 // , "TGT"); MicroBSC.Integration.COM.Biz.Biz_Rel_Dept_Emp bizRelDeptEmp = new MicroBSC.Integration.COM.Biz.Biz_Rel_Dept_Emp(); DT_DEPTEMP = bizRelDeptEmp.GetRelDeptEmp_DB(0 , COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID); }
private void DoBinding_Dept() { MicroBSC.Integration.EST.Biz.Biz_Est_Data bizEstData = new MicroBSC.Integration.EST.Biz.Biz_Est_Data(); DT_EST_DATA = bizEstData.GetEstData(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ConESTTERM_STEP_ID , ConDIRECTION_TYPE); DEPT_REF_ID = -1; UltraWebGrid1.Clear(); UltraWebGrid2.Clear(); UltraWebGrid3.Clear(); MicroBSC.Integration.EST.Biz.Biz_Est_Emp_Est_Target_Map bizEmpEstTargetMaps = new MicroBSC.Integration.EST.Biz.Biz_Est_Emp_Est_Target_Map(); DT_ESTTARGETMAP = bizEmpEstTargetMaps.GetEmpEstTargetMap(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ConESTTERM_STEP_ID , 0 , 0 , 0 , 0).Tables[0]; string[] groupBy = { "TGT_DEPT_ID" , "TGT_DEPT_NAME" , "TGT_EMP_ID" , "TGT_EMP_NAME" , "TGT_POS_CLS_ID" , "TGT_POS_CLS_NAME" , "TGT_POS_DUT_ID" , "TGT_POS_DUT_NAME" , "TGT_POS_GRP_ID" , "TGT_POS_GRP_NAME" , "TGT_POS_RNK_ID" , "TGT_POS_RNK_NAME" , "TGT_POS_KND_ID" , "TGT_POS_KND_NAME" , "DIRECTION_TYPE" }; DataTable dtEst = DT_ESTTARGETMAP.Copy(); DataTable dtTgt = DT_ESTTARGETMAP.Copy(); DT_ESTTARGETMAP_GROUPBYEST = DataTypeUtility.GetGroupByDataTable(dtEst, groupBy); DT_ESTTARGETMAP_GROUPBYTGT = DataTypeUtility.GetGroupByDataTable(dtTgt, new string[] { "EST_DEPT_ID", "EST_EMP_ID", "DIRECTION_TYPE" }); MicroBSC.Integration.MUL.Biz.Biz_Mul_Est_Emp bizMulEstEmp = new MicroBSC.Integration.MUL.Biz.Biz_Mul_Est_Emp(); DataTable dtMulEstEmp = bizMulEstEmp.GetDeptMapping_DB(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID); // 평가자 목록 (EST_TYPE : EST) /* * DT_ESTEMP = bizMulEstEmp.GetEstEmp_DB(COMP_ID * , EST_ID * , ESTTERM_REF_ID * , ESTTERM_SUB_ID * , 0 * , ""); */ MicroBSC.Integration.COM.Biz.Biz_Rel_Dept_Emp bizRelDeptEmp = new MicroBSC.Integration.COM.Biz.Biz_Rel_Dept_Emp(); DT_DEPTEMP = bizRelDeptEmp.GetRelDeptEmp_DB(0 , COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID); DT_DEPTEMP.Columns.Add("TGT_DEPT_ID"); DT_DEPTEMP.Columns.Add("TGT_EMP_ID"); DT_DEPTEMP.Columns.Add("TGT_EMP_NAME"); DT_DEPTEMP.Columns.Add("TGT_CLASS_CODE"); DT_DEPTEMP.Columns.Add("TGT_CLS_NAME"); DT_DEPTEMP.Columns.Add("TGT_GRP_CODE"); DT_DEPTEMP.Columns.Add("TGT_GRP_NAME"); DT_DEPTEMP.Columns.Add("TGT_RANK_CODE"); DT_DEPTEMP.Columns.Add("TGT_RANK_NAME"); DT_DEPTEMP.Columns.Add("TGT_DUTY_CODE"); DT_DEPTEMP.Columns.Add("TGT_DUT_NAME"); DT_DEPTEMP.Columns.Add("TGT_KIND_CODE"); DT_DEPTEMP.Columns.Add("TGT_KND_NAME"); //랜덤 지정/해제 버튼 보이기 상태 setRndButtonVisible(); //매핑 확정/취소 버튼 보이기상태 if (CheckPossiblityCancelConfirm()) { ibnAddEstData.Visible = true; ibnDelEstData.Visible = true; } else { ibnAddEstData.Visible = false; ibnDelEstData.Visible = false; } //바인드 UltraWebGrid1.DataSource = dtMulEstEmp; UltraWebGrid1.DataBind(); if (dtMulEstEmp.Rows.Count > 0) { ibnRandom.Enabled = true; ibnDelRandom.Enabled = true; } else { ibnRandom.Enabled = false; ibnDelRandom.Enabled = false; } }