public Get ( int entityTypeId, int entityId ) : IQueryable |
||
entityTypeId | int | A |
entityId | int | A |
Результат | IQueryable |
public IQueryable<Auth> Get( int entityTypeId, int? entityId )
{
return Queryable( "PersonAlias" )
.Where( t =>
t.EntityTypeId == entityTypeId &&
( t.EntityId == entityId || ( entityId == null && t.EntityId == null ) )
)
.OrderBy( t => t.Order );
}
/// <summary> /// Handles the Delete event of the rGrid control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RowEventArgs"/> instance containing the event data.</param> protected void rGrid_Delete(object sender, RowEventArgs e) { var rockContext = new RockContext(); var authService = new Rock.Model.AuthService(rockContext); Rock.Model.Auth auth = authService.Get(e.RowKeyId); if (auth != null) { authService.Delete(auth); rockContext.SaveChanges(); Authorization.ReloadAction(iSecured.TypeId, iSecured.Id, CurrentAction); } BindGrid(); }