Exemplo n.º 1
0
        // GET: Vendas
        public async Task <IActionResult> Index()
        {
            var currentUser = await _userManager.GetUserAsync(User);

            return(View(await _repositoryVenda.GetAllAsync(
                            v => currentUser.Gerente || v.FuncionarioId == currentUser.Id,
                            v => v.Cliente)));
        }
Exemplo n.º 2
0
        // GET: Produtos
        public async Task <IActionResult> Index()
        {
            return(View(await _repositoryProduto.GetAllAsync()));
            //       var currentUser = await _userManager.GetUserAsync(User);

            //    return View(await _repositoryProduto.GetAllAsync(
            //        v => currentUser.Gerente || v.FuncionarioId == currentUser.Id,
            //        v => v.Cliente));
        }
Exemplo n.º 3
0
 // GET: Lojas
 public async Task <IActionResult> Index()
 {
     return(View(await _repositoryLoja.GetAllAsync()));
 }