Beispiel #1
0
        public static Task ToModel(this TaskViewModel viewModel)
        {
            var task = new Task();
            task.InjectFrom(viewModel);

            return task;
        }
Beispiel #2
0
 public void Update(Task task)
 {
     if (this.Validate(task))
     {
         this._taskRepository.Update(task);
         this._taskRepository.Commit();
     }
 }
Beispiel #3
0
        public void Add(Task task)
        {
            var isTeacherExist = this._teacherManager.IsExist(task.TeacherID);
            var isGroupExist = this._groupManager.IsExist(task.GroupID);
            var isTypeOfTask = this._typeOfTaskManager.IsExist(task.TypeID);

            if (this.Validate(task)
                && isTeacherExist
                && isGroupExist
                && isTypeOfTask)
            {
                this._taskRepository.Add(task);
                this._taskRepository.Commit();
            }
        }
Beispiel #4
0
 private bool Validate(Task entity)
 {
     return true;
 }