// // GET: /grid/ public ActionResult Index() { GridDemo grid = new GridDemo(); setproperties(grid.grid); ViewBag.grid = grid.grid; return View(); }
public JsonResult cargardatos() { GridDemo grid = new GridDemo(); DataClasses1DataContext db = new DataClasses1DataContext(); return grid.grid.DataBind(db.perfil); }
public void editardatos(perfil per) { GridDemo grid = new GridDemo(); if(grid.grid.AjaxCallBackMode == AjaxCallBackMode.EditRow){ DataClasses1DataContext db = new DataClasses1DataContext(); perfil update = db.perfil.Where(a => a.idPerfil == per.idPerfil).First<perfil>(); update.idPerfil = per.idPerfil; update.infraccion = per.infraccion; update.karma = per.karma; update.beneado = per.beneado; db.SubmitChanges(); } }