Ejemplo n.º 1
0
        public void ApplyHoursBackward(ProjectHourRegistration source)
        {
            var toUpdate = AllEditableProjectHourRegistrations.Where(x => x.DateColumn.Date < source.DateColumn.Date);

            foreach (var registration in toUpdate)
            {
                registration.Hours = source.Hours;
            }
        }
Ejemplo n.º 2
0
        public void TryDistributeTotalInput(string totalString)
        {
            if (_registrations.Count == 0 || !_registrations.Any(x => x.IsEditableWorkDay))
            {
                return;
            }

            decimal totalInt;

            if (!decimal.TryParse(totalString, out totalInt))
            {
                return;
            }

            var toUpdate = AllEditableProjectHourRegistrations.ToList();

            // Distribute hours on types supporting projecthours only.
            DistributeHoursOnProject(toUpdate, totalInt);
        }