Beispiel #1
0
        public ActionResult <Respuesta <AbonoViewModel> > Guardar(AbonoInputModel AbonoInput)
        {
            Abono Abono    = MapearAbono(AbonoInput);
            var   peticion = _servicioAbono.Guardar(Abono);

            return(Ok(peticion));
        }
Beispiel #2
0
        private Abono MapearPersona(AbonoInputModel abonoInput)
        {
            var abono = new Abono
            {
                Fecha      = abonoInput.Fecha,
                ValorAbono = abonoInput.ValorAbono,
                Idabono    = abonoInput.Idabono,
            };

            return(abono);
        }
Beispiel #3
0
        public ActionResult <AbonoViewModel> Post(AbonoInputModel abonoInput)
        {
            Abono abono    = MapearPersona(abonoInput);
            var   response = _abonoService.Guardar(abono);

            if (response.Error)
            {
                return(BadRequest(response.Mensaje));
            }
            return(Ok(response.Abono));
        }
Beispiel #4
0
        private Abono MapearAbono(AbonoInputModel AbonoInput)
        {
            Abono Abono = new Abono
            {
                CreditoId  = AbonoInput.CreditoId,
                ValorAbono = AbonoInput.ValorAbono,
                Fecha      = DateTime.Now,
            };

            return(Abono);
        }