private void btnClearAppt_Click(object sender, EventArgs e) { //Clear all fields txtCustomerName.Clear(); cmbEmployeeID.ResetText(); cmbServiceID.ResetText(); DateAppBox.ResetText(); cmbTime.ResetText(); }
private void dateTimePicker1_ValueChanged(object sender, EventArgs e) { System.DayOfWeek i = DateAppBox.Value.DayOfWeek; if (i == System.DayOfWeek.Sunday) { MessageBox.Show("Opening Hours: Mon - Sat, 09:00 - 18:00", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); DateAppBox.ResetText(); return; } else { return; } }