示例#1
0
        public async Task <IActionResult> Cadastro()
        {
            var vendedores = await _vendedorService.FindAllAsync();

            var viewModel = new VendaFormViewModel {
                Vendedores = vendedores
            };

            return(View(viewModel));
        }
示例#2
0
        // GET: Vendas/Create
        public async Task <IActionResult> Create()
        {
            var clientes = await _clienteService.FindAllAsync();

            var vendedores = await _vendedorService.FindAllAsync();

            var formapagtos = await _formaPagtoService.FindAllAsync();

            var produtos = await _produtoService.FindAllAsync();

            var vwModel = new VendasFormViewModel {
                Clientes = clientes, Vendedores = vendedores, FormaPagtos = formapagtos, Produtos = produtos
            };

            return(View(vwModel));
        }
        // GET: Vendedores
        public async Task <IActionResult> Index()
        {
            var vendlist = await _vendedorService.FindAllAsync();

            return(View(vendlist));
        }
        public async Task <IActionResult> Index()
        {
            var list = await _vendedorSevice.FindAllAsync(); // Retorna a lista de vendedores para a View

            return(View(list));
        }
示例#5
0
        public async Task <IActionResult> Index()
        {
            var list = await _vendedorService.FindAllAsync(); //Puxar a lista do VendedorService

            return(View(list));
        }
示例#6
0
        // Operacao assincrona
        public async Task <IActionResult> Index()             //1. O controlador foi chamado
        {
            var list = await _vendedorService.FindAllAsync(); //2. Retorna uma lista de vendedores

            return(View(list));                               //3. Passa a lista como um argumento
        }
示例#7
0
        public async Task <IActionResult> Index()
        {
            var list = await _vendedorService.FindAllAsync();

            return(View(list));// vai gerar a lista na index
        }