public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var p = new CitaApiProcess(); Cita cita = p.ReadBy(id.Value); if (cita == null) { return(HttpNotFound()); } return(View(cita)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var p = new CitaApiProcess(); Cita cita = p.ReadBy(id.Value); SelectList list = new SelectList(cita.TipoEstado); ViewData["ListaEstados"] = list; if (cita == null) { return(HttpNotFound()); } return(View(cita)); }