public bool insertSchedule(movieHall m) { bool a; a = mda.dbInsertSchedule(m.hallid, m.slot_1, m.slot_2, m.slot_3, m.movieDate); if (a == true) { return(true); } else { return(false); } }
public List <movieHall> GetMovieByDate(DateTime date) { var Movie = mda.GetAllMovieDates(date); List <movieHall> movieHalllist = new List <movieHall>(); for (int i = 0; i < Movie.Rows.Count; i++) { t2 = new movieHall(); t2.id = int.Parse(Movie.Rows[i][0].ToString()); t2.hallid = int.Parse(Movie.Rows[i][1].ToString()); t2.slot_1 = int.Parse(Movie.Rows[i][2].ToString()); t2.slot_2 = int.Parse(Movie.Rows[i][3].ToString()); t2.slot_3 = int.Parse(Movie.Rows[i][4].ToString()); t2.movieDate = Convert.ToDateTime(Movie.Rows[i][5]); //t.startDate =Convert.ToDateTime( Movie.Rows[i][7]); //t.endDate =Convert.ToDateTime( Movie.Rows[i][8]); movieHalllist.Add(t2); } return(movieHalllist); }