Ejemplo n.º 1
0
        public ActionResult Create(Paciente paciente)
        {
            try
            {
                var p = new PacienteApiProcess();
                p.Add(paciente);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Ejemplo n.º 2
0
        public ActionResult AgregarMascota(Paciente collection)
        {
            try
            {
                //HttpPostedFileBase FileBase = Request.Files[0];
                //WebImage image = new WebImage(FileBase.InputStream);

                //collection.ImagePet = image.GetBytes();

                var pp = new PacienteApiProcess();

                pp.Add(collection);
                return(RedirectToAction("Index"));
            }

            catch (DataException ex)
            {
                return(View());
            }
        }