Пример #1
0
 //
 // GET: /grid/
 public ActionResult Index()
 {
     GridDemo grid = new GridDemo();
     setproperties(grid.grid);
     ViewBag.grid = grid.grid;
     return View();
 }
Пример #2
0
        public JsonResult cargardatos()
        {
            GridDemo grid = new GridDemo();
            DataClasses1DataContext db = new DataClasses1DataContext();

            return grid.grid.DataBind(db.perfil);
        }
Пример #3
0
 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();
     }
 }