예제 #1
0
        // GET: Admin/EliminarDirector/5
        public ActionResult EliminarDirector(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var director = Director_N.GetDirector(id.Value);

            return(View(director));
        }
예제 #2
0
 public ActionResult CrearDirector(Director director)
 {
     try
     {
         Director_N.AgregarDirector(director);
         return(RedirectToAction("VerDirector"));
     }
     catch
     {
         return(View());
     }
 }
예제 #3
0
        public ActionResult EditarDirector(Director licencia)
        {
            try
            {
                Director_N.EditarDirector(licencia);

                return(RedirectToAction("VerDirector"));
            }
            catch
            {
                return(View());
            }
        }
예제 #4
0
 public ActionResult EliminarDirector(int id)
 {
     try
     {
         Director_N.EliminarDirector(id);
         return(RedirectToAction("VerDirector"));
     }
     catch (Exception ex)
     {
         ModelState.AddModelError("", ex.Message);
         return(View());
     }
 }
예제 #5
0
        public ActionResult EditarDirector(int id)
        {
            var DirectorEditar = Director_N.GetDirector(id);

            return(View(DirectorEditar));
        }
예제 #6
0
        //Director
        public ActionResult VerDirector()
        {
            var director = Director_N.ListarDirector();

            return(View(director));
        }