Example #1
0
        public JobModel(WorkItemModel parentWorkItem, ICloudJob job)
        {
            this.Job             = job;
            this.Tasks           = new List <TaskModel>();
            this.LastUpdatedTime = DateTime.UtcNow;
            this.ParentWorkItem  = parentWorkItem;

            this.TaskCollection = CollectionViewSource.GetDefaultView(this.Tasks);
            this.UpdateTaskView();
        }
        public WorkItemModel(ICloudWorkItem workItem, ICloudJob mostRecentJob)
        {
            this.WorkItem        = workItem;
            this.LastUpdatedTime = DateTime.UtcNow;

            // create a new job list and add the most recent job to the list
            JobModel recentJob = new JobModel(this, mostRecentJob);

            this.Jobs = new List <JobModel> {
                recentJob
            };

            smallestJobId = WorkItemModel.GetJobNumberFromJobName(recentJob.Name);
        }
        public JobModel(WorkItemModel parentWorkItem, ICloudJob job)
        {
            this.Job = job;
            this.Tasks = new List<TaskModel>();
            this.LastUpdatedTime = DateTime.UtcNow;
            this.ParentWorkItem = parentWorkItem;

            this.TaskCollection = CollectionViewSource.GetDefaultView(this.Tasks);
            this.UpdateTaskView();
        }