public ActionResult AtualizarStatus(int?id) { if (id == null) { return(NotFound()); } ViewBag.Status = StatusVenda.GetStatusVenda(); ViewBag.FormaPagamento = FormaPagamento.GetFormaPagamento(); return(View(Mapper.Map <Venda, VendaViewModel>(_vendaService.GetById((int)id)))); }
public ActionResult Pedidos() { var userId = new Guid(User.FindFirstValue(ClaimTypes.NameIdentifier)); var vendas = _vendaService.GetByCustomer(userId); if (vendas == null) { return(NotFound()); } ViewBag.Status = StatusVenda.GetStatusVenda(); ViewBag.FormaPagamento = FormaPagamento.GetFormaPagamento(); return(View(Mapper.Map <IEnumerable <Venda>, IEnumerable <VendaViewModel> >(vendas))); }
public ActionResult Vendas() { var userId = new Guid(User.FindFirstValue(ClaimTypes.NameIdentifier)); var vendas = _vendaService.GetBySeller(userId); if (vendas == null) { return(NotFound()); } ViewBag.Avaliacao = _vendaService.RateById(userId).ToString().Replace(',', '.'); ViewBag.Status = StatusVenda.GetStatusVenda(); ViewBag.FormaPagamento = FormaPagamento.GetFormaPagamento(); return(View(Mapper.Map <IEnumerable <Venda>, IEnumerable <VendaViewModel> >(vendas))); }
public ActionResult AvaliarVendedor(int?id) { if (id == null) { return(NotFound()); } var vendas = _vendaService.GetById((int)id); if (vendas == null) { return(NotFound()); } ViewBag.Status = StatusVenda.GetStatusVenda(); ViewBag.FormaPagamento = FormaPagamento.GetFormaPagamento(); return(View(Mapper.Map <Venda, VendaViewModel>(vendas))); }