Exemplo n.º 1
0
        public string[] Agregar(int Id, string Nombre, string Descripcion, string etapa_vida,
                                string sexo, string especie, DateTime fecha_nac, string raza, int disponible, DateTime fecha_registro)
        {
            // Codigo a implementar
            MascotaE mascotaE = new MascotaE();

            mascotaE.id             = Id;
            mascotaE.nombre         = Nombre;
            mascotaE.descripcion    = Descripcion;
            mascotaE.etapa_vida     = etapa_vida;
            mascotaE.sexo           = sexo;
            mascotaE.especie        = especie;
            mascotaE.fecha_nac      = fecha_nac;
            mascotaE.raza           = raza;
            mascotaE.disponible     = disponible;
            mascotaE.fecha_registro = fecha_registro;
            Mascota mascota  = new Mascota();
            bool    codError = mascota.Agregar(mascotaE);
            string  mensaje  = mascota.Mensaje;

            string[] respuesta = { codError.ToString(), mensaje };
            return(respuesta);
        }