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

            return task;
        }
Example #2
0
 public void Update(Task task)
 {
     if (this.Validate(task))
     {
         this._taskRepository.Update(task);
         this._taskRepository.Commit();
     }
 }
Example #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();
            }
        }
Example #4
0
 private bool Validate(Task entity)
 {
     return true;
 }