void rGrid_GridReorder(object sender, GridReorderEventArgs e) { int entityTypeId = iSecured.TypeId; List <Rock.Model.Auth> rules = authService.GetAuths(iSecured.TypeId, iSecured.Id, CurrentAction).ToList(); authService.Reorder(rules, e.OldIndex, e.NewIndex, CurrentPersonId); Authorization.ReloadAction(iSecured.TypeId, iSecured.Id, CurrentAction); BindGrid(); }
void rGrid_GridReorder(object sender, GridReorderEventArgs e) { int entityTypeId = iSecured.TypeId; var rockContext = new RockContext(); var authService = new Rock.Model.AuthService(rockContext); List <Rock.Model.Auth> rules = authService.GetAuths(iSecured.TypeId, iSecured.Id, CurrentAction).ToList(); authService.Reorder(rules, e.OldIndex, e.NewIndex); rockContext.SaveChanges(); Authorization.ReloadAction(iSecured.TypeId, iSecured.Id, CurrentAction); BindGrid(); }
/// <summary> /// Handles the GridReorder event of the rGrid control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="GridReorderEventArgs"/> instance containing the event data.</param> protected void rGrid_GridReorder( object sender, GridReorderEventArgs e ) { int entityTypeId = iSecured.TypeId; var rockContext = new RockContext(); var authService = new Rock.Model.AuthService( rockContext ); List<Rock.Model.Auth> rules = authService.GetAuths( iSecured.TypeId, iSecured.Id, CurrentAction ).ToList(); authService.Reorder( rules, e.OldIndex, e.NewIndex ); rockContext.SaveChanges(); Authorization.ReloadAction( iSecured.TypeId, iSecured.Id, CurrentAction ); BindGrid(); }