private void btnEdit_Click(object sender, EventArgs e) { if (lstRepairJobs.SelectedItems.Count > 0) { ListViewItem selectedItem = lstRepairJobs.SelectedItems[0]; clsRepair repair = (clsRepair)selectedItem.Tag; frmAddRepairJob showForm = new frmAddRepairJob(this, repair); showForm.Show(); } }
private void btnAdd_Click(object sender, EventArgs e) { frmAddRepairJob showForm = new frmAddRepairJob(this, null); showForm.Show(); }