/// <summary> setups the sync logic for member _customerHealthQuestions</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncCustomerHealthQuestions(IEntity2 relatedEntity)
 {
     if (_customerHealthQuestions != relatedEntity)
     {
         DesetupSyncCustomerHealthQuestions(true, true);
         _customerHealthQuestions = (CustomerHealthQuestionsEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity(_customerHealthQuestions, new PropertyChangedEventHandler(OnCustomerHealthQuestionsPropertyChanged), "CustomerHealthQuestions", MedicalHistoryReadingAssosciationEntity.Relations.CustomerHealthQuestionsEntityUsingMedicalHistoryQuestionId, true, new string[] {  });
     }
 }
 /// <summary> setups the sync logic for member _customerHealthQuestions</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncCustomerHealthQuestions(IEntity2 relatedEntity)
 {
     if (_customerHealthQuestions != relatedEntity)
     {
         DesetupSyncCustomerHealthQuestions(true, true);
         _customerHealthQuestions = (CustomerHealthQuestionsEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity(_customerHealthQuestions, new PropertyChangedEventHandler(OnCustomerHealthQuestionsPropertyChanged), "CustomerHealthQuestions", HealthQuestionDependencyRuleEntity.Relations.CustomerHealthQuestionsEntityUsingDependantQuestionId, true, new string[] {  });
     }
 }
        /// <summary> Initializes the class members</summary>
        protected virtual void InitClassMembers()
        {
            _customerHealthQuestions = null;
            _reading = null;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }
        public HealthAssessmentQuestion Map(CustomerHealthQuestionsEntity entity)
        {
            var healthAssessmentQuestion = new HealthAssessmentQuestion
            {
                ControlType     = (DisplayControlType)entity.ControlType,
                DisplaySequence = entity.DisplaySequence ?? 0,
                ControlValues   = !string.IsNullOrEmpty(entity.ControlValues) ? entity.ControlValues.Split(new[] { entity.ControlValueDelimiter }, StringSplitOptions.RemoveEmptyEntries) : null,
                Id               = entity.CustomerHealthQuestionId,
                DefaultValue     = entity.DefaultValue,
                Label            = entity.Label,
                Question         = entity.Question,
                QuestionGroupId  = entity.CustomerHealthQuestionGroupId,
                ParentQuestionId = entity.ParentQuestionId,
                IsForFemale      = entity.IsForFemale,
                IsActive         = entity.IsActive
            };

            return(healthAssessmentQuestion);
        }
        protected MedicalHistoryReadingAssosciationEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _customerHealthQuestions = (CustomerHealthQuestionsEntity)info.GetValue("_customerHealthQuestions", typeof(CustomerHealthQuestionsEntity));
                if (_customerHealthQuestions != null)
                {
                    _customerHealthQuestions.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _reading = (ReadingEntity)info.GetValue("_reading", typeof(ReadingEntity));
                if (_reading != null)
                {
                    _reading.AfterSave += new EventHandler(OnEntityAfterSave);
                }

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

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
Esempio n. 6
0
        protected HafTemplateQuestionEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _customerHealthQuestions = (CustomerHealthQuestionsEntity)info.GetValue("_customerHealthQuestions", typeof(CustomerHealthQuestionsEntity));
                if (_customerHealthQuestions != null)
                {
                    _customerHealthQuestions.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _hafTemplate = (HafTemplateEntity)info.GetValue("_hafTemplate", typeof(HafTemplateEntity));
                if (_hafTemplate != null)
                {
                    _hafTemplate.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 _customerHealthQuestions</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 DesetupSyncCustomerHealthQuestions(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_customerHealthQuestions, new PropertyChangedEventHandler(OnCustomerHealthQuestionsPropertyChanged), "CustomerHealthQuestions", MedicalHistoryReadingAssosciationEntity.Relations.CustomerHealthQuestionsEntityUsingMedicalHistoryQuestionId, true, signalRelatedEntity, "MedicalHistoryReadingAssosciation", resetFKFields, new int[] { (int)MedicalHistoryReadingAssosciationFieldIndex.MedicalHistoryQuestionId });
     _customerHealthQuestions = null;
 }
Esempio n. 8
0
 /// <summary> Removes the sync logic for member _customerHealthQuestions</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 DesetupSyncCustomerHealthQuestions(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_customerHealthQuestions, new PropertyChangedEventHandler(OnCustomerHealthQuestionsPropertyChanged), "CustomerHealthQuestions", HafTemplateQuestionEntity.Relations.CustomerHealthQuestionsEntityUsingQuestionId, true, signalRelatedEntity, "HafTemplateQuestion", resetFKFields, new int[] { (int)HafTemplateQuestionFieldIndex.QuestionId });
     _customerHealthQuestions = null;
 }
 /// <summary> Removes the sync logic for member _customerHealthQuestions</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 DesetupSyncCustomerHealthQuestions(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_customerHealthQuestions, new PropertyChangedEventHandler(OnCustomerHealthQuestionsPropertyChanged), "CustomerHealthQuestions", HealthQuestionDependencyRuleEntity.Relations.CustomerHealthQuestionsEntityUsingDependantQuestionId, true, signalRelatedEntity, "HealthQuestionDependencyRule", resetFKFields, new int[] { (int)HealthQuestionDependencyRuleFieldIndex.DependantQuestionId });
     _customerHealthQuestions = null;
 }