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

📄 txshow.java

📁 功能是公安和学校的管理系统,用struts+hibernate+spring等匡架组成,在eclepse就能编译
💻 JAVA
字号:
package com.comingnet.bean;
import com.db.ProxoolAction;
import java.sql.*;

public class TxShow {
	Connection conn=null;
	PreparedStatement stmt=null;
	ResultSet rs=null;
	public TxShow()
	{
		
	}
    
	public String getTxShow(int userid,String ryclass)
	{
		String txStr="";
		try
		{
			int txid=0;
			conn=ProxoolAction.getConnection();
			stmt=conn.prepareStatement("select * from xttx where txryid=? and txryclass=? and txzt='0'");
			stmt.setInt(1,userid);
			stmt.setString(2,ryclass);
			rs=stmt.executeQuery();
			if(rs.next())
			{
				txid=rs.getInt("txid");
				txStr=rs.getString("txnr");
				System.out.println("提醒内容:"+txStr);
			}
			ProxoolAction.closeResultSet(rs);
			if(txid>0)
			{
				ProxoolAction.closeStatement(stmt);
				stmt=conn.prepareStatement("update xttx set txzt='1' where txid=?");
				stmt.setInt(1,txid);
				stmt.executeUpdate();
				System.out.println("修改状态"+txid);
			}
			txid=0;
		}catch(Exception e)
		{
			System.out.println("--------------------->"+e);
		}finally
		{
			ProxoolAction.closeResultSet(rs);
			ProxoolAction.closeStatement(stmt);
			ProxoolAction.closeConnection(conn);
			
		}
		
		return txStr;
	}
 
}

⌨️ 快捷键说明

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