Пример #1
0
        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));
        }
Пример #2
0
        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));
        }