Example #1
0
        // GET: Administradores/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Administrador administrador = AdministradoresDAO.Search(id.GetValueOrDefault());

            if (administrador == null)
            {
                return(HttpNotFound());
            }
            return(View(administrador));
        }
Example #2
0
        // GET: Administradores/Delete/5
        public ActionResult Delete(int?id)
        {
            if (!AdministradoresDAO.EstaLogado())
            {
                return(new HttpStatusCodeResult(HttpStatusCode.Unauthorized));
            }
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Administrador administrador = AdministradoresDAO.Search(id.GetValueOrDefault());

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