private void crechepbx_Click(object sender, EventArgs e) { CrecheMenu main = new CrecheMenu(); this.Hide(); main.Show(); }
private void btnback_Click(object sender, EventArgs e) { CrecheMenu menu = new CrecheMenu(); this.Hide(); menu.Show(); }
private void shouldQuit(bool back) //check if this form was opened by form booking { FormCollection fc = Application.OpenForms; int count = 0; foreach (Form f in fc) { if (f.Visible) { count++; } } if (count > 1) // opened from booking form { this.Close(); } else { if (back) { CrecheMenu form = new CrecheMenu(); form.Show(); this.Hide(); } else { MiscFunctions.exit(); } } }
private void returntomenu() { CrecheMenu menu = new CrecheMenu(); menu.Show(); this.Hide(); }
//prompt the user in order to close the form private void leave() { DialogResult dialogResult = MessageBox.Show("Are you sure, Booking will be lost?", "Leave Booking", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { CrecheMenu form = new CrecheMenu(); form.Show(); this.Hide(); } }