public CurrentCompanyAndPostViewModel(CurrentCompanyAndPost currentCompanyAndPost, DateTime startDate, DateTime endDate)
            : this(startDate, endDate)
        {
            _currentCompanyAndPost       = currentCompanyAndPost;
            _isEditCurrentCompanyAndPost = true;

            SelectedDirectoryCompany = DirectoryCompanies.First(c => c.Name == currentCompanyAndPost.DirectoryPost.DirectoryCompany.Name);
            IsTwoCompanies           = currentCompanyAndPost.IsTwoCompanies;
            SelectedPostChangeDate   = currentCompanyAndPost.PostChangeDate;
        }
Beispiel #2
0
        public void Remove(object parameter)
        {
            BC.RemoveDirectoryCompany(SelectedDirectoryCompany.Id);

            RefreshDirectoryCompanies();

            if (DirectoryCompanies.Any())
            {
                SelectedDirectoryCompany = DirectoryCompanies.Last();
            }
        }