コード例 #1
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Gets the learned lessons in course by customer identifier.
 /// </summary>
 /// <param name="customer_id">The customer_id.</param>
 /// <param name="course_id">The course_id.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetLearnedLessonsInCourseByCustomerId(int customer_id, int course_id, OnQueryComplete onComplete)
 {
     //lessonDsq = (DataServiceQuery<LESSON>(from les in ctx.LESSON where les.COURSE_ID == customer_id and les))
 }
コード例 #2
0
 /// <summary>
 /// Gets the lessons by course identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetLessonsByCourseId(int id, OnQueryComplete onComplete)
 {
     lessonDsq  = (DataServiceQuery <LESSON>)(from les in ctx.LESSON where les.COURSE_ID == id select les);
     this.onUQC = onComplete;
     lessonDsq.BeginExecute(onQueryComplete2, null);
 }
コード例 #3
0
 /// <summary>
 /// Gets the note by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetNoteByID(int id, OnQueryComplete onComplete)
 {
     noteDsq    = (DataServiceQuery <NOTE>)(ctx.NOTE.Where(r => r.ID == id));
     this.onUQC = onComplete;
     resourceDsq.BeginExecute(onResComplete, null);
 }
コード例 #4
0
 /// <summary>
 /// Gets the course by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetCourseByID(int id, OnQueryComplete onComplete)
 {
     courseDsq  = (DataServiceQuery <COURSE>)(ctx.COURSE.Where(r => r.ID == id));
     this.onUQC = onComplete;
     resourceDsq.BeginExecute(onResComplete, null);
 }
