Example #1
0
        void IClass.SaveClass(CheckIn.Model.Class classInfo)
        {
            var entity = new Entity.ClassEntity();

            entity.ClassLevel  = classInfo.Level;
            entity.ClassTime   = classInfo.ClassTime;
            entity.Description = classInfo.Description;
            entity.EndTime     = classInfo.EndTime;
            entity.Id          = classInfo.Id;
            entity.InputTime   = classInfo.InputTime;
            entity.InputUser   = classInfo.InputUser;
            entity.Name        = classInfo.Name;
            entity.StartTime   = classInfo.StartTime;
            entity.Teacher     = classInfo.Teacher;
            entity.Type        = classInfo.Type;
            _db.Save(entity);
        }
Example #2
0
 void IClass.BatchBuildClass(CheckIn.Model.Class classInfo, DateTime startTime, CycleEnum cycle, int time)
 {
     for (int i = 1; i < time; i++)
     {
         Entity.ClassEntity entity = new Entity.ClassEntity();
         entity.ClassLevel  = classInfo.Level;
         entity.ClassTime   = classInfo.ClassTime;
         entity.Description = classInfo.Description;
         entity.StartTime   = getTime(startTime, cycle, i);
         entity.EndTime     = entity.StartTime.AddMinutes(Common.GlobalVariable.ClassTimeMinute);
         entity.InputTime   = DateTime.Now;
         entity.InputUser   = classInfo.InputUser;
         entity.Name        = classInfo.Name;
         entity.Teacher     = classInfo.Teacher;
         entity.Type        = classInfo.Type;
         _db.Save(entity);
     }
 }