public AddTaskViewModel(INavigator <InnerViewModel> nnavigator, ITaskDataService taskDataService)
        {
            navigator = (IInnerNavigator <Task>)nnavigator;

            TaskToAdd = new Task {
                IssueId     = navigator.ParentViewModel.SelectedIssue.Id,
                Title       = "",
                Description = "",
                Progress    = 0
            };
            AddTaskCommand        = new AddTaskCommand(this, taskDataService);
            CloseInnerViewCommand = new CloseInnerViewCommand(this);
        }
        public UpdateTaskViewModel(INavigator <InnerViewModel> nnavigator, ITaskDataService taskDataService)
        {
            navigator = (IInnerNavigator <Task>)nnavigator;
            Task task = navigator.ParentViewModel.SelectedItem;

            TaskToUpdate = new Task()
            {
                Id          = task.Id,
                IssueId     = task.IssueId,
                Title       = task.Title,
                Description = task.Description,
                Progress    = task.Progress
            };
            UpdateTaskCommand     = new UpdateTaskCommand(this, taskDataService);
            CloseInnerViewCommand = new CloseInnerViewCommand(this);
        }
        public AddIssueViewModel(INavigator <InnerViewModel> nnavigator, IAuthenticator authenticator, IIssueDataService issueDataService)
        {
            navigator      = (IInnerNavigator <Issue>)nnavigator;
            _authenticator = authenticator;

            StatusList = new List <string>()
            {
                "New", "In progress"
            };

            IssueToAdd = new Issue {
                AccountId = _authenticator.CurrentAccount.Id,
                Title     = "",
                StartDate = DateTime.Today,
                Status    = ""
            };
            AddIssueCommand       = new AddIssueCommand(this, issueDataService);
            CloseInnerViewCommand = new CloseInnerViewCommand(this);
        }
 public UpdateIssueViewModel(INavigator <InnerViewModel> navigator, IIssueDataService issueDataService)
 {
     _navigator = (IInnerNavigator <Issue>)navigator;
     StatusList = new List <string>()
     {
         "New", "In progress", "Closed"
     };
     OriginIssue   = _navigator.ParentViewModel.SelectedItem;
     IssueToUpdate = new Issue()
     {
         Id        = OriginIssue.Id,
         AccountId = OriginIssue.AccountId,
         Account   = OriginIssue.Account,
         Title     = OriginIssue.Title,
         Status    = OriginIssue.Status,
         StartDate = OriginIssue.StartDate
     };
     UpdateIssueCommand    = new UpdateIssueCommand(this, issueDataService);
     CloseInnerViewCommand = new CloseInnerViewCommand(this);
 }