//выборка квартир public void fillFlats(int house) { string query = "select id,number as Номер, numberofrooms as Комнат, area as [Площадь (кв.м)] from apartment where id_house=" + house; dataGridViewFlat.DataSource = Ado.ExecuteReader(query); }
//выборка жильцов public void fillDwellers(int flat) { string query = "select id,surname+space(1) + name +space(1)+ middlename as ФИО, phone as Телефон, age as Возраст from dwellers where id_apartment=" + flat; dataGridViewDweller.DataSource = Ado.ExecuteReader(query); }
//выборка домов public void fillBuilds() { string query = "select id,number as Номер, street as Улица, numberoffloors as Этажей, numberofentrances as Подъездов, numberofflat as Квартир from house"; dataGridViewHouse.DataSource = Ado.ExecuteReader(query); }