public int UpdateSeatBooking(String seatId, String bookingId, int sceduleId) { SeatAvailability v = context.SeatAvailabilities.Where(t => t.SeatNumber.CompareTo(seatId) == 0).Where(t => t.ScheduleId == sceduleId).FirstOrDefault(); v.BookingId = bookingId; int NoOfRowsAffected = context.SaveChanges(); return(NoOfRowsAffected); }
public Member CreateMemberById(String username, String password) { if (SelectMemberById(username) == null) { Member tempMember = new Member(); tempMember.Id = username; tempMember.Name = ""; tempMember.NRIC = password; //tempMember.DOB = DateTime.Now; MovieTicketingEntities.Members.AddObject(tempMember); MovieTicketingEntities.SaveChanges(); return(LogonMemberById(username, password)); } else { return(null); } }
public void AddTheatre(Theatre t) { db.AddToTheatres(t); db.SaveChanges(); }
public void CreateSchedule(MovieSchedule ms) { db.AddToMovieSchedules(ms); db.SaveChanges(); }
public void AddMovie(Movie m) { db.AddToMovies(m); db.SaveChanges(); }
public void addNewRestaurant(Restaurant r) { context.AddToRestaurants(r); context.SaveChanges(); }