private void bttnNew_Click(object sender, System.EventArgs e) { FORMLevel_Modify.ADD_STATE = true; FORMLevel_Modify sForm = new FORMLevel_Modify(); sForm.ShowDialog(); }
private void bttnEdit_Click(object sender, System.EventArgs e) { if (listView1.Items.Count > 0) { try { FORMLevel_Modify.ADD_STATE = false; FORMLevel_Modify.sLevel = listView1.Items[listView1.FocusedItem.Index].SubItems[0].Text; FORMLevel_Modify sForm = new FORMLevel_Modify(); sForm.ShowDialog(); } catch (ArgumentOutOfRangeException aooreE) { MessageBox.Show("" + aooreE.Message); } catch (NullReferenceException nreE) {} } else { MessageBox.Show("No record to edit.", "Unable to Edit", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }