Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Summative_Sam_Markey
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
sam.markey
Summative_Sam_Markey
Commits
1f0dbf94
Commit
1f0dbf94
authored
Apr 30, 2021
by
Sam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit v9
parent
176d5661
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
Receipt.java
...c/main/java/com/example/museumworld/checkout/Receipt.java
+3
-7
register.java
...src/main/java/com/example/museumworld/login/register.java
+3
-1
No files found.
app/src/main/java/com/example/museumworld/checkout/Receipt.java
View file @
1f0dbf94
...
...
@@ -78,12 +78,9 @@ public class Receipt extends AppCompatActivity implements View.OnClickListener {
allQuantities
=
getIntent
().
getStringArrayListExtra
(
"allQuantities"
);
allPrices
=
getIntent
().
getStringArrayListExtra
(
"allPrices"
);
bookingID
=
getIntent
().
getIntExtra
(
"bookingID"
,
0
);
userDetailsReceipt
();
displayItemsOnReceipt
();
usersReceipt
();
Log
.
d
(
"Receipt"
,
String
.
valueOf
(
bookingID
));
Log
.
d
(
"Receipt"
,
String
.
valueOf
(
allItems
));
Log
.
d
(
"Receipt"
,
String
.
valueOf
(
allQuantities
));
Log
.
d
(
"Receipt"
,
String
.
valueOf
(
MainActivity
.
usernameG
));
}
//creates user receipt of the database
...
...
@@ -92,8 +89,7 @@ public class Receipt extends AppCompatActivity implements View.OnClickListener {
Log
.
d
(
"usernameG"
,
MainActivity
.
usernameG
);
Log
.
d
(
"responseuserR"
,
response
);
if
(
response
.
equals
(
"success"
))
{
userDetailsReceipt
();
displayItemsOnReceipt
();
if
(
allItems
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
allItems
.
size
();
i
++)
{
...
...
app/src/main/java/com/example/museumworld/login/register.java
View file @
1f0dbf94
...
...
@@ -165,8 +165,10 @@ public class register extends AppCompatActivity implements View.OnClickListener
else
{
ResetParams
(
ErrorMessagepassword2
);
}
if
(
password
.
equals
(
password2
)
&&
password2
.
length
()
>=
7
&&
password
.
length
()
>=
7
&&
username
.
length
()
>=
5
&&
lastname
.
length
()
>=
3
&&
firstname
.
length
()
>=
2
)
{
if
(
password
.
matches
(
"[a-zA-Z0-9]*"
)
&&
username
.
matches
(
"[a-zA-Z0-9]*"
)&&
lastname
.
matches
(
"[a-zA-Z]*"
)
&&
firstname
.
matches
(
"[a-zA-Z]*"
)
&&
password
.
equals
(
password2
)
&&
password2
.
length
()
>=
7
&&
password
.
length
()
>=
7
&&
username
.
length
()
>=
5
&&
lastname
.
length
()
>=
3
&&
firstname
.
length
()
>=
2
)
{
firstname
=
firstname
.
substring
(
0
,
1
).
toUpperCase
()
+
firstname
.
substring
(
1
);
lastname
=
lastname
.
substring
(
0
,
1
).
toUpperCase
()
+
lastname
.
substring
(
1
);
addAccount
(
firstname
,
lastname
,
username
,
password
);
return
false
;
}
...
...
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