public ProjectRegistration AddNewProjectRegistration(int projectId, string projectName, string companyName)
        {
            var project = new ProjectRegistration
            {
                ProjectId   = projectId,
                ProjectName = projectName,
                ComapyName  = companyName
            };

            project.Registrations = _forecastRegistrationDataGenerator.CreateProjectHoursFromHeaders(DateColumns, this, project);
            ProjectRegistrations.Add(project);
            CalculateTotals();

            return(project);
        }
        private void DeleteProjectExecute(object obj)
        {
            var toDelete = obj as ProjectRegistration;

            if (toDelete == null)
            {
                return;
            }

            if (!_commonDialogs.ContinueWarning("Delete project row?", "Confirm"))
            {
                return;
            }

            ProjectRegistrations.Remove(toDelete);

            // Cleanup subscriptions
            toDelete.ResetHoursUpdatedSubscriptions();

            RaiseCanExecuteActions();
            CalculateTotals();
        }
 public override void InitializeDirtyCheck()
 {
     base.InitializeDirtyCheck();
     ProjectRegistrations.InitializeDirtyCheck();
 }