public async Task <IActionResult> DeletedItems() { var viewModel = new AdminItemsViewModel { Items = await this.itemsService.GetDeletedItemsAsync <AdminItemViewModel>(), }; return(this.View(viewModel)); }
public IActionResult Items() { var viewModel = new AdminItemsViewModel { Items = this.itemsService.GetAllItems <AdminItemViewModel>(), }; return(this.View(viewModel)); }
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)); }