예제 #1
0
        public RentalSearchForm(int memberID)
        {
            InitializeComponent();
            Global.memberID = memberID;
            Member currentMember = MemberDB.GetMember(memberID);

            lblName.Text = "Hello " + currentMember.firstname;
            List <Movie>      myMovieList = MovieDB.GetMovies();
            List <PictureBox> pixBoxes    = new List <PictureBox>();

            pixBoxes.Add(pictureBox7);
            pixBoxes.Add(pictureBox8);
            pixBoxes.Add(pictureBox9);
            pixBoxes.Add(pictureBox10);
            imageList1.ImageSize = new Size(32, 32);
            for (int i = 0; i < pixBoxes.Count; i++)
            {
                pixBoxes[i].Load(myMovieList[i].image);
            }
            //foreach (Movie movie in myMovieList)
            //{
            //    pictureBox1.Load(movie.image);
            //    var newImage = Image.FromFile(@"C:\Users\pezhe\OneDrive\Documents\College Classes\C# II\In-Class Demos\Week 10\Project2Template_v2Fall2016\Project2Template\MeramecNetFlixProject\Resources\stlcc-icon-dark-blue.png");
            //    pictureBox1.Image = newImage;
            //    imageList1.Images.Add(newImage);
            //}
        }
예제 #2
0
        private void BrowseForm_Load(object sender, EventArgs e)
        {
            MovieList = MovieDB.GetMovies();
            genreList = GenreDB.GetGenres();

            ScrollDisplay(0);
        }
        public IActionResult Home()
        {
            MovieList = MovieDBObj.GetMovies();
            int logged = Convert.ToInt32(HttpContext.Session.GetInt32("Logged"));

            ViewData["message"] = logged;
            return(View(MovieList));
        }
예제 #4
0
        public RentalForm()
        {
            InitializeComponent();
            Movies = MovieDB.GetMovies();
            //FormBorderStyle = FormBorderStyle.None;
            //WindowState = FormWindowState.Maximized;

            initPictureBoxes();

            pbLeftArrow.Enabled = false;
            pbLeftArrow.Visible = false;
        }
예제 #5
0
        public RentalForm(Member member)
        {
            InitializeComponent();
            Movies      = MovieDB.GetMovies();
            this.member = member;
            //FormBorderStyle = FormBorderStyle.None;
            //WindowState = FormWindowState.Maximized;
            initPictureBoxes();
            PopulateGenreCB();

            pbLeftArrow.Enabled = false;
            pbLeftArrow.Visible = false;
        }
예제 #6
0
 private void btnBrowse_Click(object sender, EventArgs e)
 {
     try
     {
         List <Movie> myMovieList = new List <Movie>();
         myMovieList = MovieDB.GetMovies();
         dataGridView1.DataSource = myMovieList;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "MeramecNetFlix", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void btnBrowse_Click(object sender, EventArgs e)
 {
     //Call the MovieDB static class to fill the data grid
     try
     {
         List <Movie> movieList = new List <Movie>();
         movieList = MovieDB.GetMovies();
         dataGridView1.DataSource = movieList;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        private void btn_Browse_Click(object sender, EventArgs e)
        {
            dataGridView1.Rows.Clear();
            foreach (Movie m in MovieDB.GetMovies())
            {
                //put each genre object into a datagridview row object
                DataGridViewRow newRow = new DataGridViewRow();

                //creates cells using dataGridView1 as a template
                newRow.CreateCells(dataGridView1);
                newRow.Cells[0].Value = int.Parse(m.id);
                newRow.Cells[1].Value = m.movie_title;
                newRow.Cells[2].Value = m.description;
                newRow.Cells[3].Value = int.Parse(m.movie_year_made);
                newRow.Cells[4].Value = genreList.Find(x => x.id == m.genre_id).name;
                newRow.Cells[5].Value = m.movie_rating;

                dataGridView1.Rows.Add(newRow);
            }
        }
예제 #9
0
 private void btnShowAll_Click(object sender, EventArgs e)
 {
     Movies = MovieDB.GetMovies();
     LoadMovies();
 }
예제 #10
0
        private void pictureBox7_Click(object sender, EventArgs e)
        {
            List <Movie> myMovieList = MovieDB.GetMovies();

            new RentalDetailsForm(Global.memberID, myMovieList[0].movie_number).Show();
        }
예제 #11
0
 public static IEnumerable <Movie> GetList()
 {
     return(MovieDB.GetMovies());
 }