예제 #1
0
 /** Method changes date to previous month */
 private void previousMonthButton_Click(object sender, EventArgs e)
 {
     if (this.date.AddMonths(-1).Month >= DateTime.Today.Month)
     {
         this.date = this.date.AddMonths(-1);
         reloadDayBoxes();
     }
     else
     {
         FeedbackWindow message = new FeedbackWindow();
         message.setMessageForBookingNotAvailableForDateDueToDateInThePast();
         message.Show();
     }
 }
예제 #2
0
        private void dayOfaWeekBox_Click(object sender, EventArgs e)
        {
            if (this.morningAppointments + this.afternoonAppointments == 0)
            {
                FeedbackWindow message = new FeedbackWindow();
                message.setMessageForNoAppointmentsPerDay();
                message.Show();
                return;
            }
            if (this.date.Date < DateTime.Today.Date)
            {
                FeedbackWindow message = new FeedbackWindow();
                message.setMessageForBookingNotAvailableForDateDueToDateInThePast();
                message.Show();
                return;
            }

            this.singleDay.ShowDialog();
        }