Пример #1
0
        private void bttnAddNew_Click(object sender, System.EventArgs e)
        {
            FORMBooks_Modify.ADD_STATE = true;
            FORMBooks_Modify sForm = new FORMBooks_Modify();

            sForm.ShowDialog();
        }
Пример #2
0
 private void bttnModify_Click(object sender, System.EventArgs e)
 {
     if (lvBooks.Items.Count > 0)
     {
         try
         {
             FORMBooks_Modify.ADD_STATE = false;
             FORMBooks_Modify.sBookID   = lvBooks.Items[lvBooks.FocusedItem.Index].SubItems[0].Text;
             FORMBooks_Modify sForm = new FORMBooks_Modify();
             sForm.ShowDialog();
         }
         catch (ArgumentOutOfRangeException aooreE) { MessageBox.Show("" + aooreE.Message); }
         catch (NullReferenceException nreE) {}
     }
     else
     {
         MessageBox.Show("No record to edit.", clsVariables.sMSGBOX, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }