?? startuse.java~31~
字號:
package com.jbaptech.accp.netbar.client;
import java.sql.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: 北京阿博泰克北大青鳥信息技術有限公司</p>
*
* @author Michael Luo
* @version 1.0
*/
public class StartUse {
public StartUse() {
}
//向Record表插入上機記錄
public void doStartUseComputerBusiness(String CardId,String ComputerId,String BeginTime){
Connection con = ConnectionManager.getConnection();
try{
String sql1
= "insert into Record(CardId,ComputerId,BeginTime) values(?,?,?)";
PreparedStatement ps = con.prepareStatement(sql1);
ps.setString(1,CardId);
ps.setString(2,ComputerId);
ps.setString(3,BeginTime);
ps.executeUpdate();
String sql2 =
"update computer set OnUse =\'1\' where id ='"+ComputerId+"'";
Statement s = con.createStatement();
s.executeUpdate(sql2);
}catch (SQLException sqlE) {
sqlE.printStackTrace();
}finally{
try{
con.close();
}catch (SQLException e) {
e.printStackTrace();
}
}
} //finally
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -