123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <%@ page contentType="text/html; charset=UTF-8" language="java"%>
- <%@ page import="java.util.*"%>
- <%@ page
- import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
- com.sysmodel.datamodel.xmlmodel.able.MdpConstant,
- com.sysmodel.datamodel.xmlmodel.able.SysModel,
- com.persistence.DBdll.SysOperator,
- com.sysmodel.datamodel.xmlmodel.able.MdpClass"%>
- <%
- String sourcecode = request.getParameter("sourcecode");
- SysModel sysmodel = ModelFactory.getSysmodel();
- if(sourcecode == null) return;
- SysOperator SysOperator = new SysOperator();
- ArrayList xmltablelist = sysmodel.getMdpClassByDataSource(Integer.parseInt(sourcecode));
- ArrayList xmlMdpConstantlist = sysmodel.getMdpConstantByDataSource(Integer.parseInt(sourcecode));
- %>
- <%!
- SysModel sysmodel = ModelFactory.getSysmodel();
- public String getClassIds(int number){
- StringBuffer sb = new StringBuffer();
- //提供的推荐编码个数
- int getNum = 5;
- int iToNumber = number + 100;
- sb.append("{"+number + "~" + iToNumber + "推荐编号 : ");
- int iget = 0;
- for(int i = number; i < iToNumber; i ++){
-
- if(iget > getNum) break;
- if(sysmodel.getMdpClassByClassID(i) == null){
- sb.append(" "+ i +" ");
- iget ++;
- }
-
- }
- sb.append("}");
- return sb.toString();
- }
-
- public boolean isTableExist(String tableName , ArrayList xmltablelist,ArrayList MdpConstantlist){
- boolean flag = true;
- int iFalg = 0;
- for (int i = 0 ; i < xmltablelist.size() ; i++){
- MdpClass mdpClass = (MdpClass)xmltablelist.get(i);
- if(mdpClass.getName().toUpperCase().equals(tableName.toUpperCase())){
- iFalg ++;
- }
- }
- for (int i = 0 ; i < MdpConstantlist.size() ; i++){
- MdpConstant mdpConstant = (MdpConstant)MdpConstantlist.get(i);
- if(mdpConstant.getCodeName().toUpperCase().equals(tableName.toUpperCase())){
- iFalg ++;
- }
- }
- if (iFalg > 0){
- flag = false;
- }
- return flag;
- }
- %>
- <HTML>
- <HEAD>
- <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <TITLE></TITLE>
- <link rel="stylesheet" href="../../../../styles/css.css" type="text/css"></link>
- <script type="text/javascript" src="../../../../scripts/dojo/dojo/dojo.js"
- djConfig="isDebug: false, parseOnLoad: true"></script>
- <script type="text/javascript">
- dojo.require("dijit.form.Form");
- dojo.require("dijit.form.FilteringSelect");
- dojo.require("dijit.form.Button");
- dojo.require("dijit.Tooltip");
- </script>
- <style type="text/css">
- @import "../../../../scripts/dojo/dojo/resources/dojo.css";
- @import "../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
- @import "../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
- @import "../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
- </style>
- <script type="text/javascript" src="../select.js"></script>
- </HEAD>
- <body class="tundra">
- <form dojoType="dijit.form.Form" name="form1" method="post" action="">
- <div id=total>
- <div class="whiteborder">
- <div class="titback">
- <div class="floatleft"><img src="../../../../images/index/arrow1.gif" alt="1" width="20" height="24" /></div>
- <div class="dropshadow">数据库中表的管理—(列出配置文件没有管理到的表)</div>
- <div class="clear"></div>
- </div>
- <div class="report">
- <table align="center" id="SortTable512_1" width="100%"
- cellpadding="1" cellspacing="1" class="ltab2">
- <tr>
- <td width="65%" valign="top">
- <table align="center" width="100%" border="0" cellpadding="1"cellspacing="1" class="ltab2">
- <tr class="TableBgColorAsh">
- <td width="45%" align="center">
- <select name="select" size="15" class="SelectScroll" multiple id="role1" style="width:80%">
- <%ArrayList tables = SysOperator.getTableNames(Integer.parseInt(sourcecode));
- for (int j = 0 ; j < tables.size() ; j++){
- String tableName = (String)tables.get(j);
- if (isTableExist(tableName, xmltablelist,xmlMdpConstantlist)){
- %>
- <option value="<%=tableName%>"> <%=tableName%> </option>
- <% }
-
- }
- %>
- </select> </td>
- <td width="10%" align="center"><input name="button" type="button" class="button2"
- style="cursor:hand" onClick="move(this.form.role1,this.form.role2);"
- value=" >> "/>
- <br>
- <br>
- <input name="button" type="button" class="button2"
- style="cursor:hand" onClick="move(this.form.role2,this.form.role1);"
- value=" << "/></td>
- <td width="45%" align="center" valign="middle">
- <select name="select" size="15" multiple class="SelectScroll" id="role2" style="width:80%">
- </select></td>
- </tr>
- <tr class="TableBgColorBlack">
- <td colspan="3" align="center">
- <button id="save" dojoType="dijit.form.Button" onClick='checkConfig();' type="button" iconClass="plusIcon">
- 开始删除(高危动作,不明确的表请不要随便删除!!!)
- </button>
- </td>
- </tr>
- </table>
- </td>
- <td width="40%" height="100%" valign="top">
- <div id="boxIdea" align="left" style="width:98%;height:98%;border:1px solid #999999;"> </div>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </form>
- <script language="JavaScript">
- var indexOfCheck = 0;
- var role2=document.all.item("role2");
- function checkConfig() {
- indexOfCheck = 0
- var boxIdea=document.all.item("boxIdea");
- boxIdea.innerHTML = "";
- if(role2.options.length == 0){
- alert("请选则进行验证的表对象!");
- return;
- }
- var CodeName = role2.options[0].value;
- checkOneObj(CodeName)
- }
- function checkOneObj(CodeName){
- if(CodeName=="") return;
- createXMLHttpRequest();
- var strA = "";
- var moduleObj = dojo.byId('module');
- XMLHttpReq.open("POST","deleteExc.jsp?sourcecode=<%=sourcecode%>&CodeName=" + CodeName,false);
- XMLHttpReq.setRequestHeader("Content-Length",strA.length);
- XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
- XMLHttpReq.send(strA);
- var boxIdea=document.all.item("boxIdea");
- boxIdea.innerHTML = boxIdea.innerHTML + XMLHttpReq.responseText;
- indexOfCheck = indexOfCheck + 1;
- if(indexOfCheck < role2.options.length){
- checkOneObj(role2.options[indexOfCheck].value);
- }else{
- return;
- }
- }
- // End -->
- </script>
- </BODY>
- </HTML>
|