public ActionResult DeleteConfirmed(int id)
        {
            var p = new MedicoApiProcess();

            Medico medico = p.ReadBy(id);

            p.Delete(medico);
            return(RedirectToAction("Index"));
        }
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var    p      = new MedicoApiProcess();
            Medico medico = p.ReadBy(id.Value);

            if (medico == null)
            {
                return(HttpNotFound());
            }
            return(View(medico));
        }
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var    p      = new MedicoApiProcess();
            Medico medico = p.ReadBy(id.Value);

            SelectList list = new SelectList(medico.TiposMatriculas);

            ViewData["ListaMatriculas"] = list;

            if (medico == null)
            {
                return(HttpNotFound());
            }
            return(View(medico));
        }