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)); }
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, })); }
public JsonResult Eliminar(int id) { BadLanguageBL oBadLanguageBL = new BadLanguageBL(); oBadLanguageBL.Eliminar(id); return(Json(new { // this is what datatables wants sending back status = "1", })); }
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")); }
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 })); }