Ejemplo n.º 1
0
        public async Task <IActionResult> DeletedItems()
        {
            var viewModel = new AdminItemsViewModel
            {
                Items = await this.itemsService.GetDeletedItemsAsync <AdminItemViewModel>(),
            };

            return(this.View(viewModel));
        }
Ejemplo n.º 2
0
        public IActionResult Items()
        {
            var viewModel = new AdminItemsViewModel
            {
                Items = this.itemsService.GetAllItems <AdminItemViewModel>(),
            };

            return(this.View(viewModel));
        }
Ejemplo n.º 3
0
        public ActionResult Items(int id)
        {
            var model = new AdminItemsViewModel
            {
                Items        = _itemService.GetAllItems(id),
                ItemTypeId   = id,
                ItemTypeName = _typeService.GetItemTypeById(id).Name,
                PartName     = _partService.GetPartById(_typeService.GetItemTypeById(id).PartId).Name,
                ProductName  = _productService.GetProductById(_partService.GetPartById(_typeService.GetItemTypeById(id).PartId).ProductId).Name,
                PartId       = _typeService.GetItemTypeById(id).PartId,
                ProductId    = _partService.GetPartById(_typeService.GetItemTypeById(id).PartId).ProductId
            };

            return(View(model));
        }