public Models.TbVendaItem ParaTabela(Models.Request.VendaItemRequest request)
 {
     Models.TbVendaItem ln = new Models.TbVendaItem();
     ln.DsQtd     = request.Qtd;
     ln.VlTotal   = request.ValorTotal;
     ln.IdVenda   = request.IdVenda;
     ln.IdProduto = request.IdProduto;
     return(ln);
 }
Beispiel #2
0
        public ActionResult <Models.Response.VendaItemResponse> Alterar(int id, Models.Request.VendaItemRequest request)
        {
            try
            {
                Models.TbVendaItem ln = util.ParaTabela(request);
                buss.Alterar(id, ln);

                Models.Response.VendaItemResponse resp = util.ParaResponse(ln);
                return(resp);
            }
            catch (System.Exception ex)
            {
                return(BadRequest(
                           new Models.Response.ErroResponse(404, ex.Message)
                           ));
            }
        }