您的位置:首页 > 其它

F7类型的行政组织(AdminOrgUnitInfo)唯一性验证

2009-02-28 10:17 295 查看
// 部门名称必须唯一
IFilterDept idept = FilterDeptFactory.getRemoteInstance();
if(this.oprtState==OprtState.ADDNEW){
boolean exists = idept.exists("where department='"+((AdminOrgUnitInfo)prmtdepartment.getData()).getId()+"'");
if(exists){
MsgBox.showInfo("你输入的部门已经存在,请重新选择!");
prmtdepartment.requestFocusInWindow();
SysUtil.abort();
}
}else{
String sql = "select * from t_com_filterdept where fdepartmentid = '" + ((AdminOrgUnitInfo)prmtdepartment.getData()).getId() + "' and fid != '" + editData.getId().toString() + "'";
ISQLExecutor isqlexecutor = SQLExecutorFactory.getRemoteInstance(sql);
IRowSet irowset= isqlexecutor.executeSQL();
if(irowset.size()>0){
MsgBox.showInfo("你输入的部门已经存在,请重新选择!!");
prmtdepartment.requestFocusInWindow();
SysUtil.abort();
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