private bool SaveEstTermStepMap() { Biz_TermStepEstMaps termStepEstMap = new Biz_TermStepEstMaps(); DataTable dataTable = termStepEstMap.GetDataTableSchema(); DataRow dataRow = null; TemplatedColumn ckb_use_yn = null; CheckBox ckbUseYN = null; TemplatedColumn weight_col = null; TextBox txtWeight = null; TemplatedColumn ckb_fixed_yn = null; CheckBox ckbFixedWeightYN = null; for (int i = 0; i < uGridStep.Rows.Count; i++) { UltraGridRow row = uGridStep.Rows[i]; ckb_use_yn = (TemplatedColumn)row.Band.Columns.FromKey("USE_YN"); ckbUseYN = (CheckBox)((CellItem)ckb_use_yn.CellItems[row.BandIndex]).FindControl("cBox"); weight_col = (TemplatedColumn)row.Band.Columns.FromKey("WEIGHT"); txtWeight = (TextBox)((CellItem)weight_col.CellItems[row.BandIndex]).FindControl("txtWeight"); ckb_fixed_yn = (TemplatedColumn)row.Band.Columns.FromKey("FIXED_WEIGHT_YN"); ckbFixedWeightYN = (CheckBox)((CellItem)ckb_fixed_yn.CellItems[row.BandIndex]).FindControl("ckbFixedWeightYN"); if (ckbUseYN.Checked) { dataRow = dataTable.NewRow(); dataRow["COMP_ID"] = COMP_ID; dataRow["EST_ID"] = TreeView1.SelectedValue; dataRow["ESTTERM_STEP_ID"] = uGridStep.Rows[i].Cells.FromKey("ESTTERM_STEP_ID").Value; dataRow["FIXED_WEIGHT_YN"] = DataTypeUtility.GetBooleanToYN(ckbFixedWeightYN.Checked); dataRow["WEIGHT"] = txtWeight.Text; dataRow["DATE"] = DateTime.Now; dataRow["USER"] = EMP_REF_ID; dataTable.Rows.Add(dataRow); } } return(termStepEstMap.SaveTermStepEstMap(dataTable, COMP_ID, TreeView1.SelectedValue)); }
protected void iBtnUpdate_Click(object sender, EventArgs e) { //setUpdate(); DataTable dtResult = new DataTable(); dtResult.Columns.Add("ESTTERM_REF_ID"); dtResult.Columns.Add("KPI_REF_ID"); dtResult.Columns.Add("YMD"); dtResult.Columns.Add("RESULT_MS"); dtResult.Columns.Add("RESULT_TS"); dtResult.Columns.Add("APP_REF_ID"); dtResult.Columns.Add("CHECK_APPING_YN"); int iesttermRefId; int ikpiRefId; string iymd; int itxrUser; double iresultMs; double iresultTs; TemplatedColumn template; CellItem cellItemObject; Infragistics.WebUI.WebDataInput.WebNumericEdit inputTxt; TemplatedColumn col_cBox; CheckBox cBox; foreach (Infragistics.WebUI.UltraWebGrid.UltraGridRow row in this.ugridKpiTargetList.Rows) { iesttermRefId = DataTypeUtility.GetToInt32(row.Cells.FromKey("estTermRefId").Value); ikpiRefId = DataTypeUtility.GetToInt32(row.Cells.FromKey("kpiRefId").Value); iymd = DataTypeUtility.GetValue(row.Cells.FromKey("estYmd").Value); itxrUser = DataTypeUtility.GetToInt32(this.USERID); template = (TemplatedColumn)row.Cells.FromKey("resultMs").Column; cellItemObject = (CellItem)template.CellItems[row.Index]; inputTxt = (Infragistics.WebUI.WebDataInput.WebNumericEdit)cellItemObject.FindControl("txtResultMs"); iresultMs = inputTxt.ValueDouble; template = (TemplatedColumn)row.Cells.FromKey("resultTs").Column; cellItemObject = (CellItem)template.CellItems[row.Index]; inputTxt = (Infragistics.WebUI.WebDataInput.WebNumericEdit)cellItemObject.FindControl("txtResultTs"); iresultTs = inputTxt.ValueDouble; col_cBox = (TemplatedColumn)row.Band.Columns.FromKey("selchk"); cBox = (CheckBox)((CellItem)col_cBox.CellItems[row.BandIndex]).FindControl("cBox"); string check_apping_yn = DataTypeUtility.GetBooleanToYN(cBox.Checked); DataRow rowResult = dtResult.NewRow(); rowResult["ESTTERM_REF_ID"] = iesttermRefId; rowResult["KPI_REF_ID"] = ikpiRefId; rowResult["YMD"] = iymd; rowResult["RESULT_MS"] = iresultMs; rowResult["RESULT_TS"] = iresultTs; rowResult["APP_REF_ID"] = iesttermRefId; rowResult["CHECK_APPING_YN"] = check_apping_yn; dtResult.Rows.Add(rowResult); } string pagePath = this.Page.Request.Url.AbsolutePath; MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Result bizBscKpiResult = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Result(); string returnVal = bizBscKpiResult.ModifyKpiResultDataBulker_DB(dtResult , "" , this.gUserInfo.Emp_Ref_ID , DateTime.Now.ToString("yyyy-MM-dd")); string msg = returnVal; if (returnVal.Equals(string.Empty)) { msg = "저장 되었습니다."; } ltrScript.Text = JSHelper.GetAlertScript(msg); }
protected void iBtnSave_Click(object sender, ImageClickEventArgs e) { //Biz_BiasDatas bizBias = new Biz_BiasDatas(); //int biasID = bizBias.SaveBiasGroup(this.ICOMP_ID // , this.IEST_ID // , DataTypeUtility.GetToInt32(hdfBIAS_GRP_ID.Value) // , txtBIAS_GRP_CD.Text.Trim() // , txtBIAS_GRP_NM.Text.Trim() // , txtBIAS_GRP_DESC.Text.Trim() // , DataTypeUtility.GetBooleanToYN(chkUSE_YN.Checked) // , gUserInfo.Emp_Ref_ID); MicroBSC.Integration.EST.Biz.Biz_Est_Bias_Group bizEstBiasGroup = new MicroBSC.Integration.EST.Biz.Biz_Est_Bias_Group(); DataTable dtEstBiasGroup = bizEstBiasGroup.GetBiasGroup_DB(this.ICOMP_ID , this.IEST_ID , txtBIAS_GRP_CD.Text.Trim()); int biasID = 0; if (dtEstBiasGroup.Rows.Count > 0) { //biasID = DataTypeUtility.GetToInt32(dtEstBiasGroup.Rows[0]["BIAS_GRP_ID"]); biasID = bizEstBiasGroup.ModifyEstBiasGroup_DB(this.ICOMP_ID , this.IEST_ID , DataTypeUtility.GetToInt32(hdfBIAS_GRP_ID.Value) , txtBIAS_GRP_CD.Text.Trim() , txtBIAS_GRP_NM.Text.Trim() , txtBIAS_GRP_DESC.Text.Trim() , DataTypeUtility.GetBooleanToYN(chkUSE_YN.Checked) , gUserInfo.Emp_Ref_ID); } else { biasID = bizEstBiasGroup.AddEstBiasGroup_DB(this.ICOMP_ID , this.IEST_ID , DataTypeUtility.GetToInt32(hdfBIAS_GRP_ID.Value) , txtBIAS_GRP_CD.Text.Trim() , txtBIAS_GRP_NM.Text.Trim() , txtBIAS_GRP_DESC.Text.Trim() , DataTypeUtility.GetBooleanToYN(chkUSE_YN.Checked) , gUserInfo.Emp_Ref_ID); } if (biasID > 0) { hdfChangeYN.Value = "1"; hdfBIAS_GRP_ID.Value = biasID.ToString(); DoBinding(); txtBIAS_GRP_CD.Style.Add("readOnly", "readonly"); ltrScript.Text = JSHelper.GetAlertScript("저장되었습니다."); } else { if (biasID == -1) { ltrScript.Text = JSHelper.GetAlertScript("이미 등록된 그룹코드입니다.\\n저장실패!"); } else { ltrScript.Text = JSHelper.GetAlertScript("저장 실패!"); } } }
protected void ibnSave_Click(object sender, ImageClickEventArgs e) { Biz_Boards boardInfo = new Biz_Boards(); if (PageWriteMode == WriteMode.New) { if (txtSubjectText.Text.Equals("")) { ltrScript.Text = JSHelper.GetAlertScript("공지사항 제목을 입력하세요."); return; } if (txtContentText.Value.Equals("")) { ltrScript.Text = JSHelper.GetAlertScript("공지사항 내용을 입력하세요."); return; } bool isOK = boardInfo.AddBoard(BOARD_CATEGORY_ID , txtSubjectText.Text.Trim() , txtContentText.Value , 0 , "" , "" , "" , 0 , 0 , wdcStartDate.Value , wdcEndDate.Value , DataTypeUtility.GetToInt32(ddlMenuRefID.SelectedValue) , DataTypeUtility.GetBooleanToYN(cbPopupYN.Checked) , EMP_REF_ID , DateTime.Now , EMP_REF_ID); if (isOK) { BindingBoardInfo("", BOARD_CATEGORY_ID); } else { ltrScript.Text = JSHelper.GetAlertScript("정상적으로 등록되지 않았습니다."); return; } } else if (PageWriteMode == WriteMode.Modify) { if (hdfBoardID.Value.Equals("")) { ltrScript.Text = JSHelper.GetAlertScript("선택된 공지사항이 없습니다."); return; } bool isOK = boardInfo.ModifyBoard(hdfBoardID.Value.Trim() , BOARD_CATEGORY_ID , txtSubjectText.Text.Trim() , txtContentText.Value , 0 , "" , "" , "" , 0 , 0 , wdcStartDate.Value , wdcEndDate.Value , DataTypeUtility.GetToInt32(ddlMenuRefID.SelectedValue) , DataTypeUtility.GetBooleanToYN(cbPopupYN.Checked) , EMP_REF_ID , DateTime.Now , EMP_REF_ID); if (isOK) { BindingBoardInfo("", BOARD_CATEGORY_ID); } else { ltrScript.Text = JSHelper.GetAlertScript("정상적으로 수정되지 않았습니다."); return; } } ButtonStatusByInit(); }
protected void ibnSave_Click(object sender, ImageClickEventArgs e) { Biz_ScaleInfos scaleInfo = new Biz_ScaleInfos(); if (PageWriteMode == WriteMode.New) { if (txtScaleID.Text.Equals("")) { ltrScript.Text = JSHelper.GetAlertScript("평가방법 ID를 입력하세요."); return; } if (scaleInfo.IsExist(COMP_ID, txtScaleID.Text)) { ltrScript.Text = JSHelper.GetAlertScript("존재하는 평가방법 ID 입니다."); return; } bool isOK = scaleInfo.AddScaleInfo(COMP_ID , txtScaleID.Text , txtScaleName.Text , DataTypeUtility.GetBooleanToYN(cbUseYN.Checked) , DateTime.Now , EMP_REF_ID); if (isOK) { BindingScaleInfo(COMP_ID, ""); } else { ltrScript.Text = JSHelper.GetAlertScript("정상적으로 등록되지 않았습니다."); return; } } else if (PageWriteMode == WriteMode.Modify) { if (hdfScaleInfo.Value.Equals("")) { ltrScript.Text = JSHelper.GetAlertScript("선택된 연결방법이 없습니다."); return; } bool isOK = scaleInfo.ModifyScaleInfo(COMP_ID , hdfScaleInfo.Value , txtScaleName.Text , DataTypeUtility.GetBooleanToYN(cbUseYN.Checked) , DateTime.Now , EMP_REF_ID); if (isOK) { BindingScaleInfo(COMP_ID, ""); } else { ltrScript.Text = JSHelper.GetAlertScript("정상적으로 수정되지 않았습니다."); return; } } ButtonStatusByInit(); }
protected void ibnSave_Click(object sender, ImageClickEventArgs e) { int intEstTermSubID = DataTypeUtility.GetToInt32(txtEstTermSubID.Text); string strEstTermSubName = txtEstTermSubName.Text; double weight = DataTypeUtility.GetToDouble(txtWeight.Text); string year_yn = DataTypeUtility.GetBooleanToYN(ckbYearYN.Checked); int sort_order = DataTypeUtility.GetToInt32(txtSortOrder.Text); string use_yn = DataTypeUtility.GetBooleanToYN(ckbUseYN.Checked); int startMonth = DataTypeUtility.GetToInt32(txtStartMonth.Text); int endMonth = DataTypeUtility.GetToInt32(txtEndMonth.Text); Biz_TermSubs termSubs = new Biz_TermSubs(); if (PageWriteMode == WriteMode.New) { bool bDuplicate = termSubs.IsExist(COMP_ID, intEstTermSubID); if (bDuplicate) { ltrScript.Text = JSHelper.GetAlertScript("존재하는 평가주기 ID가 있습니다."); return; } bool bResult = termSubs.AddTermSub(COMP_ID , intEstTermSubID , strEstTermSubName , weight , year_yn , sort_order , startMonth , endMonth , use_yn , DateTime.Now , EMP_REF_ID); if (bResult) { GridBinding(COMP_ID); ButtonStatusInit(); } else { ltrScript.Text = JSHelper.GetAlertScript("저장 중 오류가 발생되었습니다."); return; } } else if (PageWriteMode == WriteMode.Modify) { bool bResult = termSubs.ModifyTermSub(COMP_ID , intEstTermSubID , strEstTermSubName , weight , year_yn , sort_order , startMonth , endMonth , use_yn , DateTime.Now , EMP_REF_ID); if (bResult) { GridBinding(COMP_ID); ButtonStatusInit(); } else { ltrScript.Text = JSHelper.GetAlertScript("수정 중 오류가 발생하였습니다."); return; } } }
protected void ibnSave_Click(object sender, ImageClickEventArgs e) { int seq = DataTypeUtility.GetToInt32(txtSeq.Text.Trim()); string col_name = txtColName.Text.Trim(); string col_style_id = WebUtility.GetByValueDropDownList(ddlColStyleID); string col_key = txtColKey.Text.Trim(); string caption = txtCaption.Text.Trim(); int width = DataTypeUtility.GetToInt32(txtWidth.Text.Trim()); string data_type = WebUtility.GetByValueDropDownList(ddlDataType); string halign = WebUtility.GetByValueDropDownList(ddlHAlign); string back_color = txtBackColor.Text.Trim(); string format = txtFormat.Text; string formula = txtFormula.Text.Trim(); string defaultValue = txtDefaultValue.Text.Trim(); string col_desc = txtColDesc.Text.Trim(); string back_color_yn = DataTypeUtility.GetBooleanToYN(ckbBackColorYN.Checked); string format_yn = DataTypeUtility.GetBooleanToYN(ckbFormatYN.Checked); string formula_yn = DataTypeUtility.GetBooleanToYN(ckbFormularYN.Checked); string defaultValue_yn = DataTypeUtility.GetBooleanToYN(ckbDefaultValueYN.Checked); string visible_yn = WebUtility.GetByValueRadioButtonList(rbnVisibleYN); string col_emp_visible_yn = WebUtility.GetByValueRadioButtonList(rbnColEmpVisibleYN); Biz_ColumnInfos columnInfos = new Biz_ColumnInfos(); if (PageWriteMode == WriteMode.New) { bool bDuplicate = columnInfos.IsExist(COMP_ID, EST_ID, col_key); if (bDuplicate) { ltrScript.Text = JSHelper.GetAlertScript("동일한 컬럼키가 존재합니다."); return; } bool bResult = columnInfos.AddColumnInfo(COMP_ID , EST_ID , seq , col_name , col_style_id , col_key , caption , width , data_type , halign , back_color , format , formula , defaultValue , col_desc , back_color_yn , format_yn , formula_yn , defaultValue_yn , visible_yn , col_emp_visible_yn , DateTime.Now , EMP_REF_ID ); bool isOK = SaveEstJobColumnMap(!trEstJob.Visible); if (bResult) { //ltrScript.Text = JSHelper.GetAlertScript("정상적으로 저장되었습니다."); GridBinding(COMP_ID); ButtonStatusInit(); } else { ltrScript.Text = JSHelper.GetAlertScript("처리 중 오류가 발생하였습니다."); return; } } else if (PageWriteMode == WriteMode.Modify) { bool bResult = columnInfos.ModifyColumnInfo(COMP_ID , EST_ID , seq , col_name , col_style_id , col_key , caption , width , data_type , halign , back_color , format , formula , defaultValue , col_desc , back_color_yn , format_yn , formula_yn , defaultValue_yn , visible_yn , col_emp_visible_yn , DateTime.Now , EMP_REF_ID ); bool isOK = SaveEstJobColumnMap(!trEstJob.Visible); if (bResult) { //ltrScript.Text = JSHelper.GetAlertScript("정상적으로 수정되었습니다."); //GridBinding(COMP_ID); //ButtonStatusInit(); } else { ltrScript.Text = JSHelper.GetAlertScript("수정되지 않았습니다."); return; } } }
protected void ibnSave_Click(object sender, ImageClickEventArgs e) { Biz_CtrlInfos ctrlInfo = new Biz_CtrlInfos(); if (PageWriteMode == WriteMode.New) { bool isOK = ctrlInfo.AddCtrlInfo(COMP_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , DataTypeUtility.GetToInt32(hdfEmpRefID.Value) , DataTypeUtility.GetToFloat(txtScope.Text) , POINT_GRADE_TYPE , WebUtility.GetByValueDropDownList(ddlScopeUnitID) , DataTypeUtility.GetBooleanToYN(ckbAllEstYN.Checked) , DataTypeUtility.GetBooleanToYN(ckbAllEstDeptYN.Checked) , DataTypeUtility.GetBooleanToYN(ckbConfirmEmpYN.Checked) , 0 , DateTime.Now , EMP_REF_ID); if (isOK) { BindCtrlInfo(COMP_ID, ESTTERM_REF_ID, ESTTERM_SUB_ID, POINT_GRADE_TYPE); } else { ltrScript.Text = JSHelper.GetAlertScript("정상적으로 등록되지 않았습니다."); return; } } else if (PageWriteMode == WriteMode.Modify) { bool isOK = ctrlInfo.ModifyCtrlInfo(CTRL_ID , COMP_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , DataTypeUtility.GetToInt32(hdfEmpRefID.Value) , DataTypeUtility.GetToFloat(txtScope.Text) , POINT_GRADE_TYPE , WebUtility.GetByValueDropDownList(ddlScopeUnitID) , DataTypeUtility.GetBooleanToYN(ckbAllEstYN.Checked) , DataTypeUtility.GetBooleanToYN(ckbAllEstDeptYN.Checked) , DataTypeUtility.GetBooleanToYN(ckbConfirmEmpYN.Checked) , 0 , DateTime.Now , EMP_REF_ID); if (isOK) { BindCtrlInfo(COMP_ID, ESTTERM_REF_ID, ESTTERM_SUB_ID, POINT_GRADE_TYPE); ClearValueControls(); } else { ltrScript.Text = JSHelper.GetAlertScript("정상적으로 수정되지 않았습니다."); return; } } ButtonStatusInit(); }