Beispiel #1
0
        private void Button4_Click(object sender, EventArgs e)
        {
            this.Hide();
            // needs to be changed for final product
            EnrolleeInfo newform = new EnrolleeInfo(enrolleeID, 0);

            newform.ShowDialog();
        }
 private void button2_Click(object sender, EventArgs e)
 {
     if (accessedBy == 0)
     {
         this.Hide();
         EnrolleeHomePage newform = new EnrolleeHomePage(enrolleeID);
         newform.ShowDialog();
     }
     else
     {
         this.Hide();
         EnrolleeInfo newform = new EnrolleeInfo(enrolleeID, accessedBy);
         newform.ShowDialog();
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            string nameOfSelected = listBox1.SelectedItem.ToString();
            int    id             = 0;

            for (int i = 0; i < numOfEnrollees; i++)
            {
                if (nameOfSelected == enrollees[i, 2])
                {
                    id = int.Parse(enrollees[i, 0]);
                }
            }

            if (id != 0)
            {
                this.Hide();
                EnrolleeInfo newform = new EnrolleeInfo(id, 1);
                newform.ShowDialog();
            }
        }