Beispiel #1
0
 public Ticket AddTicket(Ticket item )
 {
     DAL dal = new DAL();
     SqlCommand cmd = new SqlCommand();
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.CommandText = "SaveTicket";
     cmd.Parameters.AddWithValue("@mobile_number", item.mobileNumber);
     cmd.Parameters.AddWithValue("@schedule_id", item.schedule_id);
     int ticketsAdded = dal.ExecuteProcNonQuery(cmd);
     return item;
 }
 public Passenger AddPassenger(Passenger  item)
 {
     DAL dal = new DAL();
     SqlCommand cmd = new SqlCommand();
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.CommandText = "SavePassenger";
     cmd.Parameters.AddWithValue("@mobile_number", item.mobile_number);
     cmd.Parameters.AddWithValue("@email_address", item.email_address);
     cmd.Parameters.AddWithValue("@passenger_name", item.passenger_name);
     int ticketsAdded = dal.ExecuteProcNonQuery(cmd);
     return item;
 }