public bool Post(int Flight_Number, string Seats, int Pnr_no) { try { db.sp_UpdateSeats(Flight_Number, Seats); var data = db.Flight_Reservation.Where(x => x.Pnr_no == Pnr_no).SingleOrDefault(); data.status = "Success"; var res = db.SaveChanges(); if (res > 0) { return(true); } else { return(false); } } catch (Exception ex) { throw ex; } }
public bool Post(int Flight_Number, string Seats) { try { db.sp_UpdateSeats(Flight_Number, Seats); var data = db.Flight_Schedules.Where(x => x.Flight_Number == Flight_Number).SingleOrDefault(); data.Seats = Seats; var res = db.SaveChanges(); if (res > 0) { return(true); } else { return(false); } } catch (Exception ex) { throw ex; } }