public bool HasTheSameHours(BacklogItem item) { if (item == null) { return(false); } if (item.PlannedHours == null && PlannedHours != null) { return(false); } if (item.PlannedHours == null && PlannedHours == null) { return(true); } return(PlannedHours.All(h => item.PlannedHours.Any(hh => hh.RoleUId == h.RoleUId && h.Hours == hh.Hours))); }
public decimal CalcItemPrice(BacklogItem item, RoleHourCost[] roleHourCosts) { if (item == null) return 0; decimal? price = 0; foreach (PlannedHour h in item.PlannedHours) { RoleHourCost roleCost = roleHourCosts.SingleOrDefault(r => r.RoleUId == h.RoleUId); if (roleCost != null) price = price + h.Hours * roleCost.Price; } if (!price.HasValue) return 0; return price.Value; }
public bool IsTheSame(BacklogItem item) { return this.BacklogItemNumber == item.BacklogItemNumber && this.BacklogItemUId == item.BacklogItemUId && this.BusinessPriority == item.BusinessPriority && this.CreateDate == item.CreateDate && this.Name == item.Name && this.Description == item.Description && this.FinishedAt == item.FinishedAt && this.ItemSizeUId == item.ItemSizeUId && this.ProjectUId == item.ProjectUId && this.IssueType == item.IssueType && this.Size == item.Size && this.StartedAt == item.StartedAt && this.Status == item.Status && this.DeliveryDate == item.DeliveryDate && this.CancelReason == item.CancelReason && this.GroupUId == item.GroupUId && this.OccurrenceConstraint == item.OccurrenceConstraint && this.ItemSizeUId == item.ItemSizeUId && this.SizeFactor == item.SizeFactor && this.HasTheSameHours(item); }
public bool HasTheSameHours(BacklogItem item) { if (item == null) return false; if (item.PlannedHours == null && PlannedHours != null) return false; if (item.PlannedHours == null && PlannedHours == null) return true; return PlannedHours.All(h => item.PlannedHours.Any(hh => hh.RoleUId == h.RoleUId && h.Hours == hh.Hours)); }