Esempio n. 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));
     }
 }
Esempio n. 2
0
 public virtual void AddProjectRegistration(ForecastProjectHours registration)
 {
     EnsureSupportsProjectHours(registration);
     EnsureDistinctProject(registration.Project);
     _projectRegistrations.Add(registration);
 }
Esempio n. 3
0
 public virtual void RemoveProjectRegistration(ForecastProjectHours registration)
 {
     _projectRegistrations.Remove(registration);
 }