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
b2c43ec1
Commit
b2c43ec1
authored
Apr 29, 2021
by
Sam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit v7
parent
b5208790
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
Receipt.java
...c/main/java/com/example/museumworld/checkout/Receipt.java
+5
-7
register.java
...src/main/java/com/example/museumworld/login/register.java
+10
-2
activity_register.xml
app/src/main/res/layout/activity_register.xml
+1
-0
No files found.
app/src/main/java/com/example/museumworld/checkout/Receipt.java
View file @
b2c43ec1
...
...
@@ -71,10 +71,6 @@ public class Receipt extends AppCompatActivity implements View.OnClickListener {
mainMenu_btn
.
setOnClickListener
(
this
);
initDatabase
();
userDetailsReceipt
();
displayItemsOnReceipt
();
}
public
void
initDatabase
()
{
...
...
@@ -82,20 +78,22 @@ public class Receipt extends AppCompatActivity implements View.OnClickListener {
allQuantities
=
getIntent
().
getStringArrayListExtra
(
"allQuantities"
);
allPrices
=
getIntent
().
getStringArrayListExtra
(
"allPrices"
);
bookingID
=
getIntent
().
getIntExtra
(
"bookingID"
,
0
);
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
));
usersReceipt
();
}
//creates user receipt of the database
private
void
usersReceipt
()
{
StringRequest
stringRequest
=
new
StringRequest
(
Request
.
Method
.
POST
,
userReceiptUrl
,
(
Response
.
Listener
<
String
>)
response
->
{
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 @
b2c43ec1
...
...
@@ -123,6 +123,11 @@ public class register extends AppCompatActivity implements View.OnClickListener
setParams
(
ErrorMessageuserName
);
ErrorMessageuserName
.
setText
(
message
);
}
else
if
(
username
.
length
()
>
30
){
message
=
getString
(
R
.
string
.
reister_username
);
setParams
(
ErrorMessageuserName
);
ErrorMessageuserName
.
setText
(
message
);
}
else
{
ResetParams
(
ErrorMessageuserName
);
}
...
...
@@ -140,9 +145,12 @@ public class register extends AppCompatActivity implements View.OnClickListener
setParams
(
ErrorMessagepassword2
);
ErrorMessagepassword2
.
setText
(
message
);
}
else
{
}
else
{
ResetParams
(
ErrorMessagepassword2
);
}
if
(
password
.
equals
(
password2
)
&&
password2
.
length
()
>=
7
&&
password
.
length
()
>=
7
&&
username
.
length
()
>=
5
&&
lastname
.
length
()
>=
3
&&
firstname
.
length
()
>=
2
)
{
addAccount
(
firstname
,
lastname
,
username
,
password
);
return
false
;
}
...
...
app/src/main/res/layout/activity_register.xml
View file @
b2c43ec1
...
...
@@ -207,6 +207,7 @@
android:layout_below=
"@+id/ErrorMessageuserName"
>
<EditText
android:maxLength=
"30"
android:id=
"@+id/username_EditText"
style=
"@style/input_text_theme"
android:autofillHints=
""
...
...
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