public ActionResult CreateItem()
        {
            ItemViewModel model = new ItemViewModel
            {
                ItemCategories = itemCategoryRepository.GetAllCategories()
            };

            return(View(model));
        }
Пример #2
0
        public ActionResult Product()
        {
            System.Web.HttpContext.Current.Session["menu"] = "PRODUCT";
            var model = new ItemViewModel
            {
                Items          = itemRepository.GetAllItems().Select(x => x.MapFromServerToClient()).ToList(),
                ItemCategories = itemCategoryRepository.GetAllCategories().ToList()
            };

            return(View(model));
        }