⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 viewcote.java

📁 spring+struts+hibernate做的银行系统
💻 JAVA
字号:
/*
 * Created on 2006-3-25
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package cn.com.tym.newclass;

/**
 * @author jack_booth
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

//Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
//Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
//Decompiler options: packimports(3) fieldsfirst ansi 
//Source File Name:   viewBigClass.java



import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

import cn.com.tym.admin.CoteBean;
import cn.com.tym.pub.*;
public class ViewCote {

 
 private int coteId=0;
 private String coteName=null;

 public ViewCote()
 {
 	coteName = "";
 }

 

public int getCoteId() {
	return coteId;
}
public void setCoteId(int coteId) {
	this.coteId = coteId;
}
public String getCoteName() {
	return coteName;
}
public void setCoteName(String coteName) {
	this.coteName = coteName;
}


 public boolean checkNameExist(String id,DB db)
     throws SQLException
 {
     boolean check = false;
     
      
     
     String strSql2 = "select card_id,card_name from mdh_cote  where card_id='"+id+"'";
 
  ResultSet  rs = db.OpenSql(strSql2);
         if(rs.next()){
             this.coteName=rs.getString("card_name");
       
         	check=true;
         }
 
     return check;
 }
 
 public ArrayList coteList(DB db)throws SQLException{
    
 
     ArrayList list = new ArrayList();
	 	String strSql= "select  card_id,card_name from mdh_cote "; 
	 	ResultSet rs = db.OpenSql(strSql);
	 	System.out.println("VVVVVVVV");
     while(rs.next())
     {
         CoteBean bean=new CoteBean();
         bean.setCoteId(rs.getString("card_id"));
         bean.setCoteName(rs.getString("card_name"));
 
         list.add(bean);
         bean = null;
     }
 return list;
 }
/**
 public boolean checkNameExist(int iid, String name)
     throws SQLException
 {
     boolean check = false;
     name = dealText.dealToSql(name);
     conn conn = new conn();
     ResultSet rs = null;
     String sql = "select * from NewsBigClass where bigClassName='" + name + "' and bigClassID<>" + iid + "";
     try
     {
         rs = conn.executeQurey(sql);
         if(rs.next())
             check = true;
     }
     catch(SQLException ex)
     {
         System.out.println(ex.getMessage());
     }
     finally
     {
         conn.close();
         conn = null;
         rs.close();
         rs = null;
     }
     return check;
 }
*/
 
 public boolean seeByID(int iid,DB db)
     throws SQLException
 {
     boolean check = false;

     ResultSet rs = null;
     String strSql = "select card_id ,card_name from mdh_cote where card_id=" + iid + "";
     try
     {
         for(rs = db.OpenSql(strSql); rs.next();)
         {
             check = true;
              
              this.coteId = rs.getInt("card_id");
              this.coteName= rs.getString("card_name");
         }

     }
     catch(SQLException ex)
     {
         System.out.println(ex.getMessage());
     }
     finally
     {
        db.close();
         rs.close();
         rs = null;
     }
     return check;
 }

 /**
 public ArrayList listAll(DB db)
     throws SQLException
 {
     ArrayList list = new ArrayList();
      
     ResultSet rs = null;
     String sql = "select * from NewsBigClass order by bigClassID";
     try
     {
         for(rs = conn.executeQurey(sql); rs.next();)
         {
             viewBigClass see = new viewBigClass();
             see.bigClassID = rs.getInt("bigClassID");
             see.bigClassName = rs.getString("bigClassName");
             list.add(see);
             see = null;
         }

     }
     catch(SQLException ex)
     {
         System.out.println(ex.getMessage());
     }
     finally
     {
         conn.close();
         conn = null;
         rs.close();
         rs = null;
     }
     return list;
 }*/
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -