/// <summary> setups the sync logic for member _surveyQuestion</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncSurveyQuestion(IEntity2 relatedEntity) { if (_surveyQuestion != relatedEntity) { DesetupSyncSurveyQuestion(true, true); _surveyQuestion = (SurveyQuestionEntity)relatedEntity; base.PerformSetupSyncRelatedEntity(_surveyQuestion, new PropertyChangedEventHandler(OnSurveyQuestionPropertyChanged), "SurveyQuestion", SurveyTemplateQuestionEntity.Relations.SurveyQuestionEntityUsingQuestionId, true, new string[] { }); } }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _surveyQuestion = null; _surveyTemplate = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
/// <summary> /// 复制按钮 /// </summary> /// <param name="KeyValue">主键</param> /// <param name="moduleId">功能主键</param> /// <returns></returns> public void CopyForm(string keyValue, string Id) { try { SurveyQuestionEntity surveyQuestionEntity = this.GetEntity(keyValue); surveyQuestionEntity.QuestionId = Id; service.AddEntity(surveyQuestionEntity); } catch (Exception) { throw; } }
protected SurveyTemplateQuestionEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _surveyQuestion = (SurveyQuestionEntity)info.GetValue("_surveyQuestion", typeof(SurveyQuestionEntity)); if (_surveyQuestion != null) { _surveyQuestion.AfterSave += new EventHandler(OnEntityAfterSave); } _surveyTemplate = (SurveyTemplateEntity)info.GetValue("_surveyTemplate", typeof(SurveyTemplateEntity)); if (_surveyTemplate != null) { _surveyTemplate.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 _surveyQuestion</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 DesetupSyncSurveyQuestion(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity(_surveyQuestion, new PropertyChangedEventHandler(OnSurveyQuestionPropertyChanged), "SurveyQuestion", SurveyTemplateQuestionEntity.Relations.SurveyQuestionEntityUsingQuestionId, true, signalRelatedEntity, "SurveyTemplateQuestion", resetFKFields, new int[] { (int)SurveyTemplateQuestionFieldIndex.QuestionId }); _surveyQuestion = null; }