Esempio n. 1
0
        public async Task <IActionResult> GetAllproducts()
        {
            var products = await _productService.GetAll();

            if (products == null && !products.Any())
            {
                return(NotFound());
            }

            return(new ObjectResult(products));
        }
Esempio n. 2
0
        public async Task <IActionResult> GetAllCustomers()
        {
            var customers = await _customerService.GetAll();

            if (customers == null && !customers.Any())
            {
                return(NotFound());
            }

            return(new ObjectResult(customers));
        }
Esempio n. 3
0
        public async Task <IActionResult> GetAllCompanys()
        {
            var companys = await _companyService.GetAll();

            if (companys == null && !companys.Any())
            {
                return(NotFound());
            }

            return(new ObjectResult(companys));
        }
Esempio n. 4
0
        public async Task <IActionResult> GetAllorders()
        {
            var orders = await _orderService.GetAll();

            if (orders == null && !orders.Any())
            {
                return(NotFound());
            }

            return(new ObjectResult(orders));
        }
Esempio n. 5
0
        public async Task <IActionResult> GetAllstocks()
        {
            var stocks = await _stockService.GetAll();

            if (stocks == null && !stocks.Any())
            {
                return(NotFound());
            }

            return(new ObjectResult(stocks));
        }
Esempio n. 6
0
        async Task LoadClientsFromDatabase()
        {
            var result = await _clientBaseApplicationService.GetAll();

            if (!result.Any())
            {
                throw new ArgumentNullException(nameof(result), "Nenhum dado retornado");
            }

            this.Clients = new ObservableCollection <Result>(result);
        }
Esempio n. 7
0
 public async Task MontaMenu()
 {
     Menus = await _menuService.GetAll();
 }