Пример #1
0
 /// <summary> setups the sync logic for member _eventSchedulingSlot</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncEventSchedulingSlot(IEntity2 relatedEntity)
 {
     if (_eventSchedulingSlot != relatedEntity)
     {
         DesetupSyncEventSchedulingSlot(true, true);
         _eventSchedulingSlot = (EventSchedulingSlotEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity(_eventSchedulingSlot, new PropertyChangedEventHandler(OnEventSchedulingSlotPropertyChanged), "EventSchedulingSlot", EventSlotAppointmentEntity.Relations.EventSchedulingSlotEntityUsingSlotId, true, new string[] {  });
     }
 }
Пример #2
0
        /// <summary> Initializes the class members</summary>
        protected virtual void InitClassMembers()
        {
            _eventAppointment    = null;
            _eventSchedulingSlot = null;
            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }
        public void ExtendTemporarilyBookAppointmentExpiryTime(long id)
        {
            var slotEntity = new EventSchedulingSlotEntity(id)
            {
                Status = Convert.ToInt32(AppointmentStatus.TemporarilyBooked), DateModified = DateTime.Now.AddMinutes(-5)
            };
            IRelationPredicateBucket predicateBucket = new RelationPredicateBucket(EventSchedulingSlotFields.SlotId == id);

            using (var adapter = PersistenceLayer.GetDataAccessAdapter())
            {
                adapter.UpdateEntitiesDirectly(slotEntity, predicateBucket);
            }
        }
Пример #4
0
        protected EventSlotAppointmentEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _eventAppointment = (EventAppointmentEntity)info.GetValue("_eventAppointment", typeof(EventAppointmentEntity));
                if (_eventAppointment != null)
                {
                    _eventAppointment.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _eventSchedulingSlot = (EventSchedulingSlotEntity)info.GetValue("_eventSchedulingSlot", typeof(EventSchedulingSlotEntity));
                if (_eventSchedulingSlot != null)
                {
                    _eventSchedulingSlot.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
Пример #5
0
 /// <summary> Removes the sync logic for member _eventSchedulingSlot</summary>
 /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
 /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
 private void DesetupSyncEventSchedulingSlot(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_eventSchedulingSlot, new PropertyChangedEventHandler(OnEventSchedulingSlotPropertyChanged), "EventSchedulingSlot", EventSlotAppointmentEntity.Relations.EventSchedulingSlotEntityUsingSlotId, true, signalRelatedEntity, "EventSlotAppointment", false, new int[] { (int)EventSlotAppointmentFieldIndex.SlotId });
     _eventSchedulingSlot = null;
 }