示例#1
0
        /**
         * Validar que el empleado existen salas para ser reservadas segun algunos filtros.
         *
         */
        public void validarDatos(DateTime ingresoSala, DateTime egresoSala, int tipoSalaID, int cantidadPersonas)
        {
            if (cantidadPersonas <= 0)
            {
                throw new ArgumentOutOfRangeException("La cantidad de personas para la reserva debe ser un número mayor a cero.");
            }
            if (tipoSalaID == 0 || SalaRepository.getTipoByID(tipoSalaID) == null)
            {
                throw new ArgumentException("Debe buscar un tipo de sala existente.");
            }

            validarIngresoEgreso(ingresoSala, egresoSala);
        }