Пример #1
0
        public TaskDO CreateTask(TaskDO task, string userEmail)
        {
            UserDO user = userDAO.ReadByEmail(userEmail);

            task.UserId = user.UserId;
            return(taskDAO.Create(task));
        }
Пример #2
0
 public Task Create(string name)
 {
     if (!String.IsNullOrWhiteSpace(name))
     {
         Task task = new Task(name);
         taskDAO.Create(task);
         return(task);
     }
     return(null);
 }
        private TaskDO CreateTask(CategoryDO category, UserDO user, string taskName, string body)
        {
            var task1 = new TaskDO
            {
                CategoryId   = category.CategoryId,
                UserId       = user.UserId,
                TaskName     = taskName,
                Body         = body,
                Status       = TaskStatus.TaskNotStarted,
                ActualWork   = 0,
                CreationTime = DateTime.Today,
                IsComplete   = false
            };

            _taskDao.Create(task1);
            return(task1);
        }