private void _bAdd_Click(object sender, EventArgs e) { WorkingWithListRowItem itemRow = new WorkingWithListRowItem(); if (itemRow.ShowDialog() == DialogResult.OK) { Utils.ListRowItem item = (Utils.ListRowItem)itemRow.Item.Clone(); ListViewItem lvi = new ListViewItem(); lvi.Text = item.FirstName; lvi.SubItems.AddRange(new string[] { item.LastName, item.Product, item.Quantity.ToString() }); lvi.Tag = itemRow.Item; _lvDataItems.Items.Add(lvi); } }
private void _bAdd_Click(object sender, EventArgs e) { WorkingWithListRowItem itemRow = new WorkingWithListRowItem(); if (itemRow.ShowDialog() == DialogResult.OK) { Utils.ListRowItem item = (Utils.ListRowItem)itemRow.Item.Clone(); ListViewItem lvi = new ListViewItem(); lvi.Text = item.FirstName; lvi.SubItems.AddRange(new string[] {item.LastName,item.Product,item.Quantity.ToString()}); lvi.Tag = itemRow.Item; _lvDataItems.Items.Add(lvi); } }