reservation_available(seat_id, seat_type, flight_id, available)
using (SqlCommand command = new SqlCommand("SELECT seat_id, seat_type, available FROM reservation_available WHERE seat_type = 'Economic' AND reservation_available.flight_id = '" + flight_id + "' ", connection)) { string s_ID = seat_id.ToString(); string e_avail = EconomicAvailable.ToString(); string st = seat_type; SqlDataReader myReader = command.ExecuteReader(); while (myReader.Read()) { s_ID = myReader[0].ToString(); st = myReader[1].ToString(); e_avail = myReader[2].ToString(); } int sId = Convert.ToInt32(s_ID); int eAvail = Convert.ToInt32(e_avail); myReader.Close(); set2(sId, eAvail, st); }
WHERE seat_type='Economic'
SqlDataReader myReader...
while
set2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)