public static bool InsertFlightServicePassenger( string givenName, string middleName, string surname, string gender, string birthDate, string passportOrIDNo, string passportOrIDExpiryDate, string email, string mobileNo) { using (var db = new OTADBContext()) { var newTuple = new FlightServicePassenger() { GivenName = givenName, MiddleName = middleName, Surname = surname, Gender = gender, Birthdate = birthDate, PassportOrIdNo = passportOrIDNo, PassportOrIdExpiryDate = passportOrIDExpiryDate, Email = email, MobileNo = mobileNo }; db.FlightServicePassengers.Add(newTuple); var affected = db.SaveChanges(); return(affected == 1); } }
public static bool InsertBookedFlightService(int fsId, string date) { using (var db = new OTADBContext()) { var newTuple = new BookedFlightService() { FsId = fsId, Date = date }; db.BookedFlightServices.Add(newTuple); var affected = db.SaveChanges(); return(affected == 1); } }
public static bool InsertBookedPassenger(int bookedId, int passengerId) { using (var db = new OTADBContext()) { var newTuple = new BookedPassenger() { BookedId = bookedId, PassengerId = passengerId }; db.BookedPassengers.Add(newTuple); var affected = db.SaveChanges(); return(affected == 1); } }
public static bool InsertBaggageInformation(int passengerId, int cabinBagCount, int checkedBagCount) { using (var db = new OTADBContext()) { var newTuple = new BaggageInformation() { PassengerId = passengerId, CabinBagCount = cabinBagCount, CheckedBagCount = checkedBagCount }; db.BaggageInformations.Add(newTuple); var affected = db.SaveChanges(); return(affected == 1); } }
public static bool InsertBillBaggage(int biId, decimal cabinBagPrice, decimal checkedBagPrice ) { using (var db = new OTADBContext()) { var newTuple = new BillBaggage() { BiId = biId, CabinBagPrice = cabinBagPrice, CheckedBagPrice = checkedBagPrice }; db.BillBaggages.Add(newTuple); var affected = db.SaveChanges(); return(affected == 1); } }
public static bool InsertBilledBookedFlightService( int bookingId, string method, decimal totalPrice ) { using (var db = new OTADBContext()) { var newTuple = new BilledBookedFlightService() { BookingId = bookingId, Method = method, TotalPrice = totalPrice }; db.BilledBookedFlightServices.Add(newTuple); var affected = db.SaveChanges(); return(affected == 1); } }