Esempio n. 1
0
        protected EventCustomerEligibilityEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _chargeCard = (ChargeCardEntity)info.GetValue("_chargeCard", typeof(ChargeCardEntity));
                if (_chargeCard != null)
                {
                    _chargeCard.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _eligibility = (EligibilityEntity)info.GetValue("_eligibility", typeof(EligibilityEntity));
                if (_eligibility != null)
                {
                    _eligibility.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _eventCustomers = (EventCustomersEntity)info.GetValue("_eventCustomers", typeof(EventCustomersEntity));
                if (_eventCustomers != null)
                {
                    _eventCustomers.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
        protected EventCustomerRetestEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _eventCustomers = (EventCustomersEntity)info.GetValue("_eventCustomers", typeof(EventCustomersEntity));
                if (_eventCustomers != null)
                {
                    _eventCustomers.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _organizationRoleUser = (OrganizationRoleUserEntity)info.GetValue("_organizationRoleUser", typeof(OrganizationRoleUserEntity));
                if (_organizationRoleUser != null)
                {
                    _organizationRoleUser.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _test = (TestEntity)info.GetValue("_test", typeof(TestEntity));
                if (_test != null)
                {
                    _test.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
Esempio n. 3
0
        protected PhysicianCustomerAssignmentEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _eventCustomers = (EventCustomersEntity)info.GetValue("_eventCustomers", typeof(EventCustomersEntity));
                if (_eventCustomers != null)
                {
                    _eventCustomers.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _physicianProfile_ = (PhysicianProfileEntity)info.GetValue("_physicianProfile_", typeof(PhysicianProfileEntity));
                if (_physicianProfile_ != null)
                {
                    _physicianProfile_.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _physicianProfile = (PhysicianProfileEntity)info.GetValue("_physicianProfile", typeof(PhysicianProfileEntity));
                if (_physicianProfile != null)
                {
                    _physicianProfile.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
        protected EventCustomerNotificationEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _eventCustomers = (EventCustomersEntity)info.GetValue("_eventCustomers", typeof(EventCustomersEntity));
                if (_eventCustomers != null)
                {
                    _eventCustomers.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _notification = (NotificationEntity)info.GetValue("_notification", typeof(NotificationEntity));
                if (_notification != null)
                {
                    _notification.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _notificationType = (NotificationTypeEntity)info.GetValue("_notificationType", typeof(NotificationTypeEntity));
                if (_notificationType != null)
                {
                    _notificationType.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
 /// <summary> setups the sync logic for member _eventCustomers</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncEventCustomers(IEntity2 relatedEntity)
 {
     if (_eventCustomers != relatedEntity)
     {
         DesetupSyncEventCustomers(true, true);
         _eventCustomers = (EventCustomersEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity(_eventCustomers, new PropertyChangedEventHandler(OnEventCustomersPropertyChanged), "EventCustomers", EventCustomerCustomNotificationEntity.Relations.EventCustomersEntityUsingEventCustomerId, true, new string[] {  });
     }
 }
Esempio n. 6
0
        /// <summary> Initializes the class members</summary>
        protected virtual void InitClassMembers()
        {
            _eventCustomers = null;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }
        /// <summary> Initializes the class members</summary>
        protected virtual void InitClassMembers()
        {
            _eventCustomers       = null;
            _medicareQuestion     = null;
            _organizationRoleUser = null;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }
        protected MvuserEventCustomerLockEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _eventCustomers = (EventCustomersEntity)info.GetValue("_eventCustomers", typeof(EventCustomersEntity));
                if (_eventCustomers != null)
                {
                    _eventCustomers.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _medicalVendorMvuser = (MedicalVendorMvuserEntity)info.GetValue("_medicalVendorMvuser", typeof(MedicalVendorMvuserEntity));
                if (_medicalVendorMvuser != null)
                {
                    _medicalVendorMvuser.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
 /// <summary> Removes the sync logic for member _eventCustomers</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 DesetupSyncEventCustomers(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_eventCustomers, new PropertyChangedEventHandler(OnEventCustomersPropertyChanged), "EventCustomers", EventCustomerCustomNotificationEntity.Relations.EventCustomersEntityUsingEventCustomerId, true, signalRelatedEntity, "EventCustomerCustomNotification", resetFKFields, new int[] { (int)EventCustomerCustomNotificationFieldIndex.EventCustomerId });
     _eventCustomers = null;
 }
 /// <summary> Removes the sync logic for member _eventCustomers</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 DesetupSyncEventCustomers(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_eventCustomers, new PropertyChangedEventHandler(OnEventCustomersPropertyChanged), "EventCustomers", CustomerMedicareQuestionAnswerEntity.Relations.EventCustomersEntityUsingEventCustomerId, true, signalRelatedEntity, "CustomerMedicareQuestionAnswer", resetFKFields, new int[] { (int)CustomerMedicareQuestionAnswerFieldIndex.EventCustomerId });
     _eventCustomers = null;
 }
Esempio n. 11
0
        public bool MergeCustomer(long oldCustomerId, long newCustomerId, long orgRoleId)
        {
            using (var adapter = PersistenceLayer.GetDataAccessAdapter())
            {
                var eventCustomer = new EventCustomersEntity {
                    CustomerId = newCustomerId
                };
                var eventCustomerBucket = new RelationPredicateBucket(EventCustomersFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(eventCustomer, eventCustomerBucket);

                eventCustomer = new EventCustomersEntity {
                    CreatedByOrgRoleUserId = newCustomerId
                };
                eventCustomerBucket = new RelationPredicateBucket(EventCustomersFields.CreatedByOrgRoleUserId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(eventCustomer, eventCustomerBucket);

                var eventAppointment = new EventAppointmentEntity {
                    ScheduledByOrgRoleUserId = newCustomerId
                };
                var eventAppointmentBucket = new RelationPredicateBucket(EventAppointmentFields.ScheduledByOrgRoleUserId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(eventAppointment, eventAppointmentBucket);

                var customerEventTestFinding = new CustomerEventTestFindingEntity {
                    CustomerId = newCustomerId
                };
                var customerEventTestBucket = new RelationPredicateBucket(CustomerEventTestFindingFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerEventTestFinding, customerEventTestBucket);

                var hospitalPartnerCustomer = new HospitalPartnerCustomerEntity {
                    CustomerId = newCustomerId
                };
                var hospitalPartnerCustomerBucket = new RelationPredicateBucket(HospitalPartnerCustomerFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(hospitalPartnerCustomer, hospitalPartnerCustomerBucket);

                var customerPrimaryCarePhysician = new CustomerPrimaryCarePhysicianEntity
                {
                    CustomerId   = newCustomerId,
                    IsActive     = false,
                    DateModified = DateTime.Now,
                    UpdatedByOrganizationRoleUserId = orgRoleId
                };

                var customerPrimaryCarePhysicianBucket = new RelationPredicateBucket(CustomerPrimaryCarePhysicianFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerPrimaryCarePhysician, customerPrimaryCarePhysicianBucket);

                var preApprovedTest = new PreApprovedTestEntity
                {
                    CustomerId = newCustomerId,
                    IsActive   = false,
                    DateEnd    = DateTime.Now
                };

                var preApprovedTestBucket = new RelationPredicateBucket(PreApprovedTestFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(preApprovedTest, preApprovedTestBucket);

                var preApprovedPackage = new PreApprovedPackageEntity
                {
                    CustomerId = newCustomerId,
                    IsActive   = false,
                    DateEnd    = DateTime.Now
                };

                var preApprovedPackageBucket = new RelationPredicateBucket(PreApprovedPackageFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(preApprovedPackage, preApprovedPackageBucket);

                var customerIcdCode = new CustomerIcdCodeEntity
                {
                    CustomerId = newCustomerId,
                    IsActive   = false,
                    DateEnd    = DateTime.Now
                };

                var customerIcdCodeBucket = new RelationPredicateBucket(CustomerIcdCodeFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerIcdCode, customerIcdCodeBucket);

                var currentMedication = new CurrentMedicationEntity
                {
                    CustomerId = newCustomerId,
                    IsActive   = false,
                    DateEnd    = DateTime.Now
                };

                var currentMedicationBucket = new RelationPredicateBucket(CurrentMedicationFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(currentMedication, currentMedicationBucket);

                var chaseOutbound = new ChaseOutboundEntity
                {
                    CustomerId = newCustomerId,
                    IsActive   = false,
                    EndDate    = DateTime.Now
                };

                var chaseOutboundBucket = new RelationPredicateBucket(ChaseOutboundFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(chaseOutbound, chaseOutboundBucket);


                var customerChaseCampaign = new CustomerChaseCampaignEntity
                {
                    CustomerId = newCustomerId,
                    IsActive   = false
                };

                var customerChaseCampaignBucket = new RelationPredicateBucket(CustomerChaseCampaignFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerChaseCampaign, customerChaseCampaignBucket);

                var customerChaseChannel = new CustomerChaseChannelEntity
                {
                    CustomerId = newCustomerId
                };

                var customerChaseChannelBucket = new RelationPredicateBucket(CustomerChaseChannelFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerChaseChannel, customerChaseChannelBucket);


                var customerChaseProduct = new CustomerChaseProductEntity
                {
                    CustomerId = newCustomerId
                };

                var customerChaseProductBucket = new RelationPredicateBucket(CustomerChaseProductFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerChaseProduct, customerChaseProductBucket);


                var orderDetail = new OrderDetailEntity
                {
                    ForOrganizationRoleUserId = newCustomerId
                };

                var orderDetailBucket = new RelationPredicateBucket(OrderDetailFields.ForOrganizationRoleUserId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(orderDetail, orderDetailBucket);

                var order = new OrderEntity
                {
                    OrganizationRoleUserCreatorId = newCustomerId
                };

                var orderBucket = new RelationPredicateBucket(OrderFields.OrganizationRoleUserCreatorId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(order, orderBucket);

                var eventCustomerResult = new EventCustomerResultEntity
                {
                    CustomerId = newCustomerId
                };

                var eventCustomerResultBucket = new RelationPredicateBucket(EventCustomerResultFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(eventCustomerResult, eventCustomerResultBucket);

                var eventCustomerResultHistory = new EventCustomerResultHistoryEntity
                {
                    CustomerId = newCustomerId
                };

                var eventCustomerResultHistoryBucket = new RelationPredicateBucket(EventCustomerResultHistoryFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(eventCustomerResultHistory, eventCustomerResultHistoryBucket);

                var resultArchiveUploadLog = new ResultArchiveUploadLogEntity
                {
                    CustomerId = newCustomerId
                };

                var resultArchiveUploadLogBucket = new RelationPredicateBucket(ResultArchiveUploadLogFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(resultArchiveUploadLog, resultArchiveUploadLogBucket);

                var customerHealthInfo = new CustomerHealthInfoEntity
                {
                    CustomerId = newCustomerId
                };

                var customerHealthInfoBucket = new RelationPredicateBucket(CustomerHealthInfoFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerHealthInfo, customerHealthInfoBucket);

                var customerHealthInfoArchive = new CustomerHealthInfoArchiveEntity
                {
                    CustomerId = newCustomerId
                };

                var customerHealthInfoArchiveBucket = new RelationPredicateBucket(CustomerHealthInfoArchiveFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerHealthInfoArchive, customerHealthInfoArchiveBucket);

                var customerTag = new CustomerTagEntity
                {
                    CustomerId = newCustomerId
                };

                var customerTagBucket = new RelationPredicateBucket(CustomerTagFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerTag, customerTagBucket);

                var customerRegistrationNotes = new CustomerRegistrationNotesEntity
                {
                    CustomerId = newCustomerId
                };

                var customerRegistrationNotesBucket = new RelationPredicateBucket(CustomerRegistrationNotesFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(customerRegistrationNotes, customerRegistrationNotesBucket);

                var directMail = new DirectMailEntity
                {
                    CustomerId = newCustomerId
                };

                var directMailBucket = new RelationPredicateBucket(DirectMailFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(directMail, directMailBucket);

                var calls = new CallsEntity
                {
                    CalledCustomerId = newCustomerId
                };

                var callsBucket = new RelationPredicateBucket(CallsFields.CalledCustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(calls, callsBucket);

                var callQueueCustomer = new CallQueueCustomerEntity
                {
                    CustomerId = newCustomerId,
                    Status     = (int)CallQueueStatus.Removed
                };

                var callQueueCustomerBucket = new RelationPredicateBucket(CallQueueCustomerFields.CustomerId == oldCustomerId);
                adapter.UpdateEntitiesDirectly(callQueueCustomer, callQueueCustomerBucket);

                var customerHistory = new CustomerProfileHistoryEntity()
                {
                    CustomerId = newCustomerId
                };
                var customerHistoryBucket = new RelationPredicateBucket(CustomerProfileHistoryFields.CustomerId == oldCustomerId);

                adapter.UpdateEntitiesDirectly(customerHistory, customerHistoryBucket);

                var preQualificationResult = new PreQualificationResultEntity {
                    CustomerId = newCustomerId
                };
                var preQualificationResultBucket = new RelationPredicateBucket(PreQualificationResultFields.CustomerId == oldCustomerId);

                adapter.UpdateEntitiesDirectly(preQualificationResult, preQualificationResultBucket);

                var customerCallQueueCallAttempt = new CustomerCallQueueCallAttemptEntity {
                    CustomerId = newCustomerId
                };
                var customerCallQueueCallAttemptBucket = new RelationPredicateBucket(CustomerCallQueueCallAttemptFields.CustomerId == oldCustomerId);

                adapter.UpdateEntitiesDirectly(customerCallQueueCallAttempt, customerCallQueueCallAttemptBucket);
            }

            return(true);
        }
Esempio n. 12
0
 /// <summary> Removes the sync logic for member _eventCustomers</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 DesetupSyncEventCustomers(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_eventCustomers, new PropertyChangedEventHandler(OnEventCustomersPropertyChanged), "EventCustomers", CustomerSkipReviewEntity.Relations.EventCustomersEntityUsingEventCustomerId, true, signalRelatedEntity, "CustomerSkipReview", false, new int[] { (int)CustomerSkipReviewFieldIndex.EventCustomerId });
     _eventCustomers = null;
 }