private CreatePostsVm GetCreatePublicationVm()
        {
            var model = new CreatePostsVm()
            {
                Categories = GetListItem.GetSelectListItems(this.categoryService.GetAllCategories()),
            };

            return(model);
        }
        private AddOrderVm GetAddOrderVm()
        {
            var model = new AddOrderVm
            {
                Categories  = GetListItem.GetSelectListItems(this.categoryService.GetAllCategories()),
                Appearances = GetListItem.GetSelectListItems(this.appearanceService.GetAllNameOfAppearances())
            };

            return(model);
        }
示例#3
0
        public AddOrderVm GetAddOrderVm(OrderBindingModel model,
                                        IEnumerable <string> categories,
                                        IEnumerable <string> appearances)
        {
            var orderViewModel = Mapper.Map <OrderBindingModel, AddOrderVm>(model);

            orderViewModel.Categories  = GetListItem.GetSelectListItems(categories);
            orderViewModel.Appearances = GetListItem.GetSelectListItems(appearances);

            return(orderViewModel);
        }
示例#4
0
        private DesignOrderVm GetDesignOrderVm(int?id)
        {
            var model = this.service.GetDesignOrderVm((int)id);

            if (model == null)
            {
                return(null);
            }

            model.FiguresSelectList = GetListItem.GetSelectListItems(this.figureService.GetAllFigures());
            return(model);
        }