Beispiel #1
0
        public RespuestaTotalLiquidaciones TotalLiquidacionesTipo(string tipo)
        {
            RespuestaTotalLiquidaciones respuesta = new RespuestaTotalLiquidaciones();

            try
            {
                respuesta.Liquidacion = liquidacionRepository.TotalLiquidacionesTipo(tipo);
                respuesta.Mensaje     = "Se ha contado correctamente";
                return(respuesta);
            }
            catch (Exception e)
            {
                respuesta.Mensaje = "Error en el archivo" + e.Message;
                return(respuesta);
            }
        }
Beispiel #2
0
        public RespuestaTotalLiquidaciones TotalLiquidaciones()
        {
            RespuestaTotalLiquidaciones respuesta = new RespuestaTotalLiquidaciones();

            try
            {
                respuesta.Liquidacion = liquidacionRepository.TotalLiquidaciones();
                if (respuesta.Liquidacion == 0)
                {
                    respuesta.Mensaje = "No hay datos a consultar";
                }
                else
                {
                    respuesta.Mensaje = "Se ha calculado correctamente";
                }
                return(respuesta);
            }
            catch (Exception e)
            {
                respuesta.Mensaje = "Error en el archivo" + e.Message;
                return(respuesta);
            }
        }