/// <summary> /// Handles the GridReorder event of the grdFinancialBatch control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="GridReorderEventArgs"/> instance containing the event data.</param> private void rGridBatch_GridReorder(object sender, GridReorderEventArgs e) { var batchService = new Rock.Model.FinancialBatchService(); var queryable = batchService.Queryable(); List <Rock.Model.FinancialBatch> items = queryable.ToList(); batchService.Reorder(items, e.OldIndex, e.NewIndex, CurrentPersonId); BindGrid(); }
/// <summary> /// Handles the GridReorder event of the gBatchList control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="GridReorderEventArgs"/> instance containing the event data.</param> private void gBatchList_GridReorder(object sender, GridReorderEventArgs e) { var rockContext = new RockContext(); var batchService = new Rock.Model.FinancialBatchService(rockContext); var queryable = batchService.Queryable(); List <Rock.Model.FinancialBatch> items = queryable.ToList(); batchService.Reorder(items, e.OldIndex, e.NewIndex); rockContext.SaveChanges(); BindGrid(); }
/// <summary> /// Handles the GridReorder event of the grdFinancialBatch control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="GridReorderEventArgs"/> instance containing the event data.</param> private void rGridBatch_GridReorder( object sender, GridReorderEventArgs e ) { var batchService = new Rock.Model.FinancialBatchService(); var queryable = batchService.Queryable(); List<Rock.Model.FinancialBatch> items = queryable.ToList(); batchService.Reorder( items, e.OldIndex, e.NewIndex, CurrentPersonId ); BindGrid(); }
/// <summary> /// Handles the GridReorder event of the gBatchList control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="GridReorderEventArgs"/> instance containing the event data.</param> private void gBatchList_GridReorder( object sender, GridReorderEventArgs e ) { var rockContext = new RockContext(); var batchService = new Rock.Model.FinancialBatchService( rockContext ); var queryable = batchService.Queryable(); List<Rock.Model.FinancialBatch> items = queryable.ToList(); batchService.Reorder( items, e.OldIndex, e.NewIndex ); rockContext.SaveChanges(); BindGrid(); }