-
大小: 3.32MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-10-29
- 語言: Java
- 標(biāo)簽:
資源簡介
圖書租賃系統(tǒng),系統(tǒng)使用的數(shù)據(jù)庫為Oracle,桌面應(yīng)用程序,java程序!

代碼片段和文件信息
package?edu.sccp.main;
import?java.sql.Connection;
import?java.sql.DriverManager;
import?java.sql.ResultSet;
import?java.sql.SQLException;
import?java.sql.Statement;
import?edu.sccp.tools.Tools;
public?class?Login?{
public?static?void?login()?{
Connection?conn?=?null;
try?{
Class.forName(“oracle.jdbc.driver.OracleDriver“);
conn?=?DriverManager.getConnection(
“jdbc:oracle:thin:@192.168.10.54:1521:myoracle“?“use“
“usepwd“);
//?System.out.println(“連接數(shù)據(jù)庫成功!“);
Statement?sta?=?conn.createStatement();
boolean?b?=?true;
int?count?=?0;
while?(b)?{
count++;
System.out.println(“請輸入用戶名:“);
String?name?=?Tools.readKey();
System.out.println(“請輸入密碼:“);
String?password?=?Tools.readKey();
ResultSet?rs?=?sta.executeQuery(“select?*?from?userinfo“);
boolean?bo?=?false;
while?(rs.next())?{
//?System.out.println(rs.getString(“name“));
if?(rs.getString(“name“).equals(name))?{
bo?=?true;
if?(!rs.getString(“password“).equals(password))?{
System.out.println(“密碼錯(cuò)誤,請重新輸入!“);
break;
}?else?{
if?(rs.getInt(“power“)?==?1)?{
System.out.println(“登錄成功!您是管理員“);
new?Operate().manage();
b?=?false;
break;
}?else?if?(rs.getInt(“power“)?==?0)?{
System.out.println(“登錄成功!您是普通用戶“);
new?UserOper().userOper();
b?=?false;
break;
}
}
}
}
if?(!bo)?{
System.out.println(“用戶不存在,請重新輸入!“);
}
if?(count?==?3)?{
System.out.println(“錯(cuò)誤次數(shù)太多,請驗(yàn)證后再來!“);
System.exit(0);
}
}
}?catch?(ClassNotFoundException?e)?{
e.printStackTrace();
}?catch?(SQLException?e)?{
e.printStackTrace();
}?finally?{
try?{
conn.close();
}?catch?(SQLException?e)?{
e.printStackTrace();
}
}
}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????291??2008-09-05?10:07??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\.classpath
?????文件????????386??2008-08-29?18:49??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\.project
?????文件????1196109??2008-08-29?15:56??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\lib\classes12.jar
?????文件???????2700??2008-09-05?10:07??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\Login.class
?????文件???????1971??2008-09-05?08:33??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\Login.java
?????文件???????4334??2008-09-05?10:15??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\Operate.class
?????文件???????5354??2008-09-05?10:15??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\Operate.java
?????文件???????2772??2008-09-05?10:07??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\Regist.class
?????文件???????2189??2008-09-05?09:19??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\Regist.java
?????文件???????1207??2008-09-05?10:07??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\Run.class
?????文件????????737??2008-09-04?17:57??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\Run.java
?????文件???????2443??2008-09-05?10:07??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\UserOper.class
?????文件???????2534??2008-09-05?08:22??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\main\UserOper.java
?????文件??????10514??2008-09-05?10:29??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\tools\Manage.class
?????文件??????11395??2008-09-05?10:29??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\tools\Manage.java
?????文件????????849??2008-09-05?10:07??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\tools\Tools.class
?????文件????????444??2008-08-30?07:53??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\bookoracle\edu\sccp\tools\Tools.java
?????文件???????1645??2008-09-05?09:02??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)\oracle\book.sql
?????文件????????291??2008-09-05?14:17??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\.classpath
?????文件????????386??2008-08-29?18:49??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\.project
?????文件????1196109??2008-08-29?15:56??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\lib\classes12.jar
?????文件???????2700??2008-09-11?08:18??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\main\Login.class
?????文件???????1971??2008-09-05?15:26??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\main\Login.java
?????文件???????4777??2008-09-11?08:18??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\main\Operate.class
?????文件???????6148??2008-09-05?15:50??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\main\Operate.java
?????文件???????2772??2008-09-11?08:18??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\main\Regist.class
?????文件???????2189??2008-09-05?15:27??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\main\Regist.java
?????文件???????1249??2008-09-11?08:18??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\main\Run.class
?????文件????????779??2008-09-05?14:17??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\main\Run.java
?????文件???????2997??2008-09-11?08:18??圖書租賃系統(tǒng)\圖書租賃系統(tǒng)1\bookoracle\edu\sccp\main\UserOper.class
............此處省略99個(gè)文件信息
評論
共有 條評論