protected void Callback1_Callback(object sender, SJ.Web.UI.CallBackEventArgs e) { EmpInfos emp = new EmpInfos(); if (e.Parameter == "") { ltrScript.Text = JSHelper.GetAlertScript("아이디를 입력하십시요.", false); ltrScript.RenderControl(e.Output); return; } if (emp.CheckLoginID(e.Parameter)) { ltrScript.Text = JSHelper.GetAlertScript("사용 가능한 아이디 입니다.", false); } else { ltrScript.Text = JSHelper.GetAlertScript("존재하는 아이디 입니다.", false); } ltrScript.RenderControl(e.Output); }
/// <summary> /// IsMandatory /// : 필수값 체크 /// </summary> /// <returns></returns> private bool IsMandatory(out string sErr, bool abEdit) { bool bRet = true; sErr = ""; if (abEdit) { //if (TypeUtility.GetNumString(GetRequest("empid")) == "") if (TypeUtility.GetNumString(empId) == "") { sErr = "alert('수정정보를 정확히 알 수 없습니다.\n\n다시 시도해 주십시요.');"; bRet = false; } } if (GetValue(txtDeptID.Text) == "") { sErr = "alert('[부서]를 알 수 없습니다.');"; bRet = false; } else if (GetValue(txtDeptName.Text) == "") { sErr = "alert('[부서]를 알 수 없습니다.');"; bRet = false; } else if (GetValue(txtLoginID.Text) == "") { sErr = "alert('[사용자아이디]를 알 수 없습니다.');" + "try {eval(document.forms[0]." + txtLoginID.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + txtLoginID.ClientID + ".select());} catch(e){}"; bRet = false; } else if (GetValue(txtName.Text) == "") { sErr = "alert('[사용자명]을 알 수 없습니다.');" + "try {eval(document.forms[0]." + txtName.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + txtName.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionDuty) == "0") { sErr = "alert('[직책]을 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionDuty.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionDuty.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionRank) == "0") { sErr = "alert('[직위]를 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionRank.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionRank.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionGrp) == "0") { sErr = "alert('[직군]를 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionGrp.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionGrp.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionClass) == "0") { sErr = "alert('[직급]을 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionClass.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionClass.ClientID + ".select());} catch(e){}"; bRet = false; } else if (PageUtility.GetByValueDropDownList(ddlPositionKind) == "0") { sErr = "alert('[직종]을 선택하십시요.');" + "try {eval(document.forms[0]." + ddlPositionKind.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + ddlPositionKind.ClientID + ".select());} catch(e){}"; bRet = false; } // 추가일 경우에는 아이디의 중복확인을 처리한다. if (mode.ToUpper() == "NEW") { EmpInfos emp = new EmpInfos(); if (!emp.CheckLoginID(GetValue(txtLoginID.Text))) { sErr = "alert('입력하신 [사용자아이디]는 이미 존재합니다.');" + "try {eval(document.forms[0]." + txtLoginID.ClientID + ".select());} catch(e){}" + "try {eval(document.forms[0]." + txtLoginID.ClientID + ".select());} catch(e){}"; bRet = false; } } return(bRet); }