예제 #1
0
 public Form1()
 {
     InitializeComponent();
     dbMovie = new MoviesRepository();
     dbPerson = new PersonRepository();
     urlParams = "&type=json&plot=full&episode=1&lang=en-US&aka=simple&release=full&business=0&tech=0";
     textBox2.Text = "Waiting for command";
 }
예제 #2
0
        public List<CastModel> getWritersByMovieId(int id)
        {
            PersonRepository dbPerson = new PersonRepository();

            List<CastModel> tempList = new List<CastModel>();

            IQueryable<cast> temp = getCast(id);

            foreach (cast c in temp)
            {
                if (c.role == 3)
                {
                    person tempMen = dbPerson.getPersonById(c.person_id);

                    CastModel tempModel = new CastModel();

                    tempModel.id = tempMen.id;
                    tempModel.name = tempMen.name;
                    tempModel.photo = tempMen.image_person.Where(i => i.is_portrait.Equals(true))
                                                          .FirstOrDefault()
                                                          .id;

                    tempList.Add(tempModel);
                }
            }

            return tempList;
        }
예제 #3
0
 public MovieController()
 {
     dbMovie = new MoviesRepository();
     dbPerson = new PersonRepository();
     dbUser = new UsersRepository();
 }