예제 #1
0
        public ActionResult Editar(string id)
        {
            BadLanguageBL oBL    = new BadLanguageBL();
            int           pIntID = 0;

            int.TryParse(id, out pIntID);
            BadLanguageViewModel pBadLanguageViewModel = oBL.Obtener(pIntID);

            return(View(pBadLanguageViewModel));
        }
예제 #2
0
        public JsonResult Verificar(int id_bad_language, string name)
        {
            BadLanguageBL oBL       = new BadLanguageBL();
            var           resultado = oBL.VerificarDuplicado(id_bad_language, name);

            return(Json(new
            {
                // this is what datatables wants sending back
                valido = resultado,
            }));
        }
예제 #3
0
        public JsonResult Eliminar(int id)
        {
            BadLanguageBL oBadLanguageBL = new BadLanguageBL();

            oBadLanguageBL.Eliminar(id);

            return(Json(new
            {
                // this is what datatables wants sending back
                status = "1",
            }));
        }
예제 #4
0
        public ActionResult Editar([Bind(Include = "bad_language_id,name")] BadLanguageViewModel pBadLanguageViewModel)
        {
            // TODO: Add insert logic here

            if (pBadLanguageViewModel == null)
            {
                return(HttpNotFound());
            }
            BadLanguageBL oBadLanguageBL = new BadLanguageBL();

            pBadLanguageViewModel.user_id_modified = AuthorizeUserAttribute.UsuarioLogeado().user_id;
            oBadLanguageBL.Modificar(pBadLanguageViewModel);
            return(RedirectToAction("Index"));
        }
예제 #5
0
        public JsonResult ObtenerLista(DataTableAjaxPostModel ofilters)//DataTableAjaxPostModel model
        {
            BadLanguageBL oBadLanguageBL = new BadLanguageBL();
            //BadLanguageFiltersViewModel ofilters = new BadLanguageFiltersViewModel();
            GridModel <BadLanguageViewModel> grid = oBadLanguageBL.ObtenerLista(ofilters);

            return(Json(new
            {
                // this is what datatables wants sending back
                draw = ofilters.draw,
                recordsTotal = grid.total,
                recordsFiltered = grid.recordsFiltered,
                data = grid.rows
            }));
        }