当前位置: 首页>>代码示例>>C#>>正文


C# Controls.GridReorderEventArgs类代码示例

本文整理汇总了C#中Rock.Web.UI.Controls.GridReorderEventArgs的典型用法代码示例。如果您正苦于以下问题:C# GridReorderEventArgs类的具体用法?C# GridReorderEventArgs怎么用?C# GridReorderEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GridReorderEventArgs类属于Rock.Web.UI.Controls命名空间,在下文中一共展示了GridReorderEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: gAttributes_Reorder

 /// <summary>
 /// Handles the Reorder event of the gAttributes 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 gAttributes_Reorder( object sender, GridReorderEventArgs e )
 {
     if ( ReorderAttributeClick != null )
     {
         var eventArg = new WorkflowActivityTypeAttributeEventArg( ActivityTypeGuid, e.OldIndex, e.NewIndex );
         ReorderAttributeClick( this, eventArg );
     }
 }
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:13,代码来源:WorkflowActivityTypeEditor.cs

示例2: gAttributes_GridReorder

 /// <summary>
 /// Handles the GridReorder event of the gAttributes 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 gAttributes_GridReorder( object sender, GridReorderEventArgs e )
 {
     ReorderAttributeList( AttributesState, e.OldIndex, e.NewIndex );
     BindAttributesGrid();
 }
开发者ID:CentralAZ,项目名称:Rockit-CentralAZ,代码行数:10,代码来源:WorkflowTypeDetail.ascx.cs

示例3: gItemAttributes_GridReorder

        /// <summary>
        /// Handles the GridReorder event of the gItemAttributes 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 gItemAttributes_GridReorder( object sender, GridReorderEventArgs e )
        {
            var movedItem = ItemAttributesState.Where( a => a.Order == e.OldIndex ).FirstOrDefault();
            if ( movedItem != null )
            {
                if ( e.NewIndex < e.OldIndex )
                {
                    // Moved up
                    foreach ( var otherItem in ItemAttributesState.Where( a => a.Order < e.OldIndex && a.Order >= e.NewIndex ) )
                    {
                        otherItem.Order = otherItem.Order + 1;
                    }
                }
                else
                {
                    // Moved Down
                    foreach ( var otherItem in ItemAttributesState.Where( a => a.Order > e.OldIndex && a.Order <= e.NewIndex ) )
                    {
                        otherItem.Order = otherItem.Order - 1;
                    }
                }

                movedItem.Order = e.NewIndex;
            }

            BindItemAttributesGrid();
        }
开发者ID:SparkDevNetwork,项目名称:Rock,代码行数:32,代码来源:ContentChannelDetail.ascx.cs

示例4: rGrid_GridReorder

        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();
        }
开发者ID:jh2mhs8,项目名称:Rock-ChMS,代码行数:11,代码来源:Security.ascx.cs

示例5: gFields_GridReorder

        /// <summary>
        /// Handles the GridReorder event of the gFields 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 gFields_GridReorder( object sender, GridReorderEventArgs e )
        {
            ParseControls();

            if ( FormFieldsState.Any() )
            {
                var keyValue = FormFieldsState.First();
                SortFields( keyValue.Value, e.OldIndex, e.NewIndex );
                ReOrderFields( keyValue.Value );
            }

            BuildControls();
        }
开发者ID:SparkDevNetwork,项目名称:Rock,代码行数:18,代码来源:RegistrationTemplateDetail.ascx.cs

示例6: rGridBatch_GridReorder

        /// <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();
        }
开发者ID:pkdevbox,项目名称:Rock,代码行数:14,代码来源:BatchList.ascx.cs

示例7: gGroupTypeRoles_GridReorder

 /// <summary>
 /// Handles the GridReorder event of the gGroupTypeRoles 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 gGroupTypeRoles_GridReorder( object sender, GridReorderEventArgs e )
 {
     ReorderGroupTypeRoleList( GroupTypeRolesState, e.OldIndex, e.NewIndex );
     BindGroupTypeRolesGrid();
 }
开发者ID:Higherbound,项目名称:Higherbound-2016-website-upgrades,代码行数:10,代码来源:GroupTypeDetail.ascx.cs

