Beispiel #1
0
        private void AddMovieView_Load(object sender, EventArgs e)
        {
            var persons =
                _personDao
                .GetAllPersons()
                .Select(personDto => $"{personDto.Name}/{personDto.Id}")
                .OrderBy(s => s);

            castPerson.DataSource = persons.ToList();
            crewPerson.DataSource = persons.ToList();

            var genresData = _genresDao.GetAllGenres();

            foreach (var genre in genresData)
            {
                genres.Items.Add($"{genre.Name}/{genre.GenreId}");
            }

            var countriesData = _countriesDao.GetAllCountries();

            foreach (var country in countriesData)
            {
                countries.Items.Add($"{country.Name}/{country.CountryId}");
            }

            var jobsData = _crewDao.GetAllJobs().OrderBy(x => x);

            crewJob.DataSource = jobsData.ToList();
        }
Beispiel #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            passwordBox.UseSystemPasswordChar = true;
            var genresData = _genresDao.GetAllGenres();

            foreach (var genre in genresData)
            {
                genres.Items.Add(genre.Name);
            }

            var countriesData = _countriesDao.GetAllCountries();

            foreach (var country in countriesData)
            {
                countries.Items.Add(country.Name);
            }
        }