Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PlaysRUs
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.pople
PlaysRUs
Commits
2f2a22ef
Commit
2f2a22ef
authored
Jun 19, 2023
by
sam.pople
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
afterseeinggit
parent
847defd4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
seating.java
...sRUs2/app/src/main/java/com/example/playsrus/seating.java
+4
-1
No files found.
PlaysRUs2/app/src/main/java/com/example/playsrus/seating.java
View file @
2f2a22ef
...
@@ -48,7 +48,7 @@ public class seating extends AppCompatActivity implements AdapterView.OnItemSele
...
@@ -48,7 +48,7 @@ public class seating extends AppCompatActivity implements AdapterView.OnItemSele
int
ticketsthere
=
database
.
gettickets
(
playnameforthis
);
int
ticketsthere
=
database
.
gettickets
(
playnameforthis
);
String
getseating
=
seatingtype
.
getSelectedItem
().
toString
();
String
getseating
=
seatingtype
.
getSelectedItem
().
toString
();
displaytickets
.
setText
(
String
.
valueOf
(
ticketsthere
));
displaytickets
.
setText
(
String
.
valueOf
(
ticketsthere
));
//This ensures that the number of ordered tickets is acceptable
//This ensures that the number of ordered tickets is acceptable
and tells the customer if they did something wrong
confirm
.
setOnClickListener
(
v
->
{
confirm
.
setOnClickListener
(
v
->
{
TextView
displayorderedtickets
=
findViewById
(
R
.
id
.
orderedticketshamlet
);
TextView
displayorderedtickets
=
findViewById
(
R
.
id
.
orderedticketshamlet
);
int
orderedtickets
=
Integer
.
parseInt
(
displayorderedtickets
.
getText
().
toString
());
int
orderedtickets
=
Integer
.
parseInt
(
displayorderedtickets
.
getText
().
toString
());
...
@@ -79,6 +79,7 @@ public class seating extends AppCompatActivity implements AdapterView.OnItemSele
...
@@ -79,6 +79,7 @@ public class seating extends AppCompatActivity implements AdapterView.OnItemSele
});
});
//This returns to the main page
seatingback
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
seatingback
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
view
)
{
public
void
onClick
(
View
view
)
{
...
@@ -89,6 +90,7 @@ public class seating extends AppCompatActivity implements AdapterView.OnItemSele
...
@@ -89,6 +90,7 @@ public class seating extends AppCompatActivity implements AdapterView.OnItemSele
//This allows the user to order a certain number of tickets
//This allows the user to order a certain number of tickets
Button
plusone
=
findViewById
(
R
.
id
.
plusonehamlet
);
Button
plusone
=
findViewById
(
R
.
id
.
plusonehamlet
);
Button
minusone
=
findViewById
(
R
.
id
.
minusonehamlet
);
Button
minusone
=
findViewById
(
R
.
id
.
minusonehamlet
);
//This adds one to the number of tickets on click
plusone
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
plusone
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
...
@@ -96,6 +98,7 @@ public class seating extends AppCompatActivity implements AdapterView.OnItemSele
...
@@ -96,6 +98,7 @@ public class seating extends AppCompatActivity implements AdapterView.OnItemSele
displayorderedtickets
.
setText
(
String
.
valueOf
(
orderedtickets
));
displayorderedtickets
.
setText
(
String
.
valueOf
(
orderedtickets
));
}
}
});
});
//This takes one from the number of tickets orders on click
minusone
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
minusone
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
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