Exemplo n.º 1
0
        //EVENTO ESTANDAR
        public string altaEvento(string email, string password, DateTime fecha, string turno, string descripcion, string cliente, int cantAsistentes, int duracion, List <Servicio> servicio, List <int> cantPersonasServicio)
        {
            string devolucion = "";
            //busco al usuario solicitado
            Administrador adm = verificarUsuario(email, password);

            if (adm is Organizador)
            {
                //si el usuario encontrado es diferente de nulo y es Organizador entonces lo casteo
                //una vez casteado verifico la fecha del evento esta disponible
                Organizador org = (Organizador)adm;
                if (org.verificarFecha(fecha) == null)
                {
                    org.altaEvento(fecha, turno, descripcion, cliente, cantAsistentes, duracion, servicio, cantPersonasServicio);
                    devolucion = org.ultimoEvento();
                }
                else
                {
                    devolucion = "\nYa hay un evento registrado para esa fecha\n";
                }
            }
            else
            {
                devolucion = "\nNo existe un organizador con ese mail y/o contraseña\n";
            }

            return(devolucion);
        }
Exemplo n.º 2
0
        //EVENTO PREMIUM
        public string altaEvento(string email, string password, DateTime fecha, string turno, string descripcion, string cliente, int cantAsistentes, List <Servicio> servicio, List <int> cantPersonasServicio)
        {
            string        devolucion = "";
            Administrador adm        = verificarUsuario(email, password);

            if (adm is Organizador && adm != null)
            {
                Organizador org = (Organizador)adm;
                if (org.verificarFecha(fecha) == null)
                {
                    org.altaEvento(fecha, turno, descripcion, cliente, cantAsistentes, servicio, cantPersonasServicio);
                    devolucion = org.ultimoEvento();
                }
                else
                {
                    devolucion = "\nYa hay un evento registrado para esa fecha\n";
                }
            }
            else
            {
                devolucion = "\nNo existe un organizador con ese mail y/o contraseña\n";
            }

            return(devolucion);
        }
Exemplo n.º 3
0
 public string listarEventos(Organizador org, string email)
 {
     return(org.listarEventos());
 }
Exemplo n.º 4
0
        // --------------------------   INSERCION DE DATOS   --------------------------

        public string agregarServicioAEvento(Organizador org, Evento ev, List <Servicio> servicio, List <int> cantAsistentes)
        {
            org.buscarEventoYAgregarServicio(ev, servicio, cantAsistentes);
            return("\nServicio/s agregado/s con exito\n");
        }
Exemplo n.º 5
0
 public int cantAsistentesEvento(Organizador org, Evento ev)
 {
     return(org.cantAsistentesEvento(ev));
 }
Exemplo n.º 6
0
        // --------------------------   BUSQUEDA DE DATOS Y EXTRACCION   --------------------------


        public Evento verificarFechaEvento(DateTime fecha, Organizador org)
        {
            return(org.verificarFecha(fecha.Date));
        }