private void rbnBtnDelCat_Click(object sender, EventArgs e) { try { frmCatCtl CatCtl = new frmCatCtl(this.DBC, "D"); CatCtl.ShowDialog(); } catch (Exception ex) { MessageBox.Show( ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void rbnBtnAddCat_Click(object sender, EventArgs e) { try { frmCatCtl frmCat = new frmCatCtl(DBC, "A"); if (frmCat.ShowDialog() == DialogResult.OK) { MultiListItem mli = new PureComponents.EntrySet.Lists.MultiListItem( frmCat.insertedCategory.Name, frmCat.insertedCategory.ID); mli.CheckState = CheckState.Checked; mListCats.Items.Add(mli); } } catch (Exception ex) { MessageBox.Show( ex.Message, "Error Starting Category Insertion Process", MessageBoxButtons.OK, MessageBoxIcon.Error); } }