Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CarRental_Christopher_Foster
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
christopher.foster
CarRental_Christopher_Foster
Commits
989e16e2
Commit
989e16e2
authored
May 13, 2020
by
christopher.foster
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Login somewhat functional
parent
a0e1f704
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
DBConnector.java
app/src/main/java/com/example/assignment/DBConnector.java
+1
-1
MainActivity.java
app/src/main/java/com/example/assignment/MainActivity.java
+2
-2
No files found.
app/src/main/java/com/example/assignment/DBConnector.java
View file @
989e16e2
...
@@ -23,7 +23,7 @@ public class DBConnector extends SQLiteOpenHelper {
...
@@ -23,7 +23,7 @@ public class DBConnector extends SQLiteOpenHelper {
@Override
@Override
public
void
onCreate
(
SQLiteDatabase
db
)
public
void
onCreate
(
SQLiteDatabase
db
)
{
{
String
CREATE_table
=
"CREATE TABLE "
+
TABLE_Users
+
"("
+
COLUMN_ID
+
"INTEGER PRIMARY KEY, "
+
COLUMN_Name
+
" TEXT, "
+
COLUMN_UserName
+
" TEXT, "
+
COLUMN_Password
+
" INTEGER "
+
")"
;
String
CREATE_table
=
"CREATE TABLE "
+
TABLE_Users
+
"("
+
COLUMN_ID
+
"
INTEGER PRIMARY KEY, "
+
COLUMN_Name
+
" TEXT, "
+
COLUMN_UserName
+
" TEXT, "
+
COLUMN_Password
+
" INTEGER "
+
")"
;
db
.
execSQL
(
CREATE_table
);
db
.
execSQL
(
CREATE_table
);
}
}
...
...
app/src/main/java/com/example/assignment/MainActivity.java
View file @
989e16e2
...
@@ -49,8 +49,8 @@ public class MainActivity extends AppCompatActivity {
...
@@ -49,8 +49,8 @@ public class MainActivity extends AppCompatActivity {
handler
.
addNewUser
(
Name
.
getText
().
toString
(),
UserName
.
getText
().
toString
(),
Password
.
getText
().
toString
());
handler
.
addNewUser
(
Name
.
getText
().
toString
(),
UserName
.
getText
().
toString
(),
Password
.
getText
().
toString
());
Toast
.
makeText
(
getApplicationContext
(),
//
Toast.makeText(getApplicationContext(),
"registration complete\n"
+
handler
.
finduser
(
UserName
.
getText
().
toString
()),
Toast
.
LENGTH_LONG
).
show
();
//
"registration complete\n" + handler.finduser(UserName.getText().toString()), Toast.LENGTH_LONG).show();
}
}
public
void
loginBtn
(
View
v
)
public
void
loginBtn
(
View
v
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment