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); }
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); }
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); }