Commit c9c1871d authored by austin.blanke's avatar austin.blanke

Performance Display Working, Tickets Coming Along

parent 22239a1e
......@@ -104,6 +104,23 @@ public class DatabaseConnector extends SQLiteOpenHelper {
play1.put(COLUMN_STEPS, "false");
play1.put(COLUMN_TICSEAT, 17);
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);
ContentValues play2 = new ContentValues();
......@@ -223,11 +240,11 @@ public class DatabaseConnector extends SQLiteOpenHelper {
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(query, null);
cursor.moveToFirst();
for(int i=8;i< cursor.getCount();i++){
if(cursor.getString(i) != null){
for(int i=8;i<16;i++){
if(Integer.valueOf((cursor.getString(i))) != 0){
count = count + 1;
if(count==t){
result = (cursor.getString(i));
result = cursor.getString(i+1).toString();
}
}
}
......@@ -243,11 +260,11 @@ public class DatabaseConnector extends SQLiteOpenHelper {
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(query, null);
cursor.moveToFirst();
for(int i=8;i< cursor.getCount();i++){
for(int i=8;i<26;i++){
if(cursor.getString(i) != null){
count = count + 1;
if(count==t){
result = (cursor.getString(i+1));
result = cursor.getString(i+1).toString();
}
}
}
......
......@@ -57,7 +57,7 @@ public class MoreInfoActivity extends AppCompatActivity {
if(Stairs == "true"){Stairsdis = "There are less than 20 steps";}
else{Stairsdis = "There are more than 20 steps";}
Tickets1 = connector.getTicketCount(PID, 1);
Tickets1 = connector.getInfo(PID, 8);
Tickets2 = connector.getTicketCount(PID, 2);
Tickets3 = connector.getTicketCount(PID, 3);
Tickets1Price = connector.getTicketPrice(PID, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment