Beispiel #1
0
        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);
            }
        }
Beispiel #3
0
 public void AddTheatre(Theatre t)
 {
     db.AddToTheatres(t);
     db.SaveChanges();
 }
Beispiel #4
0
 public void CreateSchedule(MovieSchedule ms)
 {
     db.AddToMovieSchedules(ms);
     db.SaveChanges();
 }
 public void AddMovie(Movie m)
 {
     db.AddToMovies(m);
     db.SaveChanges();
 }
Beispiel #6
0
 public void addNewRestaurant(Restaurant r)
 {
     context.AddToRestaurants(r);
     context.SaveChanges();
 }