コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public async Task <RetornoProcedureDto> AddCajaMovimiento(CajaMovimientoRequest dto)
        {
            try
            {
                RetornoProcedureDto retorno = new RetornoProcedureDto();
                retorno = await _storeProcedure.XportsCajaMovimientoInsert(new LineaMovimientoRepositoryDto()
                {
                    uidcompany        = dto.uidcompany,
                    uidFormaPago      = dto.uidFormaPago,
                    uidRecibos        = dto.uidRecibos,
                    uidUser           = dto.uidUser,
                    uidTipoMovimiento = dto.uidTipoMovimiento
                });

                return(retorno);
            }
            catch (CError e)
            {
                throw _errorManager.AddError("AddRecibos", "AddRecibos", e, MethodBase.GetCurrentMethod(), null);
            }
            catch (System.Exception ex)
            {
                throw _errorManager.AddError("Error Generico", "AddRecibos", ex, MethodBase.GetCurrentMethod(), null);
            }
        }
コード例 #2
0
        public async Task <IActionResult> AddCajaMovimiento([FromBody] CajaMovimientoRequest request)
        {
            try
            {
                ValidationModel validationModel = new ValidationModel();
                var             retorno         = await _recibosSrv.AddCajaMovimiento(request);

                if (retorno.berror)
                {
                    validationModel.ValidationResults.Add(new ValidationResult("-1", new[] { retorno.msjError }));
                    return(new BadRequestObjectResult(validationModel));
                }
                else
                {
                    return(Ok(new ApiOkResponse("OK")));
                }
            }
            catch (CError ce)
            {
                throw ce;
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }