private void lvCustomer_MouseDoubleClick(object sender, MouseEventArgs e) { if (lvCustomer.SelectedItems.Count == 1) { AppData.CustomerProfile cp = (AppData.CustomerProfile)lvCustomer.SelectedItems[0].Tag; using (FrmAddCustomer frmAddCust = new FrmAddCustomer(cp)) { if (frmAddCust.ShowDialog(this) == DialogResult.OK) { showCustomer(); } } } }
private void btnAddCustomer_Click(object sender, EventArgs e) { FrmAddCustomer frmAddCust = new FrmAddCustomer(); if (frmAddCust.ShowDialog() == DialogResult.OK) { showCustomer(); } }