private void InitClass() { base.DataSetName = "MatrixChildQuestionData"; base.Prefix = ""; base.Namespace = "http://tempuri.org/MatrixChildQuestionData.xsd"; base.Locale = new CultureInfo("en-US"); base.CaseSensitive = false; base.EnforceConstraints = true; this.tableChildQuestions = new ChildQuestionsDataTable(); base.Tables.Add(this.tableChildQuestions); this.tableAnswers = new AnswersDataTable(); base.Tables.Add(this.tableAnswers); ForeignKeyConstraint constraint = new ForeignKeyConstraint("ChildQuestionAnswers", new DataColumn[] { this.tableChildQuestions.QuestionIdColumn }, new DataColumn[] { this.tableAnswers.QuestionIdColumn }); this.tableAnswers.Constraints.Add(constraint); constraint.AcceptRejectRule = AcceptRejectRule.None; constraint.DeleteRule = Rule.Cascade; constraint.UpdateRule = Rule.Cascade; this.relationChildQuestionAnswers = new DataRelation("ChildQuestionAnswers", new DataColumn[] { this.tableChildQuestions.QuestionIdColumn }, new DataColumn[] { this.tableAnswers.QuestionIdColumn }, false); base.Relations.Add(this.relationChildQuestionAnswers); }
internal void InitVars() { this.tableChildQuestions = (ChildQuestionsDataTable) base.Tables["ChildQuestions"]; if (this.tableChildQuestions != null) { this.tableChildQuestions.InitVars(); } this.tableAnswers = (AnswersDataTable) base.Tables["Answers"]; if (this.tableAnswers != null) { this.tableAnswers.InitVars(); } this.relationChildQuestionAnswers = base.Relations["ChildQuestionAnswers"]; }