Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Booking App COM5007
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
austin.blanke
Booking App COM5007
Commits
c9c1871d
Commit
c9c1871d
authored
May 28, 2023
by
austin.blanke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Performance Display Working, Tickets Coming Along
parent
22239a1e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
DatabaseConnector.java
...om/example/bookingapp_austinblanke/DatabaseConnector.java
+22
-5
MoreInfoActivity.java
...com/example/bookingapp_austinblanke/MoreInfoActivity.java
+1
-1
No files found.
app/src/main/java/com/example/bookingapp_austinblanke/DatabaseConnector.java
View file @
c9c1871d
...
@@ -104,6 +104,23 @@ public class DatabaseConnector extends SQLiteOpenHelper {
...
@@ -104,6 +104,23 @@ public class DatabaseConnector extends SQLiteOpenHelper {
play1
.
put
(
COLUMN_STEPS
,
"false"
);
play1
.
put
(
COLUMN_STEPS
,
"false"
);
play1
.
put
(
COLUMN_TICSEAT
,
17
);
play1
.
put
(
COLUMN_TICSEAT
,
17
);
play1
.
put
(
COLUMN_TICSEATCOST
,
8
);
play1
.
put
(
COLUMN_TICSEATCOST
,
8
);
play1
.
put
(
COLUMN_TICSTAND
,
0
);
play1
.
put
(
COLUMN_TICSTANDCOST
,
0
);
play1
.
put
(
COLUMN_TICSTAGE
,
0
);
play1
.
put
(
COLUMN_TICSTAGECOST
,
0
);
play1
.
put
(
COLUMN_TICGRASS
,
0
);
play1
.
put
(
COLUMN_TICGRASSCOST
,
0
);
play1
.
put
(
COLUMN_TICBOATA
,
0
);
play1
.
put
(
COLUMN_TICBOATACOST
,
0
);
play1
.
put
(
COLUMN_TICBOATB
,
0
);
play1
.
put
(
COLUMN_TICBOATBCOST
,
0
);
play1
.
put
(
COLUMN_TICRIVERBANK
,
0
);
play1
.
put
(
COLUMN_TICRIVERBANKCOST
,
0
);
play1
.
put
(
COLUMN_TICINNERCIRCLE
,
0
);
play1
.
put
(
COLUMN_TICINNERCIRCLECOST
,
0
);
play1
.
put
(
COLUMN_TICOUTTERCIRCLE
,
0
);
play1
.
put
(
COLUMN_TICOUTTERCIRCLECOST
,
0
);
db
.
insert
(
TABLE_PERFORMANCES
,
null
,
play1
);
db
.
insert
(
TABLE_PERFORMANCES
,
null
,
play1
);
ContentValues
play2
=
new
ContentValues
();
ContentValues
play2
=
new
ContentValues
();
...
@@ -223,11 +240,11 @@ public class DatabaseConnector extends SQLiteOpenHelper {
...
@@ -223,11 +240,11 @@ public class DatabaseConnector extends SQLiteOpenHelper {
SQLiteDatabase
db
=
this
.
getWritableDatabase
();
SQLiteDatabase
db
=
this
.
getWritableDatabase
();
Cursor
cursor
=
db
.
rawQuery
(
query
,
null
);
Cursor
cursor
=
db
.
rawQuery
(
query
,
null
);
cursor
.
moveToFirst
();
cursor
.
moveToFirst
();
for
(
int
i
=
8
;
i
<
cursor
.
getCount
()
;
i
++){
for
(
int
i
=
8
;
i
<
16
;
i
++){
if
(
cursor
.
getString
(
i
)
!=
null
){
if
(
Integer
.
valueOf
((
cursor
.
getString
(
i
)))
!=
0
){
count
=
count
+
1
;
count
=
count
+
1
;
if
(
count
==
t
){
if
(
count
==
t
){
result
=
(
cursor
.
getString
(
i
)
);
result
=
cursor
.
getString
(
i
+
1
).
toString
(
);
}
}
}
}
}
}
...
@@ -243,11 +260,11 @@ public class DatabaseConnector extends SQLiteOpenHelper {
...
@@ -243,11 +260,11 @@ public class DatabaseConnector extends SQLiteOpenHelper {
SQLiteDatabase
db
=
this
.
getWritableDatabase
();
SQLiteDatabase
db
=
this
.
getWritableDatabase
();
Cursor
cursor
=
db
.
rawQuery
(
query
,
null
);
Cursor
cursor
=
db
.
rawQuery
(
query
,
null
);
cursor
.
moveToFirst
();
cursor
.
moveToFirst
();
for
(
int
i
=
8
;
i
<
cursor
.
getCount
()
;
i
++){
for
(
int
i
=
8
;
i
<
26
;
i
++){
if
(
cursor
.
getString
(
i
)
!=
null
){
if
(
cursor
.
getString
(
i
)
!=
null
){
count
=
count
+
1
;
count
=
count
+
1
;
if
(
count
==
t
){
if
(
count
==
t
){
result
=
(
cursor
.
getString
(
i
+
1
)
);
result
=
cursor
.
getString
(
i
+
1
).
toString
(
);
}
}
}
}
}
}
...
...
app/src/main/java/com/example/bookingapp_austinblanke/MoreInfoActivity.java
View file @
c9c1871d
...
@@ -57,7 +57,7 @@ public class MoreInfoActivity extends AppCompatActivity {
...
@@ -57,7 +57,7 @@ public class MoreInfoActivity extends AppCompatActivity {
if
(
Stairs
==
"true"
){
Stairsdis
=
"There are less than 20 steps"
;}
if
(
Stairs
==
"true"
){
Stairsdis
=
"There are less than 20 steps"
;}
else
{
Stairsdis
=
"There are more than 20 steps"
;}
else
{
Stairsdis
=
"There are more than 20 steps"
;}
Tickets1
=
connector
.
get
TicketCount
(
PID
,
1
);
Tickets1
=
connector
.
get
Info
(
PID
,
8
);
Tickets2
=
connector
.
getTicketCount
(
PID
,
2
);
Tickets2
=
connector
.
getTicketCount
(
PID
,
2
);
Tickets3
=
connector
.
getTicketCount
(
PID
,
3
);
Tickets3
=
connector
.
getTicketCount
(
PID
,
3
);
Tickets1Price
=
connector
.
getTicketPrice
(
PID
,
1
);
Tickets1Price
=
connector
.
getTicketPrice
(
PID
,
1
);
...
...
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