public IActionResult FaturaPedido(string numero, string loja) { var service = new PedidoVendaService(this.db, this.configuration); try { return(Ok(service.FaturaPedido(numero, loja))); } catch (Exception ex) { ModelState.AddModelError(string.Empty, ex.Message); return(BadRequest(ModelState)); } }
public IActionResult GetDadosCarne(string numero, string loja) { var service = new PedidoVendaService(this.db, this.configuration); try { return(Ok(service.GetDadosCarne(numero, loja))); } catch (Exception ex) { ModelState.AddModelError(ex.Message, ex.StackTrace); return(BadRequest(ModelState)); } }
public PedidoVendaController(DataContext db, IConfiguration configuration) { this.db = db; this.configuration = configuration; this.pedidoVendaService = new PedidoVendaService(db, configuration); }