protected void ibnCheckID_Click(object sender, ImageClickEventArgs e) { if (txtEstTermStepID.Text.Trim().Length == 0) { ltrScript.Text = JSHelper.GetAlertScript("평가주기ID를 입력해주세요."); return; } int intEstTermStepID = DataTypeUtility.GetToInt32(txtEstTermStepID.Text); Biz_TermSteps termSteps = new Biz_TermSteps(); bool bDuplicate = termSteps.IsExist(COMP_ID, intEstTermStepID); if (bDuplicate) { ltrScript.Text = JSHelper.GetAlertScript("존재하는 평가주기 ID가 있습니다."); } else { ltrScript.Text = JSHelper.GetAlertScript("사용가능한 평가주기 ID 입니다."); } }
protected void ibnSave_Click(object sender, ImageClickEventArgs e) { int intEstTermStepID = DataTypeUtility.GetToInt32(txtEstTermStepID.Text); string strEstTermStepName = txtEstTermStepName.Text; double weight = DataTypeUtility.GetToDouble(txtWeight.Text); string merge_yn = DataTypeUtility.GetBooleanToYN(ckbMergeYN.Checked); int sort_order = DataTypeUtility.GetToInt32(txtSortOrder.Text); string use_yn = DataTypeUtility.GetBooleanToYN(ckbUseYN.Checked); Biz_TermSteps termSteps = new Biz_TermSteps(); if (PageWriteMode == WriteMode.New) { bool bDuplicate = termSteps.IsExist(COMP_ID, intEstTermStepID); if (bDuplicate) { ltrScript.Text = JSHelper.GetAlertScript("존재하는 평가주기 ID가 있습니다."); return; } bool bResult = termSteps.AddTermStep(COMP_ID , intEstTermStepID , strEstTermStepName , weight , merge_yn , sort_order , 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 = termSteps.ModifyTermStep(COMP_ID , intEstTermStepID , strEstTermStepName , weight , merge_yn , sort_order , use_yn , DateTime.Now , EMP_REF_ID); if (bResult) { GridBinding(COMP_ID); ButtonStatusInit(); } else { ltrScript.Text = JSHelper.GetAlertScript("수정 중 오류가 발생하였습니다."); return; } } }