public IActionResult NewOrder(int id) { // Check the last time customer make an order // if time is less than 2hr // Show a message // If time is more than 2hr // Allo user to complete order Customer customer = Repo.GetCustomerByID(id); OrderByLocation newOrder = new OrderByLocation { InventoryLocation = Repo.GetInventoryByLocationID(customer.LocationId), Item = Repo.GetAllItem(), Types = Repo.GetAllItemType(), CustomerID = customer.Id, LocationID = customer.LocationId }; return(View(newOrder)); }
public void GetAllItemShouldReturnAListOfRegisteredItem() { // Note: // At this moment the DB count with 5 initial Customer for demo // Arrange List <Item> Items; // Action Items = (List <Item>)repo.GetAllItem(); // Assert Assert.NotNull(Items); }
public IActionResult LocationInventory(int id) { var inventory = Repo.GetInventoryByLocationID(id); var items = Repo.GetAllItem(); var locInventory = new LocationInventory { InventoryList = (List <Inventory>)inventory, ItemInventory = (List <Item>)items }; return(View(locInventory)); }