Example #1
0
 public FormBuildings()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
                    .Budynki
                    .Select(x => new BuildingsData {
             identyfikator_budynku = x.id_budynku, adres_budynku = x.adres_budynku
         })
                    .ToList());
     }
     dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
     dataGridView1.DataSource          = Dataset;
     dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
 }
Example #2
0
 public FormFirms()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
             .Firmy
             .Select(x => new FirmsData
             {
                 identyfikator_firmy = x.id_firmy,
                 NIP = x.NIP,
                 numer_telefonu = x.nr_telefonu,
                 nazwa_firmy = x.nazwa_firmy
             })
             .ToList());
     }
     dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
     dataGridView1.DataSource = Dataset;
     dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
 }
Example #3
0
 public FormSurveillances()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
                    .Dozorowania
                    .Select(x => new SurveillancesData
         {
             identyfikator_dozorcy = x.id_dozorcy,
             identyfikator_budynku = x.id_budynku,
             data_rozpoczecia = x.data_rozpoczecia ?? new DateTime(),
             data_zakonczenia = x.data_zakonczenia ?? new DateTime()
         })
                    .ToList());
     }
     dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
     dataGridView1.DataSource          = Dataset;
     dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
 }
Example #4
0
 public FormFaults()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
                    .Usterki
                    .Select(x => new FaultsData
         {
             identyfikator_usterki = x.id_usterki,
             identyfikator_mieszkania = x.id_mieszkania ?? 0,
             opis = x.opis,
             stan = x.stan
         })
                    .ToList());
     }
     dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
     dataGridView1.DataSource          = Dataset;
     dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
 }
Example #5
0
 public FormPayments()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
                    .Platnosci
                    .Select(x => new PaymentsData
         {
             identyfikator_platnosci = x.id_platnosci,
             identyfikator_wynajmnu = x.id_wynajmu ?? 0,
             data_platnosci = x.data_platnosci ?? new DateTime(),
             cena = x.cena,
             tytul = x.tytul
         })
                    .ToList());
     }
     dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
     dataGridView1.DataSource          = Dataset;
     dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
 }
 public FormCaretakers()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
                    .Dozorcy
                    .Select(x => new CaretakersData
         {
             identyfikator_dozorcy = x.id_dozorcy,
             numer_telefonu = x.nr_telefonu,
             imie = x.Imie,
             nazwisko = x.Nazwisko,
             PESEL = x.PESEL
         })
                    .ToList());
         dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
         dataGridView1.DataSource          = Dataset;
         dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
     }
 }
 public FormRepaireFactures()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
                    .FakturyNapraw
                    .Select(x => new RepairFacturesData
         {
             identyfikator_faktury = x.id_faktury,
             identyfikator_naprawy = x.id_naprawy ?? 0,
             cena = x.cena,
             numer_faktury = x.numer_faktury,
             data_platnosci = x.data_platnosci ?? new DateTime(),
         })
                    .ToList());
     }
     dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
     dataGridView1.DataSource          = Dataset;
     dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
 }
Example #8
0
 public FormFlats()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
                    .Mieszkania
                    .Select(x => new FlatsData
         {
             identyfikator_mieszkania = x.id_mieszkania,
             identyfikator_budynku = x.id_budynku ?? 0,
             numer = x.numer,
             metraz = x.metraz ?? 0,
             opis = x.opis
         })
                    .ToList());
     }
     dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
     dataGridView1.DataSource          = Dataset;
     dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
 }
Example #9
0
 public FormRentals()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
                    .Wynajmy
                    .Select(x => new RentalsData
         {
             identyfikator_wynajmnu = x.id_wynajmu,
             identyfikator_mieszkania = x.id_najemcy ?? 0,
             data_rozpoczecia = x.data_rozpoczecia ?? new DateTime(),
             data_zakończenia = x.data_zakonczenia ?? new DateTime(),
             identyfikator_najemcy = x.id_najemcy ?? 0,
             cena_miesieczna = x.cena_miesieczna ?? 0
         })
                    .ToList());
     }
     dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
     dataGridView1.DataSource          = Dataset;
     dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
 }
Example #10
0
 public FormRepairs()
 {
     InitializeComponent();
     using (var DBContext = new CommunitySystemEntities())
     {
         Dataset = (DBContext
                    .Naprawy
                    .Select(x => new RepairesData
         {
             identyfikator_naprawy = x.id_naprawy,
             identyfikator_usterki = x.id_usterki ?? 0,
             identyfikator_firmy = x.id_firmy ?? 0,
             stan = x.stan,
             data_zlecenia = x.data_zlecenia ?? new DateTime(),
             data_rozpoczecia = x.data_rozpoczecia ?? new DateTime(),
             data_zakonczenia = x.data_ukonczenia ?? new DateTime()
         })
                    .ToList());
     }
     dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
     dataGridView1.DataSource          = Dataset;
     dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
 }