Esempio n. 1
0
 public void InitDGVStatistics()
 {
     using (var context = new BotanicalGardenContext())
     {
         context.Statistics.Load();
         DGVStatistics.DataSource = context.Statistics.Local.ToBindingList();
         DGVStatistics.Columns["Tree"].Visible                = false;
         DGVStatistics.Columns["Plant"].Visible               = false;
         DGVStatistics.Columns["Id"].HeaderText               = "№";
         DGVStatistics.Columns["DateTime"].HeaderText         = "Дата/Время";
         DGVStatistics.Columns["LivingСonditions"].HeaderText = "Среда обитания";
         DGVStatistics.Columns["Сondition"].HeaderText        = "Состояние";
         DGVStatistics.Columns["Population"].HeaderText       = "Количество";
         DGVStatistics.Columns["TreeId"].HeaderText           = "№ дереа";
         DGVStatistics.Columns["PlantId"].HeaderText          = "№ растения";
         DGVStatistics.Refresh();
     }
 }
Esempio n. 2
0
 public void InitDGVStatistics()
 {
     using (var context = new AquariumContext())
     {
         context.Statistics.Load();
         DGVStatistics.DataSource = context.Statistics.Local.ToBindingList();
         DGVStatistics.Columns["Fish"].Visible                = false;
         DGVStatistics.Columns["Plant"].Visible               = false;
         DGVStatistics.Columns["Plant"].Visible               = false;
         DGVStatistics.Columns["Id"].HeaderText               = "№";
         DGVStatistics.Columns["DateTime"].HeaderText         = "Дата/Время";
         DGVStatistics.Columns["LivingСonditions"].HeaderText = "Условия обитания";
         DGVStatistics.Columns["Nutrition"].HeaderText        = "Питание";
         DGVStatistics.Columns["Population"].HeaderText       = "Популяция";
         DGVStatistics.Columns["FishId"].HeaderText           = "№ рыбы";
         DGVStatistics.Columns["PlantId"].HeaderText          = "№ водоросли";
         DGVStatistics.Refresh();
     }
 }