From ce60c3bdf26468b0a95ca6761c9d2ff1f6886d57 Mon Sep 17 00:00:00 2001 From: kougyokugentou <41278462+kougyokugentou@users.noreply.github.com> Date: Wed, 27 Jan 2021 14:56:59 -0800 Subject: [PATCH] Implement first-time runcode to show the new guardian form if no guardians are found in the database. --- frmPinEntry.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frmPinEntry.cs b/frmPinEntry.cs index 1c3c8eb..6e5e626 100644 --- a/frmPinEntry.cs +++ b/frmPinEntry.cs @@ -140,10 +140,14 @@ namespace GreatHomeChildcare { dr = MessageBox.Show("Program not setup yet. Setup now?", "Great Home Childcare", MessageBoxButtons.YesNo, MessageBoxIcon.None); - //TODO: Open the form to add a new guardian. + // Open the form to add a new guardian. if (dr == DialogResult.Yes) - return; - + { + Form frm2 = new frmGuardianCrud(); + frm2.FormClosed += new FormClosedEventHandler(MainFormClosed); + frm2.Show(); + Hide(); + } else //Show a message and close the application. { MessageBox.Show("Come back when you are ready to setup the program!", "Great Home Childcare", MessageBoxButtons.OK, MessageBoxIcon.None);