public ActionResult Editar(string id) { EducationLevelBL oBL = new EducationLevelBL(); int pIntID = 0; int.TryParse(id, out pIntID); EducationLevelViewModel pEducationLevelViewModel = oBL.Obtener(pIntID); return(View(pEducationLevelViewModel)); }
public JsonResult Verificar(int id_education_level, string name) { EducationLevelBL oBL = new EducationLevelBL(); var resultado = oBL.VerificarDuplicado(id_education_level, name); return(Json(new { // this is what datatables wants sending back valido = resultado, })); }
public JsonResult Eliminar(int id) { EducationLevelBL oEducationLevelBL = new EducationLevelBL(); oEducationLevelBL.Eliminar(id); return(Json(new { // this is what datatables wants sending back status = "1", })); }
public ActionResult Editar([Bind(Include = "education_level_id,name")] EducationLevelViewModel pEducationLevelViewModel) { // TODO: Add insert logic here if (pEducationLevelViewModel == null) { return(HttpNotFound()); } EducationLevelBL oEducationLevelBL = new EducationLevelBL(); pEducationLevelViewModel.user_id_modified = AuthorizeUserAttribute.UsuarioLogeado().user_id; oEducationLevelBL.Modificar(pEducationLevelViewModel); return(RedirectToAction("Index")); }
public JsonResult ObtenerLista(DataTableAjaxPostModel ofilters)//DataTableAjaxPostModel model { EducationLevelBL oEducationLevelBL = new EducationLevelBL(); //EducationLevelFiltersViewModel ofilters = new EducationLevelFiltersViewModel(); GridModel <EducationLevelViewModel> grid = oEducationLevelBL.ObtenerLista(ofilters); return(Json(new { // this is what datatables wants sending back draw = ofilters.draw, recordsTotal = grid.total, recordsFiltered = grid.recordsFiltered, data = grid.rows })); }
public ActionResult Crear([Bind(Include = "education_level_id,name")] EducationLevelViewModel pEducationLevelViewModel) { // TODO: Add insert logic here if (pEducationLevelViewModel == null) { return(HttpNotFound()); } pEducationLevelViewModel.education_level_id = 0; pEducationLevelViewModel.user_id_created = AuthorizeUserAttribute.UsuarioLogeado().user_id; EducationLevelBL oBL = new EducationLevelBL(); oBL.Agregar(pEducationLevelViewModel); return(RedirectToAction("Index")); }