예제 #1
0
        private void bttnNew_Click(object sender, System.EventArgs e)
        {
            FORMSchoolYear_Modify.ADD_STATE = true;
            FORMSchoolYear_Modify sForm = new FORMSchoolYear_Modify();

            sForm.ShowDialog();
        }
예제 #2
0
 private void bttnEdit_Click(object sender, System.EventArgs e)
 {
     if (listView1.Items.Count > 0)
     {
         try
         {
             FORMSchoolYear_Modify.ADD_STATE   = false;
             FORMSchoolYear_Modify.iSchoolYear = Convert.ToInt32(listView1.Items[listView1.FocusedItem.Index].SubItems[1].Text);
             FORMSchoolYear_Modify sForm = new FORMSchoolYear_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);
     }
 }