示例#1
0
 public TodosController(ChromiumWebBrowser originalBrowser, MainWindow mainForm, DataContext dbContext) : base(originalBrowser, mainForm)
 {
     _goalsProvider      = new GoalsProvider(dbContext);
     _activitiesProvider = new ActivitiesProvider(dbContext);
     _todoItemsProvider  = new TodoItemsProvider(dbContext);
     _tagsProvider       = new TagsProvider(dbContext);
 }
        public ReportsController()
        {
            var dbContext = new DataContext();

            _todoItemsProvider = new TodoItemsProvider(dbContext, UserId);
            _tagsProvider      = new TagsProvider(dbContext);
            _goalsProvider     = new GoalsProvider(dbContext, UserId);
        }
        public TasksController()
        {
            var dbContext = new DataContext();

            _goalsProvider      = new GoalsProvider(dbContext, UserId);
            _activitiesProvider = new ActivitiesProvider(dbContext, UserId);
            _todoItemsProvider  = new TodoItemsProvider(dbContext, UserId);
            _tagsProvider       = new TagsProvider(dbContext);
        }
示例#4
0
 public TaskModel GetModel(Task task)
 {
     var taskModel = new TaskModel
                {
                    TaskId = task.TaskId,
                    Content = task.Content,
                    Title = task.Title,
                };
     var tagsProvider = new TagsProvider();
     var tagModel = tagsProvider.GetModelList(task.Tags.ToList());
     var userProvider= new UserProvider();
     taskModel.Tags = tagModel.ToString();
     taskModel.UserOwnerModel = userProvider.GetModel(task.UserOwner);
     return taskModel;
 }