From 8c9e35e6685a8bd41ee789c03ac9076d68bca458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=9B=E6=B4=81?= <1126388959@qq.com> Date: Sat, 7 Dec 2019 15:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=EF=BC=8C=E4=BD=86=E6=98=AF=E5=BE=88=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../raise_money/DataBase/DatabaseHelper.java | 23 +------------------ .../hunnu/sj/raise_money/RegiteActivity.java | 3 --- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/app/src/main/java/hunnu/sj/raise_money/DataBase/DatabaseHelper.java b/app/src/main/java/hunnu/sj/raise_money/DataBase/DatabaseHelper.java index 8693f41..6dae3c6 100644 --- a/app/src/main/java/hunnu/sj/raise_money/DataBase/DatabaseHelper.java +++ b/app/src/main/java/hunnu/sj/raise_money/DataBase/DatabaseHelper.java @@ -1,29 +1,8 @@ package hunnu.sj.raise_money.DataBase; -import android.content.Context; -import android.database.sqlite.SQLiteDatabase; -import android.database.sqlite.SQLiteDatabase.CursorFactory; -import android.database.sqlite.SQLiteOpenHelper; -import android.provider.ContactsContract; - import java.sql.Connection; import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; - -public class DatabaseHelper /*extends SQLiteOpenHelper*/ { - /*static String name="user.db"; - static int dbVersion=1; - public DatabaseHelper(Context context) { - super(context, name, null, dbVersion); - } - - public void onCreate(SQLiteDatabase db) { - String sql="create table user(id integer primary key autoincrement,username varchar(20),password varchar(20),role varchar(20))"; - db.execSQL(sql); - } - public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { - }*/ +public class DatabaseHelper { private static DatabaseHelper db = null; private static Connection conn = null; public static DatabaseHelper getDb(){ diff --git a/app/src/main/java/hunnu/sj/raise_money/RegiteActivity.java b/app/src/main/java/hunnu/sj/raise_money/RegiteActivity.java index f7cc146..a0b46e0 100644 --- a/app/src/main/java/hunnu/sj/raise_money/RegiteActivity.java +++ b/app/src/main/java/hunnu/sj/raise_money/RegiteActivity.java @@ -7,12 +7,9 @@ import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; -import android.provider.MediaStore; import android.view.View; import android.widget.EditText; import android.widget.RadioButton; -import android.widget.RadioGroup; -import android.widget.Toast; import hunnu.sj.raise_money.DataBase.UserService;