Exemplo n.º 1
0
 public Task(string name, string description, Milestone milestone, RiskLevel risk, int effort, int priority, string owner)
     : this()
 {
     Name = name;
     Id = -1;
     ParentId = milestone.Id;
     Description = description;
     Risk = risk;
     Effort = effort;
     Priority = priority;
     Owner = owner;
 }
Exemplo n.º 2
0
 private static Tuple<DateTime, DateTime> AddSprintRows(Milestone m, UIBuildItContext db)
 {
     DateTime start = DateTime.MaxValue;
     DateTime end = DateTime.MinValue;
     var sprints = (from s in db.Sprints.AsNoTracking()
                       where s.ParentId == m.Id
                       select s).ToList();
     foreach(var s in sprints)
     {
         var times = AddExecutionUnitTasks(s, db);
         if (times.Item1 > new DateTime(1950, 1, 1) && times.Item1 != DateTime.MaxValue && times.Item2 < new DateTime(2222, 1, 1) && times.Item2 != DateTime.MinValue)
         {
             var row = new GanttRow(s);
             _rows.Add(row);
             row.start_date = times.Item1.ToString("dd-MM-yyyy");
             row.duration = 0;// (int)(times.Item2 - times.Item1).TotalHours / hoursPerDay;
             row.parent = (int)m.HashIndex();
             if (start > times.Item1)
             {
                 start = times.Item1;
             }
             if (end < times.Item2)
             {
                 end = times.Item2;
             }
         }
     }
     return new Tuple<DateTime, DateTime>(start, end);
 }
 protected override MilestoneData CreateData(Milestone m, int id)
 {
     return CreateDataFor(null, id);
 }