private void CreateDemographicsInTest(int test_id) { DemographicsInTestsServices dits = new DemographicsInTestsServices(); DemographicsInTest dit; int[] demographics = new int[7] { 1, 2, 3, 5, 7, 10, 11 }; bool b = true; foreach (int i in demographics) { dit = new DemographicsInTest(); dit.Demographic_Id = i; dit.Selector = false; dit.Test_Id = test_id; if (i == 11) { dit.FOT_Id = this.fotId; } b = b && dits.Add(dit); } this.Ok = b; }