Beispiel #1
0
        public void OnSaveClick(Task task)
        {
            if (task.id == 0)
            {
                task.CreatedByUser = _provider.getCurrentUser();
                task.CreatedDate   = DateTime.Now;
            }

            _provider.saveTask(task);
            _view.ShowTask(task, _provider.getCurrentUser().role != Projman.Server.User.Types.Role.User, _provider.getCurrentUser().role != Projman.Server.User.Types.Role.User);
        }
Beispiel #2
0
 public EditTaskPresenter(IEditTaskView view, Task task, bool editMode)
 {
     _view = view;
     if (!editMode)
     {
         view.ShowTask(task, _provider.getCurrentUser().role != Projman.Server.User.Types.Role.User, _provider.getCurrentUser().role != Projman.Server.User.Types.Role.User);
     }
     else
     {
         view.ShowTaskInEditMode(task);
     }
 }