示例#1
0
        public int IngresarPrestamo(Prestamos prestamo)
        {
            string validacion = Reglas(prestamo);

            if (!string.IsNullOrEmpty(validacion))
            {
                throw new PrestamosException(validacion);
            }
            else
            {
                TransactionResult resultado = PrestamosMapper.Insert(prestamo);
                if (resultado.IsOk)
                {
                    RecargarListas();
                    return(resultado.Id);
                }
                else
                {
                    throw new PrestamosException(resultado.Error);
                }
            }
        }
示例#2
0
 private void RecargarListas()
 {
     _lstTipoPrestamos = LineaPrestamosMapper.GetLineaPrestamos();
     _lstPrestamos     = PrestamosMapper.GetPrestamos();
 }
示例#3
0
 private void RecargarLista()
 {
     _lstPrestamo = PrestamosMapper.TraerPrestamos();
 }