示例8: GridReorderEventArgs

        /// <summary>
        /// Raises the appropriate events for the <see cref="T:System.Web.UI.WebControls.GridView"/> control when it posts back to the server.
        /// </summary>
        /// <param name="eventArgument">The event argument from which to create a <see cref="T:System.Web.UI.WebControls.CommandEventArgs"/> for the event or events that are raised.</param>
        void IPostBackEventHandler.RaisePostBackEvent( string eventArgument )
        {
            if ( eventArgument.StartsWith( "re-order:" ) )
            {
                string[] parms = eventArgument.Substring( 9 ).Split( ';' );

                string dataKey = parms[0];

                int oldIndex = 0;
                if ( !int.TryParse( parms[1], out oldIndex ) )
                {
                    oldIndex = 0;
                }

                int newIndex = 0;
                if ( !int.TryParse( parms[2], out newIndex ) )
                {
                    newIndex = 0;
                }

                int pageFactor = this.PageIndex * this.PageSize;
                oldIndex += pageFactor;
                newIndex += pageFactor;

                GridReorderEventArgs args = new GridReorderEventArgs( dataKey, oldIndex, newIndex );
                OnGridReorder( args );
            }
            else
            {
                base.RaisePostBackEvent( eventArgument );
            }
        }
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:36,代码来源:Grid.cs

示例9: rGridAccount_GridReorder

        /// <summary>
        /// Handles the GridReorder event of the rGridAccounts 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 rGridAccount_GridReorder( object sender, GridReorderEventArgs e )
        {
            var rockContext = new RockContext();
            var accounts = GetAccounts( rockContext );
            if ( accounts != null )
            {
                new FinancialAccountService( rockContext ).Reorder( accounts.ToList(), e.OldIndex, e.NewIndex );
                rockContext.SaveChanges();
            }

            BindGrid();
        }
开发者ID:NewPointe,项目名称:Rockit,代码行数:17,代码来源:AccountList.ascx.cs

示例10: rGrid_GridReorder

        /// <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();
        }
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:19,代码来源:Security.ascx.cs

示例11: OnGridReorder

 /// <summary>
 /// Raises the <see cref="E:GridReorder"/> event.
 /// </summary>
 /// <param name="e">The <see cref="GridReorderEventArgs"/> instance containing the event data.</param>
 protected virtual void OnGridReorder( GridReorderEventArgs e )
 {
     if ( GridReorder != null )
     {
         GridReorder( this, e );
     }
 }
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:11,代码来源:Grid.cs

示例12: gMetricPartitions_GridReorder

 /// <summary>
 /// Handles the GridReorder event of the gMetricPartitions 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 gMetricPartitions_GridReorder( object sender, GridReorderEventArgs e )
 {
     ReorderMetricPartitionsList( MetricPartitionsState, e.OldIndex, e.NewIndex );
     BindMetricPartitionsGrid();
 }
开发者ID:NewSpring,项目名称:Rock,代码行数:10,代码来源:MetricDetail.ascx.cs

示例13: gPageBlocks_GridReorder

        /// <summary>
        /// Handles the GridReorder event of the gPageBlocks 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 gPageBlocks_GridReorder( object sender, GridReorderEventArgs e )
        {
            int pageId = PageParameter( "EditPage" ).AsInteger();
            Rock.Web.Cache.PageCache page = Rock.Web.Cache.PageCache.Read( pageId );
            string zoneName = this.PageParameter( "ZoneName" );

            var rockContext = new RockContext();
            BlockService blockService = new BlockService( rockContext );
            var blocks = blockService.GetByPageAndZone( page.Id, zoneName ).ToList();
            blockService.Reorder( blocks, e.OldIndex, e.NewIndex );
            rockContext.SaveChanges();
            page.FlushBlocks();

            BindGrids();
        }
开发者ID:Ganon11,项目名称:Rock,代码行数:20,代码来源:ZoneBlocks.ascx.cs

示例14: gGroupType_GridReorder

        /// <summary>
        /// Handles the GridReorder event of the gGroupType 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 gGroupType_GridReorder( object sender, GridReorderEventArgs e )
        {
            var rockContext = new RockContext();

            var groupTypes = GetGroupTypes( rockContext );
            if ( groupTypes != null )
            {
                new GroupTypeService( rockContext ).Reorder( groupTypes.ToList(), e.OldIndex, e.NewIndex );
                rockContext.SaveChanges();
            }

            BindGrid();
        }
开发者ID:NewPointe,项目名称:Rockit,代码行数:18,代码来源:GroupTypeList.ascx.cs

示例15: rGridSuggestion_GridReorder

        /// <summary>
        /// Handles the GridReorder event of the rGridSuggestion control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="GridReorderEventArgs"/> instance containing the event data.</param>
        void rGridSuggestion_GridReorder( object sender, GridReorderEventArgs e )
        {
            var rockContext = new RockContext();
            var service = new FollowingSuggestionTypeService( rockContext );
            var followingSuggestions = service.Queryable().OrderBy( i => i.Order ).ToList();
            service.Reorder( followingSuggestions, e.OldIndex, e.NewIndex );
            rockContext.SaveChanges();

            BindGrid();
        }
开发者ID:RMRDevelopment,项目名称:Rockit,代码行数:15,代码来源:SuggestionList.ascx.cs


注:本文中的Rock.Web.UI.Controls.GridReorderEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。