Esempio n. 1
0
        /// <summary>
        /// Sets the value on select.
        /// </summary>
        protected override void SetValueOnSelect()
        {
            int?connectionRequestId = ItemId.AsIntegerOrNull();

            if (connectionRequestId.HasValue)
            {
                var connectionRequest = new ConnectionRequestService(new RockContext()).Get(connectionRequestId.Value);
                SetValue(connectionRequest);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Sets the value on select.
        /// </summary>
        protected override void SetValueOnSelect()
        {
            int?entityTypeId = ItemId.AsIntegerOrNull();

            if (entityTypeId.HasValue)
            {
                var entityType = EntityTypeCache.Get(entityTypeId.Value);
                SetValue(entityType);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Sets the value on select.
        /// </summary>
        protected override void SetValueOnSelect()
        {
            var accountId            = ItemId.AsIntegerOrNull();
            FinancialAccount account = null;

            if (accountId.HasValue && accountId > 0)
            {
                account = new FinancialAccountService(new RockContext()).Get(accountId.Value);
            }

            SetValue(account);
        }
Esempio n. 4
0
        /// <summary>
        /// Sets the value on select.
        /// </summary>
        protected override void SetValueOnSelect()
        {
            var      dataViewId = ItemId.AsIntegerOrNull();
            DataView dataView   = null;

            if (dataViewId.HasValue && dataViewId > 0)
            {
                dataView = new DataViewService(new RockContext()).Get(ItemId.AsInteger());
            }

            SetValue(dataView);
        }
Esempio n. 5
0
        /// <summary>
        /// Sets the values on select.
        /// </summary>
        protected override void SetValuesOnSelect()
        {
            var connectionRequestIds = new List <int>();

            foreach (var itemId in ItemIds)
            {
                int?connectionRequestId = ItemId.AsIntegerOrNull();
                if (connectionRequestId.HasValue)
                {
                    connectionRequestIds.Add(connectionRequestId.Value);
                }
            }

            var connectionRequests = new ConnectionRequestService(new RockContext()).Queryable().Where(g => connectionRequestIds.Contains(g.Id));

            this.SetValues(connectionRequests);
        }
Esempio n. 6
0
 /// <summary>
 /// Sets the value on select.
 /// </summary>
 protected override void SetValueOnSelect()
 {
     this.SetValueFromLocationId(ItemId.AsIntegerOrNull());
 }