public Reviews(MovieList ml, int i)
        {
            actorRepo    = new SqlActorRepository(connectionString);
            movieRepo    = new SqlMovieRepository(connectionString);
            reviewRepo   = new SqlReviewRepository(connectionString);
            showtimeRepo = new SqlShowTimeRepository(connectionString);
            ticketRepo   = new SqlTicketRepository(connectionString);
            viewerRepo   = new SqlViewerRepository(connectionString);

            InitializeComponent();
            movieList = ml;

            rUserLabel.Text = movieList.getCurrentUserLabel();
            cu        = movieList.getCurrentUser();
            index     = i;
            movieName = movieRepo.FetchMovie(i).Name;

            IReadOnlyList <Review> reviews = reviewRepo.FetchMovieReviews(i);

            foreach (Review r in reviews)
            {
                listBox1.Items.Add(r.ToString());
            }
            movieNameLabel.Text = movieName;
        }
        private void createUserButton_Click(object sender, EventArgs e)
        {
            string user   = textBox1.Text.ToLower();
            string name   = textBox2.Text;
            string gender = "Male";

            if (checkBox2.Checked)
            {
                gender = "Female";
            }
            string asString = dateTimePicker1.Value.ToString("yyyy/MM/dd");

            try
            {
                Viewer v = viewerRepo.RetrieveViewerOnEmail(user);
                MessageBox.Show("Email is already in the database");
            }
            catch
            {
                mainForm.theUser = new currentUser(user);
                mainForm.changeLabel(mainForm.theUser.userName);

                string[] username = user.Split('@');

                viewerRepo.CreateViewer(gender, user, asString, username[0], name);
                MessageBox.Show("new user created!");
                currentUser newUser = new currentUser(user);
                this.Close();
            }
        }
        public writeReview(Reviews r)
        {
            actorRepo    = new SqlActorRepository(connectionString);
            movieRepo    = new SqlMovieRepository(connectionString);
            reviewRepo   = new SqlReviewRepository(connectionString);
            showtimeRepo = new SqlShowTimeRepository(connectionString);
            ticketRepo   = new SqlTicketRepository(connectionString);
            viewerRepo   = new SqlViewerRepository(connectionString);

            InitializeComponent();

            review      = r;
            cu          = review.getCurrentUser();
            label1.Text = cu.userName;
            label4.Text = review.getMovieName();
        }
        public MovieList(Form1 f1)
        {
            InitializeComponent();
            mainForm = f1;

            mlSignedinLabel.Text = mainForm.getCurrentUserLabel();
            cu = mainForm.getCurrentUser();

            actorRepo    = new SqlActorRepository(connectionString);
            movieRepo    = new SqlMovieRepository(connectionString);
            reviewRepo   = new SqlReviewRepository(connectionString);
            showtimeRepo = new SqlShowTimeRepository(connectionString);
            ticketRepo   = new SqlTicketRepository(connectionString);
            viewerRepo   = new SqlViewerRepository(connectionString);

            IReadOnlyList <Movie> m = movieRepo.RetrieveMovies();

            foreach (Movie movie in m)
            {
                listBox1.Items.Add(movie.Name);
            }

            //populate listbox
        }