private DetailsLeftColumnViewModel BindingDataForCategoryLeftColumnViewModel(int itemContentId)
        {
            var viewModel = new DetailsLeftColumnViewModel();
            var item      = new Arcus.Domain.Common.Item();

            item.ItemContent      = this._unitOfWork.ItemContents.Get(itemContentId);
            viewModel.CurrentItem = item;
            return(viewModel);
        }
Пример #2
0
        private DetailsLeftColumnViewModel BindingDataForDetailsLeftColumnViewModel(int itemId)
        {
            var viewModel = new DetailsLeftColumnViewModel();

            var item = this._itemRepository.GetById(itemId);

            if (item == null)
            {
                throw new NoNullAllowedException(string.Format("Item id={0}", itemId).ToNotNullErrorMessage());
            }

            viewModel.CurrentItem = item;

            return(viewModel);
        }
        private DetailsLeftColumnViewModel BindingDataForDetailsLeftColumnViewModel(int projectId)
        {
            var project = _projectRepository.GetById(projectId);

            if (project == null)
            {
                throw new NoNullAllowedException(string.Format("Project id={0}", projectId).ToNotNullErrorMessage());
            }

            var viewModel = new DetailsLeftColumnViewModel();

            viewModel.CurrentProject = project;

            return(viewModel);
        }
        private DetailsLeftColumnViewModel BindingDataForDetailsLeftColumnViewModel(int articleId)
        {
            var article = _newsRepository.GetById(articleId);

            if (article == null)
            {
                throw new NoNullAllowedException(string.Format("Article id={0}", articleId).ToNotNullErrorMessage());
            }

            var viewModel = new DetailsLeftColumnViewModel();

            viewModel.CurrentArticle = article;

            return(viewModel);
        }