private void btnSua_Click(object sender, RoutedEventArgs e) { if (Danhsachloai.SelectedItem != null) { ThemSuaLoaiDonVi ts = new ThemSuaLoaiDonVi(Danhsachloai.SelectedItem as Loaidonvi); (this.Parent as StackPanel).Children.Add(ts); } }
private void btnThem_Click(object sender, RoutedEventArgs e) { ThemSuaLoaiDonVi ts = new ThemSuaLoaiDonVi(); (this.Parent as StackPanel).Children.Add(ts); }