private void btnAdd_Click(object sender, EventArgs e) { fDesignation frm = new fDesignation(); frm.ItemChanged = RefreshList; frm.ShowDlg(new Designaiton(), true); }
private void btnEdit_Click(object sender, EventArgs e) { if (lsvDesignation.SelectedItems.Count <= 0) { MessageBox.Show("select an item to edit", "Item not yet selected", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } Designaiton oDesignation = null; fDesignation frm = new fDesignation(); if (lsvDesignation.SelectedItems != null && lsvDesignation.SelectedItems.Count > 0) { oDesignation = (Designaiton)lsvDesignation.SelectedItems[0].Tag; } frm.ItemChanged = RefreshList; frm.ShowDlg(oDesignation, false); }