private void button1_Click(object sender, EventArgs e) { // добавление нового заказа FormEditOrder F = new FormEditOrder(-1, Base, masTypeOrder); if (F.ShowDialog(this) == DialogResult.OK) { listView1.VirtualListSize = Base.classOrder.dataView.Count; listView1.Refresh(); } F.Dispose(); }
private void button3_Click(object sender, EventArgs e) { // Изменение заказа if (listView1.SelectedIndices.Count > 0) { int n = listView1.SelectedIndices[0]; FormEditOrder F = new FormEditOrder(n, Base, masTypeOrder); if (F.ShowDialog(this) == DialogResult.OK) { listView1.VirtualListSize = Base.classOrder.dataView.Count; listView1.Refresh(); } F.Dispose(); } }