Example #1
0
 private void EnsureSupportsProjectHours(ForecastProjectHours registration)
 {
     if (!ForecastType.SupportsProjectHours)
     {
         throw new Exception(string.Format("{0} ForecastType on date: {1} and project: {2} does not support project hours {3}"
                                           , ForecastType.Name, Date.ToShortDateString()
                                           , registration.Project.ProjectName
                                           , registration.Hours));
     }
 }
Example #2
0
 public virtual void AddProjectRegistration(ForecastProjectHours registration)
 {
     EnsureSupportsProjectHours(registration);
     EnsureDistinctProject(registration.Project);
     _projectRegistrations.Add(registration);
 }
Example #3
0
 public virtual void RemoveProjectRegistration(ForecastProjectHours registration)
 {
     _projectRegistrations.Remove(registration);
 }