private void btnThem_Click(object sender, RoutedEventArgs e) { UserControlLibrary.WindowThemLoaiGia win = new UserControlLibrary.WindowThemLoaiGia(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.WindowThemLoaiGia win = new UserControlLibrary.WindowThemLoaiGia(mTransit); win._Item = (Data.MENULOAIGIA)lvData.SelectedItems[0]; if (win.ShowDialog() == true) { lvData.Items.Refresh(); } } }