protected void iBtnDelete_Click(object sender, ImageClickEventArgs e) { //Biz_BiasDatas bizBias = new Biz_BiasDatas(); //if (bizBias.DeleteBiasGroup(this.ICOMP_ID // , this.IEST_ID // , DataTypeUtility.GetToInt32(hdfBIAS_GRP_ID.Value))) //{ // hdfChangeYN.Value = "1"; // hdfBIAS_GRP_ID.Value = "0"; // txtBIAS_GRP_CD.Text = txtBIAS_GRP_NM.Text = txtBIAS_GRP_DESC.Text = string.Empty; // chkUSE_YN.Checked = true; // DoBinding(); // ltrScript.Text = JSHelper.GetAlertScript("삭제되었습니다."); //} //else // ltrScript.Text = JSHelper.GetAlertScript(string.Format("삭제 실패!\\n{0}", bizBias.errMSG.Replace("\\", "").Replace("'", ""))); MicroBSC.Integration.EST.Biz.Biz_Est_Bias_Group bizEstBiasGroup = new MicroBSC.Integration.EST.Biz.Biz_Est_Bias_Group(); bool isOK = bizEstBiasGroup.RemoveEstBiasGroup_DB(DataTypeUtility.GetToInt32(hdfBIAS_GRP_ID.Value)); if (isOK) { hdfChangeYN.Value = "1"; hdfBIAS_GRP_ID.Value = "0"; txtBIAS_GRP_CD.Text = txtBIAS_GRP_NM.Text = txtBIAS_GRP_DESC.Text = string.Empty; chkUSE_YN.Checked = true; DoBinding(); ltrScript.Text = JSHelper.GetAlertScript("삭제되었습니다."); } else { ltrScript.Text = JSHelper.GetAlertScript("삭제 실패!"); } }
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("저장 실패!"); } } }