Example #1
0
        //This shows the AddAParentMessageBox form and if the user clicks 'yes', the SelectAParentForm will appear, if they click 'No', the AddAParentForm will appear
        private void childToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            using (var form = new AddAParentMessageBox())
            {
                var result = form.ShowDialog();

                if (result == DialogResult.Yes)
                {
                    this.Hide();
                    new SelectAParentForm(db).Show();
                }

                else if (result == DialogResult.No)
                {
                    this.Hide();
                    new AddAParent(db).Show();
                }
            }
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //This shows the AddAParentMessageBox form and if the user clicks 'yes', the SelectAParentForm will appear, if they click 'No', the AddAParentForm will appear
            using (var form = new AddAParentMessageBox())
            {
                var result = form.ShowDialog();

                if (result == DialogResult.Yes)
                {
                    this.Hide();
                    new SelectAParentForm(db).Show();
                }

                else if (result == DialogResult.No)
                {
                    this.Hide();
                    new AddAParent(db).Show();
                }
            }
        }
Example #3
0
 //If the add a child picture is clicked
 private void pictureBox2_Click(object sender, EventArgs e)
 {
     using (var form = new AddAParentMessageBox())
     {
         var result = form.ShowDialog();
         //If the user clicks 'Yes'
         if (result == DialogResult.Yes)
         {
             //The SelectAParentForm appears
             this.Hide();
             new SelectAParentForm(db).Show();
         }
         //If the user clicks 'No'
         else if (result == DialogResult.No)
         {
             //The add a parent screen appears
             this.Hide();
             new AddAParent(db).Show();
         }
     }
 }