public IActionResult FindClient(string ownersurname) { var findedClietns = _context.Clients .Where(n => n.Surname == ownersurname) .ToList(); var findedClientsByName = _context.Clients .Where(n => n.Name == ownersurname) .ToList(); var findedClientsToDisplay = new BikeServiceViewModel() { ClientList = findedClietns }; var findedClientsToDisplayByName = new BikeServiceViewModel() { ClientList = findedClientsByName }; if (findedClietns.Count != 0) { return(View(findedClientsToDisplay)); } else { return(View(findedClientsToDisplayByName)); } }
public IActionResult ServiceActionList() { var serviceActions = _context.ServiceActions .ToList(); var serviceAsctionToDisplay = new BikeServiceViewModel() { ServiceActionList = serviceActions }; return(View(serviceAsctionToDisplay)); }
public IActionResult Index() { var clients = _context.Clients.ToList(); var clientsToDisplay = new BikeServiceViewModel() { ClientList = clients }; return(View(clientsToDisplay)); }
public IActionResult BikeServiceHistory(int id) { var bikeServiceHistory = _context.ServiceHistories .Where(n => n.ServiceOrderHistory.ServiceOrderId == id) .ToList(); var bikeServiceHistoryToDisplay = new BikeServiceViewModel() { ServiceHistoryList = bikeServiceHistory }; return(View(bikeServiceHistoryToDisplay)); }
public IActionResult Index() { var historyOrders = _context.ServiceHistories .Include(n => n.ServiceOrderHistory.BikeToService) .ToList(); var historyOrdersToDisplay = new BikeServiceViewModel { ServiceHistoryList = historyOrders }; return(View(historyOrdersToDisplay)); }
public IActionResult Index() { var bikes = _context.Bikes .Include(n => n.Owner) .ToList(); var bikesToDislplay = new BikeServiceViewModel() { BikeList = bikes }; return(View(bikesToDislplay)); }
public IActionResult Index() { var orders = _context.ServiceOrders .Include(n => n.BikeToService) .Include(n => n.BikeToServiceOwner) .ToList(); var ordersToDisplay = new BikeServiceViewModel() { ServiceOrderList = orders }; return(View(ordersToDisplay)); }
public IActionResult FindBike(string ownersurname) { var BikesToDisplaybyOwner = _context.Bikes .Include(n => n.Owner) .Where(n => n.Owner.Surname == ownersurname) .ToList(); var bikesToDislplay = new BikeServiceViewModel() { BikeList = BikesToDisplaybyOwner }; return(View(bikesToDislplay)); }