public PlanContinuingProcessResource(RHumanResource resource, Process process, Deliverable deliverable, Activity activity, Period period, double dedication)
 {
     _resource = resource;
     _process = process;
     _deliverable = deliverable;
     _activity = activity;
     _dedication = dedication;
     _period = period;
 }
Exemple #2
0
 public UnAssignResource(RHumanResource resource, Release release, Project project, Milestone milestone, Deliverable deliverable, Activity activity, Period period)
 {
     _resource = resource;
     _release = release;
     _milestone = milestone;
     _deliverable = deliverable;
     _activity = activity;
     _period = period;
     _project = project;
 }
 public PlanReleaseResource(RHumanResource resource, Release release, Project project, Milestone milestone, Deliverable deliverable, Activity activity, Period period, double focusFactor)
 {
     _resource = resource;
     _release = release;
     _milestone = milestone;
     _deliverable = deliverable;
     _activity = activity;
     _focusFactor = focusFactor;
     _period = period;
     _project = project;
 }
Exemple #4
0
 /// <summary>
 /// UnAssign the resource from the specified deliverable activity
 /// </summary>
 /// <param name="str"></param>
 /// <returns></returns>
 public static void UnAssignFromRelease(this RHumanResource person, Release release, Project project, Milestone milestone, Deliverable deliverable, Activity activity, Period assignedPeriod)
 {
     var rep = new ResourceRepository();
     try
     {
         rep.DeleteReleaseAssignment(release.Id, project.Id, person.Id, milestone.Id, deliverable.Id, activity.Id, assignedPeriod.StartDate, assignedPeriod.EndDate);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemple #5
0
 /// <summary>
 /// TODO: not used yet; first create continuing process logic
 /// Plan the resource for a continuing process
 /// </summary>
 /// <param name="str"></param>
 /// <returns></returns>
 public static void PlanForContinuingProcess(this RHumanResource person, Process process, Deliverable deliverable, Activity activity, Period assignedPeriod, double dedication)
 {
     var rep = new ResourceRepository();
     try
     {
         rep.SaveContinuingProcessAssignment(process.Id, person.Id, deliverable.Id, activity.Id, assignedPeriod.StartDate, assignedPeriod.EndDate, dedication);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemple #6
0
 /// <summary>
 /// Plan the resource for an assignment
 /// </summary>
 /// <param name="str"></param>
 /// <returns></returns>
 public static void PlanForRelease(this RHumanResource person, RReleasePlanning release, Project project, Milestone milestone, Deliverable deliverable, Activity activity, Period assignedPeriod, double focusFactor)
 {
     var rep = new ResourceRepository();
     try
     {
         rep.SaveReleaseAssignment(release.Id, project.Id, person.Id, milestone.Id, deliverable.Id, activity.Id, assignedPeriod.StartDate, assignedPeriod.EndDate, focusFactor);
         // make sure we have status records for all release, project, milestone and deliverable combinations
         if (release.Milestones.Count == 0)
             release.LoadPhasesAndMilestonesAndProjects();
         release.GenerateMilestoneStatusRecords();
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Exemple #7
0
        public JsonResult SaveDeliverableStatus(DeliverableStatusInputModel obj)
        {
            //var rep = new ReleaseRepository();
            //rep.SaveDeliverableStatus(obj);
            var del = new Deliverable { Id = obj.DeliverableId };
            foreach(var proj in obj.Scope)
            {
                var project = new Project { Id = proj.Id };
                foreach (var act in proj.Workload)
                {
                    project.Workload.Add(new ActivityStatus { Activity = act.Activity, HoursRemaining = act.HoursRemaining });
                }
                del.Scope.Add(project);
            }
            var ms = new Milestone { Id = obj.MilestoneId, Release = new Release { Id = obj.ReleaseId } };

            var uc = new UpdateMilestoneDeliverableStatus(del, ms);
            uc.Execute();

            var result = this.Json("Saved", JsonRequestBehavior.AllowGet);
            return result;
        }
Exemple #8
0
 /// <summary>
 /// Adds missing status records per milestone, project, deliverable and activity
 /// </summary>
 /// <param name="releaseId"></param>
 /// <param name="milestoneId"></param>
 /// <param name="deliverable"></param>
 /// <param name="projectId"></param>
 private void AddDeliverableStatusRecords(int releaseId, int milestoneId, Deliverable deliverable, int projectId)
 {
     var input = new StatusInputModel
     {
         ProjectId = projectId,
         DeliverableId = deliverable.Id,
         MilestoneId = milestoneId,
         ReleaseId = releaseId,
         ActivityStatuses = new List<DeliverableActivityStatusInputModel>()
     };
     foreach (var act in deliverable.ConfiguredActivities)
     {
         input.ActivityStatuses.Add(new DeliverableActivityStatusInputModel { ActivityId = act.Id, HoursRemaining = 0 });
     }
     this.CreateDeliverableStatusRecords(input);
 }