Beispiel #1
0
        public void TestListar()
        {
            string              estado = "P";
            DateTime            fecha  = DateTime.Now;
            ICollection <Cuota> LCuota = daoCuota.ListarMorosos(estado, fecha);

            Assert.NotNull(LCuota);
            Assert.Greater(LCuota.Count, 0);
        }
Beispiel #2
0
        public List <Cuota> ListarCuotaMorosas(string pPeriodo)
        {
            List <Cuota> lstCuota = new List <Cuota>();

            try
            {
                cuotaDAO = new CuotaDAO();

                /* LEER LA COLA DE MENSAJES Y GUARDAR EN BASE DE DATOS */
                string       rutaCola         = ConfigurationManager.AppSettings["DireccionMSQColas"].ToString(); // @".\private$\CondominioCola";
                MessageQueue cola             = new MessageQueue(rutaCola);
                int          cantidadMensajes = cola.GetAllMessages().Count();
                if (cantidadMensajes > 0)
                {
                    foreach (Message mensajeTodo in cola.GetAllMessages())
                    {
                        cola.Formatter = new XmlMessageFormatter(new Type[] { typeof(Cuota) });
                        Message mensaje   = cola.Receive();
                        Cuota   pagoCuota = (Cuota)mensaje.Body;

                        int cuotaRegistrado = -1;
                        cuotaRegistrado = cuotaDAO.PagarCuota(pagoCuota);
                    }
                }

                /* FIN LEER LA COLA DE MENSAJES Y GUARDAR EN BASE DE DATOS */

                lstCuota = cuotaDAO.ListarMorosos(pPeriodo);
            }
            catch (Exception exception)
            {
                throw new FaultException <RetornaMensaje>
                          (new RetornaMensaje
                {
                    Mensage     = string.Format(resMensajes.msjNoListado, "Cuota"),
                    CodigoError = exception.GetHashCode().ToString(),
                    Exito       = true
                }
                          , new FaultReason(exception.Message));
            }
            return(lstCuota);
        }
Beispiel #3
0
 public ICollection <Cuota> ConsultarMorosos(String cuotaEstado, DateTime cuotaFecha)
 {
     return(CuotaDAO.ListarMorosos(cuotaEstado, cuotaFecha));
 }