posts - 20,comments - 6,trackbacks - 0
          <table align="center" width="640">
              
          <tr >
                  
          <td>
                      對(duì)應(yīng)網(wǎng)點(diǎn):
          &nbsp;&nbsp;&nbsp;&nbsp;
                      
          <select name="wangdian" id="wangdian" style="width:80pt;" onchange="window.location='/safety-wxy/ent/wangdian_extend_update.jsp?dwdm=<%=dwdm%>&wxyid=<%=wxyid%>&uuid='+this.value;">
                      <option value="0"></option>
                      
          <%
                          String oid 
          = "";
                          String wdname 
          = "";

                          Connection connection;
                          
          try
                          
          {
                              connection 
          = DataFactory.getConnection("wxyinfor");
                          }

                          
          catch(Exception e)
                          
          {
                              
          throw new SQLException(e.toString());
                          }

                          
                          Statement statement
          =null;
                          ResultSet resultset
          =null;
                          
          //System.out.println("--------"+uuid);
                          String sql = "select oid,wdname,wdaddress,wdfzr,wdlxdh from T_xzwdext where dwdm = '"+dwdm+"' and wxyid = '"+wxyid+"'";
                          System.out.println(
          "----test sql ---"+sql);

                          
          try
                          
          {
                              statement 
          = connection.createStatement();

                              
          //resultset = statement.executeUpdate(sql);
                              resultset=statement.executeQuery(sql);

                              
          while (resultset.next()) 
                              
          {
                                  
          //oid = resultset.getString("oid");
                      %>

                      
          <option value="<%=resultset.getString("oid") %>"><%=resultset.getString("wdname"%></option>
                      
          <%
                          
          //wdname = resultset.getString("wdname");
                          
                      }
             
              }

              
          catch(Exception e)
              
          {
                  System.out.println(e.getMessage());
              }

              
          finally
              
          {
                  
          try
                  
          {
                      
          if(null!=resultset)
                      
          {
                          resultset.close();
                          resultset 
          = null;
                      }

                  }
          catch(SQLException e1){}

                  
          try
                  
          {
                      
          if(null!=statement)
                      
          {
                          statement.close();
                          statement 
          = null;
                      }

                  }

                  
          catch(SQLException e2){}

                  
          try
                  
          {
                      
          if(null!=connection)
                      
          {
                          connection.close();
                          connection 
          = null;
                      }

                  }

                  
          catch(SQLException e3){}    
              }

              
                      
          %>

                      
          <%
                          System.out.println(usertype);    
                          
          if(usertype!=null & !"adm".equals(usertype)){
                      
          %>
                              
          <input name="wadd" type="button" id="wadd"
                                  value
          ="添加網(wǎng)點(diǎn)" onclick="window.location='/safety-wxy/ent/wangdian_extend.jsp?dwdm=<%=dwdm%>&wxyid=<%=wxyid%>'">
                      
          <%
                          }

                      
          %>
                  
                  
          </td>
              
          </tr>
          </table>
          posted on 2009-07-02 15:07 Johnhe 閱讀(171) 評(píng)論(0)  編輯  收藏 所屬分類: javascript
          主站蜘蛛池模板: 临夏市| 尉犁县| 陇西县| 安图县| 南京市| 乌兰察布市| 公安县| 连云港市| 尼木县| 枣庄市| 诏安县| 奎屯市| 交口县| 邢台县| 寿阳县| 房产| 商洛市| 南雄市| 芦溪县| 南开区| 苏尼特右旗| 巴东县| 方正县| 安宁市| 涡阳县| 教育| 成武县| 鹿泉市| 临泉县| 江华| 嵊州市| 容城县| 万年县| 渭源县| 双江| 宁安市| 温州市| 桐梓县| 泸水县| 西吉县| 汪清县|