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

📄 deletediagnose.java

📁 宠物医院管理系统 包含宠物的注册 管理 收费 诊断等一系列过程控制 还包含配应的数据库 Jar包
💻 JAVA
字号:
package yd.pethospital.diagnose.jdbc;

import java.sql.*;
import yd.pethospital.share.SystemShare;
import yd.pethospital.diagnoseregister.view.*;

public class DeleteDiagnose {
	
	public DeleteDiagnose(){
		
		try {
			
			SystemShare.getConnection();
			SystemShare.pst=SystemShare.con.prepareStatement("select * from DiagnoseInfo ",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
			
			SystemShare.rs=SystemShare.pst.executeQuery();                                          //rs用于返回SQL语句对数据库的查询等操作 
			SystemShare.rs.absolute(DiagnoseRegister.BTCK.getSelectedRow()+1);          //记录被选择的行
			
			SystemShare.con.prepareStatement("delete DiagnoseInfo where petcode="+SystemShare.rs.getString("petcode")).executeUpdate();   //调用preparement方法进行数据库操作
			
			DiagnoseRegister.frame.dispose();
			SystemShare.delsuccess();
			new DiagnoseRegister();
			
		}catch (SQLException e) {
			SystemShare.delfail();
		}
		SystemShare.close();
	}
}

⌨️ 快捷键说明

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