예제 #1
0
 private void loadToQuestionSet(Section value)
 {
     var questionSetToLoad = questionContextTo.Load(questionContextTo.GetQuestionsForSectionsQuery(value.SectionId));
     questionSetToLoad.Completed += new System.EventHandler(questionSetToLoad_Completed);
 }
예제 #2
0
 /// <summary>
 /// Устаревший метод для добавления новых объектов в набор EntitySet Sections. Взамен можно использовать метод .Add связанного свойства ObjectSet&lt;T&gt;.
 /// </summary>
 public void AddToSections(Section section)
 {
     base.AddObject("Sections", section);
 }
예제 #3
0
 public bool OnCanDeleteSection(Section section)
 {
     return section != null;
 }
예제 #4
0
 /// <summary>
 /// Создание нового объекта Section.
 /// </summary>
 /// <param name="sectionId">Исходное значение свойства SectionId.</param>
 /// <param name="name">Исходное значение свойства Name.</param>
 /// <param name="bookId">Исходное значение свойства BookId.</param>
 public static Section CreateSection(global::System.Int32 sectionId, global::System.String name, global::System.Int32 bookId)
 {
     Section section = new Section();
     section.SectionId = sectionId;
     section.Name = name;
     section.BookId = bookId;
     return section;
 }
예제 #5
0
 public void OmDeleteSection(Section section)
 {
     section.IsDeleted = true;
     var sectionSubmitionResult = sectionContext.SubmitChanges();
     sectionSubmitionResult.Completed += new EventHandler(sectionSubmitionResult_Completed);
 }