private void editBT_Click(object sender, EventArgs e) { WorksISS tmp = new WorksISS(); foreach (ListViewItem item in listView1.SelectedItems) { tmp.Hrv = item.SubItems[1].Text; tmp.Eng = item.SubItems[2].Text; tmp.Id = item.SubItems[3].Text; } WorkListAdder wla = new WorkListAdder(); wla.SendValues(tmp, this, false, maxValue); wla.ShowDialog(); if (okBtn) { worksLst.RemoveAll(o => o.Id == tmp.Id); worksLst.Add(wss); RefillList(); } }
private void addBT_Click(object sender, EventArgs e) { WorkListAdder wla = new WorkListAdder(); String mID = wss.Id; wss = new WorksISS(); wss.Id = mID; wla.SendValues(wss, this, true, maxValue); wla.ShowDialog(); if (okBtn) { RefillList(); } }