public async Task <ActionResult> Index() { var vans = (await _vanService.GetVan()).Items; var salesman = (await _salesmanService.GetSalesman()).Items; var model = new VanListViewModel { Vans = vans, Salesmen = salesman }; return(View(model)); }
public async Task <ActionResult> Create() { var vans = (await _vanService.GetVan()).Items; var products = (await _productService.GetProduct()).Items; var model = new CreateWithdrawalViewModel { Vans = vans, Products = products, LoginInformations = await _sessionAppService.GetCurrentLoginInformations(), }; return(View("Create", model)); }
public async Task <ActionResult> Index() { List <GetTotal> list = new List <GetTotal>(); var stocks = await _stockService.GetTotal(); var badStocks = await _badStockService.GetTotal(); var salesman = await _salesmaService.GetTotalSalesman(); var supplier = await _supplierService.GetTotalSupplier(); var customer = await _customerAppService.GetTotalCustomer(); var products = await _productAppService.GetTotalProduct(); var invoices = (await _invoiceAppService.GetRecentInvoice()).Items; var creditMemos = (await _creditMemoAppService.GetRecentCM()).Items; var debitMemos = (await _debitMemoAppService.GetRecentDM()).Items; var purchaseOrders = (await _purchaseOrderAppService.GetrecentPurchase()).Items; var vans = (await _vanAppService.GetVan()).Items; foreach (var items in vans) { var total = await _vanStockAppService.GetTotal(items.Id); list.Add(total); } var model = new HomeViewModel { TotalStocks = stocks, BadStocks = badStocks, Salesman = salesman, Suppliers = supplier, Customers = customer, Products = products, InvoiceLists = invoices, CreditMemos = creditMemos, DebitMemos = debitMemos, PurchaseOrders = purchaseOrders, Vans = vans, VanStocks = list, LoginInformations = await _sessionAppService.GetCurrentLoginInformations() }; return(View(model)); }