コード例 #5
0
 /// <summary>
 /// Inserts the note.
 /// </summary>
 /// <param name="note">The note.</param>
 /// <param name="onComplete">The on complete.</param>
 public void InsertNote(NOTE note, OnQueryComplete onComplete)
 {
     ctx.AddToNOTE(note);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
コード例 #6
0
 /// <summary>
 /// Edits the course.
 /// </summary>
 /// <param name="course">The course.</param>
 /// <param name="onComplete">The on complete.</param>
 public void EditCourse(COURSE course, OnQueryComplete onComplete)
 {
     ctx.UpdateObject(course);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
コード例 #7
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Edits the course.
 /// </summary>
 /// <param name="course">The course.</param>
 /// <param name="onComplete">The on complete.</param>
 public void EditCourse(COURSE course, OnQueryComplete onComplete)
 {
     ctx.UpdateObject(course);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
コード例 #8
0
 /// <summary>
 /// Gets the note by lesson identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetNoteByLessonId(int id, OnQueryComplete onComplete)
 {
     noteDsq    = (DataServiceQuery <NOTE>)(from note in ctx.NOTE where note.LESSON_ID == id select note);
     this.onUQC = onComplete;
     noteDsq.BeginExecute(onQueryComplete2, null);
 }
コード例 #9
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Inserts the note.
 /// </summary>
 /// <param name="note">The note.</param>
 /// <param name="onComplete">The on complete.</param>
 public void InsertNote(NOTE note, OnQueryComplete onComplete)
 {
     ctx.AddToNOTE(note);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
コード例 #10
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Edits the lesson.
 /// </summary>
 /// <param name="lesson">The lesson.</param>
 /// <param name="onComplete">The on complete.</param>
 public void EditLesson(LESSON lesson, OnQueryComplete onComplete)
 {
     ctx.UpdateObject(lesson);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
コード例 #11
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Gets the resource by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetResourceByID(int id, OnQueryComplete onComplete)
 {
     resourceDsq = (DataServiceQuery<RESOURCE>)(ctx.RESOURCE.Where(r => r.ID == id));
     this.onUQC = onComplete;
     resourceDsq.BeginExecute(onQueryComplete2, null);
 }
コード例 #12
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Gets the note by lesson identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetNoteByLessonId(int id, OnQueryComplete onComplete)
 {
     noteDsq = (DataServiceQuery<NOTE>)(from note in ctx.NOTE where note.LESSON_ID == id select note);
     this.onUQC = onComplete;
     noteDsq.BeginExecute(onQueryComplete2, null);
 }
コード例 #13
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Gets the note by customer identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetNoteByCustomerID(int id, OnQueryComplete onComplete)
 {
     noteDsq = (DataServiceQuery<NOTE>)(ctx.NOTE.Where(n => n.CUSTOMER_ID == id));
     this.onUQC = onComplete;
     noteDsq.BeginExecute(onQueryComplete2, null);
 }
コード例 #14
0
 /// <summary>
 /// Gets the learned lessons in course by customer identifier.
 /// </summary>
 /// <param name="customer_id">The customer_id.</param>
 /// <param name="course_id">The course_id.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetLearnedLessonsInCourseByCustomerId(int customer_id, int course_id, OnQueryComplete onComplete)
 {
     //lessonDsq = (DataServiceQuery<LESSON>(from les in ctx.LESSON where les.COURSE_ID == customer_id and les))
 }
コード例 #15
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Deletes the note.
 /// </summary>
 /// <param name="note">The note.</param>
 /// <param name="onComplete">The on complete.</param>
 public void DeleteNote(NOTE note, OnQueryComplete onComplete)
 {
     ctx.DeleteObject(note);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
コード例 #16
0
 /// <summary>
 /// Gets the note by customer identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetNoteByCustomerID(int id, OnQueryComplete onComplete)
 {
     noteDsq    = (DataServiceQuery <NOTE>)(ctx.NOTE.Where(n => n.CUSTOMER_ID == id));
     this.onUQC = onComplete;
     noteDsq.BeginExecute(onQueryComplete2, null);
 }
コード例 #17
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Gets the note by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetNoteByID(int id, OnQueryComplete onComplete)
 {
     noteDsq = (DataServiceQuery<NOTE>)(ctx.NOTE.Where(r => r.ID == id));
     this.onUQC = onComplete;
     resourceDsq.BeginExecute(onResComplete, null);
 }
コード例 #18
0
 /// <summary>
 /// Gets the resource by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetResourceByID(int id, OnQueryComplete onComplete)
 {
     resourceDsq = (DataServiceQuery <RESOURCE>)(ctx.RESOURCE.Where(r => r.ID == id));
     this.onUQC  = onComplete;
     resourceDsq.BeginExecute(onQueryComplete2, null);
 }
コード例 #19
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Gets the lesson by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetLessonByID(int id, OnQueryComplete onComplete)
 {
     lessonDsq = (DataServiceQuery<LESSON>)(ctx.LESSON.Where(r => r.ID == id));
     this.onUQC = onComplete;
     resourceDsq.BeginExecute(onResComplete, null);
 }
コード例 #20
0
 /// <summary>
 /// Edits the lesson.
 /// </summary>
 /// <param name="lesson">The lesson.</param>
 /// <param name="onComplete">The on complete.</param>
 public void EditLesson(LESSON lesson, OnQueryComplete onComplete)
 {
     ctx.UpdateObject(lesson);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
コード例 #21
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Gets the course by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetCourseByID(int id, OnQueryComplete onComplete)
 {
     courseDsq = (DataServiceQuery<COURSE>)(ctx.COURSE.Where(r => r.ID == id));
     this.onUQC = onComplete;
     resourceDsq.BeginExecute(onResComplete, null);
 }
コード例 #22
0
 /// <summary>
 /// Deletes the note.
 /// </summary>
 /// <param name="note">The note.</param>
 /// <param name="onComplete">The on complete.</param>
 public void DeleteNote(NOTE note, OnQueryComplete onComplete)
 {
     ctx.DeleteObject(note);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
コード例 #23
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Gets the user by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void getUserById(int id, OnQueryComplete onComplete)
 {
     customerDsq = (DataServiceQuery<CUSTOMER>)(from cus in ctx.CUSTOMER where cus.ID == Constants.User.ID select cus);
     this.onUQC = onComplete;
     customerDsq.BeginExecute(onQueryComplete2, null);
 }
コード例 #24
0
 /// <summary>
 /// Gets the lesson by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetLessonByID(int id, OnQueryComplete onComplete)
 {
     lessonDsq  = (DataServiceQuery <LESSON>)(ctx.LESSON.Where(r => r.ID == id));
     this.onUQC = onComplete;
     resourceDsq.BeginExecute(onResComplete, null);
 }
コード例 #25
0
 protected virtual void RaiseOnQueryComplete(IStoredProc sp, long time, Exception error) =>
 OnQueryComplete?.Invoke(this, new QueryCompleteEventArgs(sp, time, error));
コード例 #26
0
 /// <summary>
 /// Gets the user by identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void getUserById(int id, OnQueryComplete onComplete)
 {
     customerDsq = (DataServiceQuery <CUSTOMER>)(from cus in ctx.CUSTOMER where cus.ID == Constants.User.ID select cus);
     this.onUQC  = onComplete;
     customerDsq.BeginExecute(onQueryComplete2, null);
 }
コード例 #27
0
ファイル: DBAccessAPIs.cs プロジェクト: CloudEDU/Courstore
 /// <summary>
 /// Gets the lessons by course identifier.
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <param name="onComplete">The on complete.</param>
 public void GetLessonsByCourseId(int id, OnQueryComplete onComplete)
 {
     lessonDsq = (DataServiceQuery<LESSON>)(from les in ctx.LESSON where les.COURSE_ID == id select les);
     this.onUQC = onComplete;
     lessonDsq.BeginExecute(onQueryComplete2, null);
 }