Exemplo n.º 1
0
        private void bttnNew_Click(object sender, System.EventArgs e)
        {
            FORMCourses_Modify.ADD_STATE = true;
            FORMCourses_Modify sForm = new FORMCourses_Modify();

            sForm.ShowDialog();
        }
Exemplo n.º 2
0
 private void bttnEdit_Click(object sender, System.EventArgs e)
 {
     if (listView1.Items.Count > 0)
     {
         try
         {
             FORMCourses_Modify.ADD_STATE = false;
             FORMCourses_Modify.sCourse   = listView1.Items[listView1.FocusedItem.Index].SubItems[0].Text;
             FORMCourses_Modify sForm = new FORMCourses_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);
     }
 }