Adjust comments.

This commit is contained in:
kougyokugentou 2021-01-24 22:49:52 -08:00
parent 68e6ba6a85
commit 93968ac789

View File

@ -66,7 +66,10 @@ namespace GreatHomeChildcare
MessageBox.Show("Reports button clicked.");
}
//TODO: new form to add a new child and their guardian(s)
/* Pop-open a new form for crud operations for children
* and their guardians. Be sure you set the child_id
* to -1 here just to be on the super-safe side.
*/
private void btnAdd_Click(object sender, EventArgs e)
{
child_id = -1; //ENSURE!!!!
@ -74,8 +77,10 @@ namespace GreatHomeChildcare
ShowChildCrudForm();
}
//TODO: new form(or same form as adding) for updating children
//PB&J: get currently selected row from dgv, then pass to GetChildByID() to get Child object.
/* Call the same crud form for adding a new child
* but store the child_id so the crud form
* can pick it up on form load.
*/
private void btnUpdate_Click(object sender, EventArgs e)
{
/* Get the child's database ID which is secretly hidden
@ -86,7 +91,13 @@ namespace GreatHomeChildcare
ShowChildCrudForm();
}
/* Seperate function to show the crud form
* because both the add and the update buttons
* will show the crud form.
* INPUT: void
* OUTPUT: void
*/
private void ShowChildCrudForm()
{
Form frmCrud = new frmChildCrud();
@ -102,6 +113,10 @@ namespace GreatHomeChildcare
Show();
}
/* Allow the admin to quit the program as a normal login
* will not be able to exit the attendence program
* from the main pin screen on the shared tablet.
*/
private void btnQuit_Click(object sender, EventArgs e)
{
MessageBox.Show("Thank you for using the program! Your data has been saved. Good bye!", "Great Home Childcare", MessageBoxButtons.OK, MessageBoxIcon.None);