示例#1
0
        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));
            }
        }
示例#2
0
        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));
            }
        }
示例#3
0
 public PedidoVendaController(DataContext db, IConfiguration configuration)
 {
     this.db                 = db;
     this.configuration      = configuration;
     this.pedidoVendaService = new PedidoVendaService(db, configuration);
 }