/// <summary>
        /// validate user input; returns true if valid, otherwise returns false
        /// <param name="idDept"> idDept is selected by user and cannot be 0 </param>
        /// <param name="idDoctor"> idDoctor is selected by user and cannot be 0 </param>
        /// <param name="date"> date is povided by user and must be a date later than or the same as current date</param>
        /// <param name="time"> time is povided by user and must be between 00 and 24 </param>
        /// </summary>
        private bool ValidateUserInput(int idDept, int idDoctor, DateTime date, String time)
        {
            if (idDept == 0 || idDoctor == 0)
            {
                _errorMessage = "You have to select a department and a doctor";
                return(false);
            }
            if (date == _defaultDate)
            {
                _errorMessage = "Please select a valid date";
                return(false);
            }
            if (Utils.Validator.ValidateAppointmentHour(time) == false)
            {
                _errorMessage = "Please select a valid time.";
                return(false);
            }
            if (Utils.Validator.ValidateAppointmentDate(date) == false)
            {
                _errorMessage = "Please select a valid date. You cannot choose a date in the past";
                return(false);
            }
            int day = (int)date.DayOfWeek;

            if (_doctorService.CheckDoctorAvailability(idDoctor, day, Convert.ToInt32(time), date) == false)
            {
                _errorMessage = "Doctor is not available, please select another date or time";
                return(false);
            }

            return(true);
        }