/// <summary> /// Sterge tipul selectat /// </summary> private void StergeTip() { if (listView1.SelectedItems.Count != 1) return; listView1.Items.Remove(listView1.SelectedItems[0]); tempList.Add(new ContinutUpdate<Tip>(_selectedTip, ContinutUpdateType.DELETE)); _selectedTip = null; }
/// <summary> /// Reseteaza campurile pentru a adauga un nou tip /// </summary> private void TipNou() { _selectedTip = null; txtNume.Text = ""; }
private void listView1_SelectedIndexChanged(object sender, System.EventArgs e) { if (listView1.SelectedItems.Count != 1) return; _selectedTip = ((CustomListViewItem<Tip>)listView1.SelectedItems[0]).CustomStruct; SetTipInformation(); }