private void SetFieldsUpdateFormAdress() { var gettingAdress = _crudStudent.GetAdress(_currentRowAdressIndex); TypeAdressComboBox.Text = DictionaryForRefreshDataTables.GetAdressTypeEnumToString(gettingAdress.adressType); StreetTextBox.Text = gettingAdress.street; CityTextBox.Text = gettingAdress.city; PostIndexMaskedTextBox.Text = gettingAdress.postindex; }
private void RefreshDataTableAdress(Student student, DataTable dataTableAdress) { dataTableAdress.Rows.Clear(); foreach (var element in student.addressList) { dataTableAdress.Rows.Add(DictionaryForRefreshDataTables.GetAdressTypeEnumToString(element.adressType), element.city, element.postindex, element.street); } }
private void AddRowsDataTableAdress(List <Adress> adressList, DataTable dataTable) { dataTable.Rows.Clear(); foreach (var element in adressList) { dataTable.Rows.Add(DictionaryForRefreshDataTables.GetAdressTypeEnumToString(element.adressType), element.city, element.postindex, element.street); } }