private void updateEmpSched_Click(object sender, EventArgs e) { this.Hide(); var schedule = new UpdateEmployeeSchedule(); schedule.Closed += (s, args) => this.Close(); schedule.Show(); // open main window }
public Schedule() { InitializeComponent(); var scheduler = new UpdateEmployeeSchedule(); if (scheduler.mon8to12 == true) { this.Mon8to12.Text = "Work__"; } if (scheduler.mon12to16 == true) { this.Mon12to16.Text = "Work__"; } if (scheduler.mon16to20 == true) { this.Mon16to20.Text = "Work__"; } if (scheduler.tue8to12 == true) { this.Tue8to12.Text = "Work__"; } if (scheduler.tue12to16 == true) { this.Tue12to16.Text = "Work__"; } if (scheduler.tue16to20 == true) { this.Tue16to20.Text = "Work__"; } if (scheduler.wed8to12 == true) { this.Wed8to12.Text = "Work__"; } if (scheduler.wed12to16 == true) { this.Wed12to16.Text = "Work__"; } if (scheduler.wed16to20 == true) { this.Wed16to20.Text = "Work__"; } if (scheduler.thu8to12 == true) { this.Thu8to12.Text = "Work__"; } if (scheduler.thu12to16 == true) { this.Thu12to16.Text = "Work__"; } if (scheduler.thu16to20 == true) { this.Thu16to20.Text = "Work__"; } if (scheduler.fri8to12 == true) { this.Fri8to12.Text = "Work__"; } if (scheduler.fri12to16 == true) { this.Fri12to16.Text = "Work__"; } if (scheduler.fri16to20 == true) { this.Fri16to20.Text = "Work__"; } }