public FormReadCountry(HotelReservationContext context, ReadControler read)
 {
     InitializeComponent();
     this.context = context;
     this.read    = read;
     countries    = read.CounrtiesList();
 }
Esempio n. 2
0
        public AddClients(HotelReservationContext context)
        {
            InitializeComponent();
            this.context = context;
            message      = new MessageApp();
            insert       = new InsertControler();
            read         = new ReadControler(context);
            List <Town>    towns     = read.TownsList();
            List <Country> countries = read.CounrtiesList();

            foreach (var t in towns)
            {
                comboBox1.Items.Add(t.Name);
            }
            foreach (var c in countries)
            {
                comboBox2.Items.Add(c.Name);
            }
            for (int i = 16; i < 120; i++)
            {
                comboBox3.Items.Add(i);
            }
        }