Beispiel #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            entities = new BD_waterfallsEntities();
            entities.Animals.Load();
            animalsBindingSource.DataSource = entities.Animals.Local.ToBindingList();
            entities.Waterfalls.Load();
            waterfallsBindingSource.DataSource = entities.Waterfalls.Local.ToBindingList();
            entities.Visits.Load();
            visitsBindingSource.DataSource = entities.Visits.Local.ToBindingList();
            entities.Types.Load();
            typesBindingSource.DataSource = entities.Types.Local.ToBindingList();
            entities.Rivers.Load();
            riversBindingSource.DataSource = entities.Rivers.Local.ToBindingList();


            foreach (DataGridViewRow row in dataGridViewWaterfalls.Rows)
            {
                row.Height = 400;
            }
            dataGridViewWaterfalls.Columns[2].Width   = 850;
            dataGridViewWaterfalls.Columns[0].Width   = 50;
            dataGridViewWaterfalls.RowTemplate.Height = 200;

            //dataGridViewAnimals.Columns[3].Width = 250;
            dataGridViewAnimals.Columns[2].Width   = 700;
            dataGridViewAnimals.RowTemplate.Height = 450;

            dataGridViewVisits.Columns[4].Width = 850;
        }
Beispiel #2
0
        private void SearchForm_Load(object sender, EventArgs e)
        {
            entities = new BD_waterfallsEntities();
            entities.Waterfalls.Load();
            waterfallsBindingSource.DataSource = entities.Waterfalls.Local.ToBindingList();

            /*entities.Visits.Load();
             * visitsBindingSource.DataSource = entities.Visits.Local.ToBindingList();*/
            entities.Types.Load();
            typesBindingSource.DataSource = entities.Types.Local.ToBindingList();
            entities.Rivers.Load();
            riversBindingSource.DataSource = entities.Rivers.Local.ToBindingList();

            dataGridView1.Columns[2].Width = 800;
            dataGridView1.Columns[0].Width = 50;
            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                row.Height = 400;
            }
        }