Пример #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the lessonsarchives EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTolessonsarchives(lessonsarchive lessonsarchive)
 {
     base.AddObject("lessonsarchives", lessonsarchive);
 }
Пример #2
0
        public void LessonToLessonarchive(lesson l)
        {
            CheckConnection();
            try
            {
                lock (locker)
                {
                    lessonsarchive la = new lessonsarchive();
                    la.Date = l.Date;
                    la.GroupId = l.GroupId;
                    la.LessonIndex = l.LessonIndex;
                    la.SubjectId = l.SubjectId;
                    la.TeacherId = l.TeacherId;
                    la.WeekDay = l.WeekDay;
                    la.IsSubstitution = l.IsSubstitution;
                    la.IsCanceled = l.IsCanceled;

                    this.db.lessonsarchives.AddObject(la);
                    this.db.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                throw new DBException(ErrorTypes.UnexpectedException, ex);
            }
        }
Пример #3
0
 /// <summary>
 /// Create a new lessonsarchive object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="subjectId">Initial value of the SubjectId property.</param>
 /// <param name="teacherId">Initial value of the TeacherId property.</param>
 /// <param name="groupId">Initial value of the GroupId property.</param>
 /// <param name="lessonIndex">Initial value of the LessonIndex property.</param>
 /// <param name="weekDay">Initial value of the WeekDay property.</param>
 /// <param name="date">Initial value of the Date property.</param>
 /// <param name="isSubstitution">Initial value of the IsSubstitution property.</param>
 /// <param name="isCanceled">Initial value of the IsCanceled property.</param>
 /// <param name="lessonNum">Initial value of the LessonNum property.</param>
 public static lessonsarchive Createlessonsarchive(global::System.Int64 id, global::System.Int64 subjectId, global::System.Int64 teacherId, global::System.Int64 groupId, global::System.Int64 lessonIndex, global::System.Int64 weekDay, global::System.DateTime date, global::System.Boolean isSubstitution, global::System.Boolean isCanceled, global::System.Int64 lessonNum)
 {
     lessonsarchive lessonsarchive = new lessonsarchive();
     lessonsarchive.Id = id;
     lessonsarchive.SubjectId = subjectId;
     lessonsarchive.TeacherId = teacherId;
     lessonsarchive.GroupId = groupId;
     lessonsarchive.LessonIndex = lessonIndex;
     lessonsarchive.WeekDay = weekDay;
     lessonsarchive.Date = date;
     lessonsarchive.IsSubstitution = isSubstitution;
     lessonsarchive.IsCanceled = isCanceled;
     lessonsarchive.LessonNum = lessonNum;
     return lessonsarchive;
 }
Пример #4
0
 public void DeleteLessonarchive(lessonsarchive la)
 {
     this.CheckConnection();
     try
     {
         lock (locker)
         {
             this.db.lessonsarchives.DeleteObject(la);
             this.db.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         throw new DBException(ErrorTypes.UnexpectedException, ex);
     }
 }