コード例 #1
0
 internal void InitVars()
 {
     this.tableAnswerType = (AnswerTypeDataTable) base.Tables["AnswerType"];
     if (this.tableAnswerType != null)
     {
         this.tableAnswerType.InitVars();
     }
     this.tableQuestion = (QuestionDataTable) base.Tables["Question"];
     if (this.tableQuestion != null)
     {
         this.tableQuestion.InitVars();
     }
     this.tableAnswer = (AnswerDataTable) base.Tables["Answer"];
     if (this.tableAnswer != null)
     {
         this.tableAnswer.InitVars();
     }
     this.tableAnswerProperty = (AnswerPropertyDataTable) base.Tables["AnswerProperty"];
     if (this.tableAnswerProperty != null)
     {
         this.tableAnswerProperty.InitVars();
     }
     this.tableChildQuestion = (ChildQuestionDataTable) base.Tables["ChildQuestion"];
     if (this.tableChildQuestion != null)
     {
         this.tableChildQuestion.InitVars();
     }
     this.tableAnswerConnection = (AnswerConnectionDataTable) base.Tables["AnswerConnection"];
     if (this.tableAnswerConnection != null)
     {
         this.tableAnswerConnection.InitVars();
     }
     this.tableQuestionSectionOption = (QuestionSectionOptionDataTable) base.Tables["QuestionSectionOption"];
     if (this.tableQuestionSectionOption != null)
     {
         this.tableQuestionSectionOption.InitVars();
     }
     this.tableQuestionSectionGridAnswer = (QuestionSectionGridAnswerDataTable) base.Tables["QuestionSectionGridAnswer"];
     if (this.tableQuestionSectionGridAnswer != null)
     {
         this.tableQuestionSectionGridAnswer.InitVars();
     }
     this.tableRegularExpression = (RegularExpressionDataTable) base.Tables["RegularExpression"];
     if (this.tableRegularExpression != null)
     {
         this.tableRegularExpression.InitVars();
     }
     this.relationAnswerAnswerProperty = base.Relations["AnswerAnswerProperty"];
     this.relationQuestionSectionOptionQuestionSectionGridAnswer = base.Relations["QuestionSectionOptionQuestionSectionGridAnswer"];
     this.relationQuestionAnswer = base.Relations["QuestionAnswer"];
     this.relationQuestionChildQuestion = base.Relations["QuestionChildQuestion"];
     this.relationQuestionAnswerConnection = base.Relations["QuestionAnswerConnection"];
     this.relationQuestionQuestionSectionOption = base.Relations["QuestionQuestionSectionOption"];
     this.relationAnswerTypeAnswer = base.Relations["AnswerTypeAnswer"];
     this.relationPublisherAnswerConnection = base.Relations["PublisherAnswerConnection"];
     this.relationSubscriberAnswerConnection = base.Relations["SubscriberAnswerConnection"];
     this.relationRegularExpressionAnswer = base.Relations["RegularExpressionAnswer"];
     this.relationAnswerQuestionSectionGridAnswer = base.Relations["AnswerQuestionSectionGridAnswer"];
 }
コード例 #2
0
 private void InitClass()
 {
     base.DataSetName = "NSurveyQuestion";
     base.Prefix = "";
     base.Namespace = "http://www.nsurvey.org/nsurveyquestion.xsd";
     base.Locale = new CultureInfo("en-US");
     base.CaseSensitive = false;
     base.EnforceConstraints = true;
     this.tableAnswerType = new AnswerTypeDataTable();
     base.Tables.Add(this.tableAnswerType);
     this.tableQuestion = new QuestionDataTable();
     base.Tables.Add(this.tableQuestion);
     this.tableAnswer = new AnswerDataTable();
     base.Tables.Add(this.tableAnswer);
     this.tableAnswerProperty = new AnswerPropertyDataTable();
     base.Tables.Add(this.tableAnswerProperty);
     this.tableChildQuestion = new ChildQuestionDataTable();
     base.Tables.Add(this.tableChildQuestion);
     this.tableAnswerConnection = new AnswerConnectionDataTable();
     base.Tables.Add(this.tableAnswerConnection);
     this.tableQuestionSectionOption = new QuestionSectionOptionDataTable();
     base.Tables.Add(this.tableQuestionSectionOption);
     this.tableQuestionSectionGridAnswer = new QuestionSectionGridAnswerDataTable();
     base.Tables.Add(this.tableQuestionSectionGridAnswer);
     this.tableRegularExpression = new RegularExpressionDataTable();
     base.Tables.Add(this.tableRegularExpression);
     ForeignKeyConstraint constraint = new ForeignKeyConstraint("QuestionAnswer", new DataColumn[] { this.tableQuestion.QuestionIdColumn }, new DataColumn[] { this.tableAnswer.QuestionIdColumn });
     this.tableAnswer.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("AnswerTypeAnswer", new DataColumn[] { this.tableAnswerType.AnswerTypeIDColumn }, new DataColumn[] { this.tableAnswer.AnswerTypeIdColumn });
     this.tableAnswer.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("RegularExpressionAnswer", new DataColumn[] { this.tableRegularExpression.RegularExpressionIdColumn }, new DataColumn[] { this.tableAnswer.RegularExpressionIdColumn });
     this.tableAnswer.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("AnswerAnswerProperty", new DataColumn[] { this.tableAnswer.AnswerIdColumn }, new DataColumn[] { this.tableAnswerProperty.AnswerIdColumn });
     this.tableAnswerProperty.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("QuestionChildQuestion", new DataColumn[] { this.tableQuestion.QuestionIdColumn }, new DataColumn[] { this.tableChildQuestion.ParentQuestionIdColumn });
     this.tableChildQuestion.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("QuestionAnswerConnection", new DataColumn[] { this.tableQuestion.QuestionIdColumn }, new DataColumn[] { this.tableAnswerConnection.QuestionIdColumn });
     this.tableAnswerConnection.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("PublisherAnswerConnection", new DataColumn[] { this.tableAnswer.AnswerIdColumn }, new DataColumn[] { this.tableAnswerConnection.PublisherAnswerIdColumn });
     this.tableAnswerConnection.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("SubscriberAnswerConnection", new DataColumn[] { this.tableAnswer.AnswerIdColumn }, new DataColumn[] { this.tableAnswerConnection.SubscriberAnswerIdColumn });
     this.tableAnswerConnection.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("QuestionQuestionSectionOption", new DataColumn[] { this.tableQuestion.QuestionIdColumn }, new DataColumn[] { this.tableQuestionSectionOption.QuestionIdColumn });
     this.tableQuestionSectionOption.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("QuestionSectionOptionQuestionSectionGridAnswer", new DataColumn[] { this.tableQuestionSectionOption.QuestionIdColumn }, new DataColumn[] { this.tableQuestionSectionGridAnswer.QuestionIdColumn });
     this.tableQuestionSectionGridAnswer.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     constraint = new ForeignKeyConstraint("AnswerQuestionSectionGridAnswer", new DataColumn[] { this.tableAnswer.AnswerIdColumn }, new DataColumn[] { this.tableQuestionSectionGridAnswer.AnswerIdColumn });
     this.tableQuestionSectionGridAnswer.Constraints.Add(constraint);
     constraint.AcceptRejectRule = AcceptRejectRule.None;
     constraint.DeleteRule = Rule.Cascade;
     constraint.UpdateRule = Rule.Cascade;
     this.relationAnswerAnswerProperty = new DataRelation("AnswerAnswerProperty", new DataColumn[] { this.tableAnswer.AnswerIdColumn }, new DataColumn[] { this.tableAnswerProperty.AnswerIdColumn }, false);
     this.relationAnswerAnswerProperty.Nested = true;
     base.Relations.Add(this.relationAnswerAnswerProperty);
     this.relationQuestionSectionOptionQuestionSectionGridAnswer = new DataRelation("QuestionSectionOptionQuestionSectionGridAnswer", new DataColumn[] { this.tableQuestionSectionOption.QuestionIdColumn }, new DataColumn[] { this.tableQuestionSectionGridAnswer.QuestionIdColumn }, false);
     this.relationQuestionSectionOptionQuestionSectionGridAnswer.Nested = true;
     base.Relations.Add(this.relationQuestionSectionOptionQuestionSectionGridAnswer);
     this.relationQuestionAnswer = new DataRelation("QuestionAnswer", new DataColumn[] { this.tableQuestion.QuestionIdColumn }, new DataColumn[] { this.tableAnswer.QuestionIdColumn }, false);
     this.relationQuestionAnswer.Nested = true;
     base.Relations.Add(this.relationQuestionAnswer);
     this.relationQuestionChildQuestion = new DataRelation("QuestionChildQuestion", new DataColumn[] { this.tableQuestion.QuestionIdColumn }, new DataColumn[] { this.tableChildQuestion.ParentQuestionIdColumn }, false);
     this.relationQuestionChildQuestion.Nested = true;
     base.Relations.Add(this.relationQuestionChildQuestion);
     this.relationQuestionAnswerConnection = new DataRelation("QuestionAnswerConnection", new DataColumn[] { this.tableQuestion.QuestionIdColumn }, new DataColumn[] { this.tableAnswerConnection.QuestionIdColumn }, false);
     this.relationQuestionAnswerConnection.Nested = true;
     base.Relations.Add(this.relationQuestionAnswerConnection);
     this.relationQuestionQuestionSectionOption = new DataRelation("QuestionQuestionSectionOption", new DataColumn[] { this.tableQuestion.QuestionIdColumn }, new DataColumn[] { this.tableQuestionSectionOption.QuestionIdColumn }, false);
     this.relationQuestionQuestionSectionOption.Nested = true;
     base.Relations.Add(this.relationQuestionQuestionSectionOption);
     this.relationAnswerTypeAnswer = new DataRelation("AnswerTypeAnswer", new DataColumn[] { this.tableAnswerType.AnswerTypeIDColumn }, new DataColumn[] { this.tableAnswer.AnswerTypeIdColumn }, false);
     base.Relations.Add(this.relationAnswerTypeAnswer);
     this.relationPublisherAnswerConnection = new DataRelation("PublisherAnswerConnection", new DataColumn[] { this.tableAnswer.AnswerIdColumn }, new DataColumn[] { this.tableAnswerConnection.PublisherAnswerIdColumn }, false);
     base.Relations.Add(this.relationPublisherAnswerConnection);
     this.relationSubscriberAnswerConnection = new DataRelation("SubscriberAnswerConnection", new DataColumn[] { this.tableAnswer.AnswerIdColumn }, new DataColumn[] { this.tableAnswerConnection.SubscriberAnswerIdColumn }, false);
     base.Relations.Add(this.relationSubscriberAnswerConnection);
     this.relationRegularExpressionAnswer = new DataRelation("RegularExpressionAnswer", new DataColumn[] { this.tableRegularExpression.RegularExpressionIdColumn }, new DataColumn[] { this.tableAnswer.RegularExpressionIdColumn }, false);
     base.Relations.Add(this.relationRegularExpressionAnswer);
     this.relationAnswerQuestionSectionGridAnswer = new DataRelation("AnswerQuestionSectionGridAnswer", new DataColumn[] { this.tableAnswer.AnswerIdColumn }, new DataColumn[] { this.tableQuestionSectionGridAnswer.AnswerIdColumn }, false);
     base.Relations.Add(this.relationAnswerQuestionSectionGridAnswer);
 }