private void btnThem_Click(object sender, RoutedEventArgs e) { UserControlLibrary.WindowThemMayIn win = new UserControlLibrary.WindowThemMayIn(mTransit); if (win.ShowDialog() == true) { lsArray.Add(win._Item); lvData.Items.Refresh(); } }
private void btnSua_Click(object sender, RoutedEventArgs e) { if (lvData.SelectedItems.Count > 0) { UserControlLibrary.WindowThemMayIn win = new UserControlLibrary.WindowThemMayIn(mTransit); win._Item = (Data.MAYIN)lvData.SelectedItems[0]; if (win.ShowDialog() == true) { lvData.Items.Refresh(); } } }