Exemplo n.º 1
0
        public async Task <IActionResult> OpOut([FromRoute] Guid uid, [FromBody] invops_out varinvops_out)
        {
            TerminalMessage result = new TerminalMessage();

            result.message = await _terminalService.Operation_out(uid, varinvops_out);

            return(Ok(result));
        }
Exemplo n.º 2
0
        //[AllowAnonymous]
        public async Task <IActionResult> Postinvops_out([FromBody] invops_out varinvops_out)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            string result = "";

            var uid = User.GetUserId();

            result = await _terminalService.Operation_out(uid, varinvops_out);

            if (result == "OK")
            {
                return(CreatedAtAction("Getinvops_out", new { id = varinvops_out.invops_outId }, varinvops_out));
            }
            else
            {
                return(BadRequest(result));
            }
        }