private void editStructureUnit_Click(object sender, RoutedEventArgs e) { MilitaryUnitList mList = new MilitaryUnitList(DataWorker.getMilitaryUnitList(sqlWorker.selectData("SELECT * FROM MilitaryUnit"))); EditStructure wE = new EditStructure(sqlWorker, mList); wE.ShowDialog(); }
private void btnEditStructure_Click(object sender, RoutedEventArgs e) { MilitaryUnitList mList = new MilitaryUnitList(DataWorker.getMilitaryUnitList(sqlWorker.selectData("SELECT * FROM MilitaryUnit"))); EditStructure wE = new EditStructure(sqlWorker, mList); wE.ShowDialog(); militaryList = new MilitaryUnitList(DataWorker.getMilitaryUnitList(sqlWorker.selectData("SELECT * FROM MilitaryUnit"))); cbMilitaryUnit.Items.Refresh(); cbSubUnit.Items.Refresh(); battalionList = new SubUnitList(DataWorker.getSubUnitList(sqlWorker.selectData("SELECT * FROM SubUnit WHERE idMilitaryUnit = " + (cbMilitaryUnit.SelectedItem as MilitaryUnit).Id))); cbBattalion.ItemsSource = battalionList.values; }