Example #1
0
        public void NotificarSobreInteresado(Inmueble inmueble, decimal cotizacion)
        {
            if (!inmueble.Disponible)
            {
                return;
            }

            if (cotizacion == 0)
            {
                cotizacion = GetDolar();
            }

            try
            {
                List <Interesado> interesados = InteresadoDAO.GetInteresadosParaInmueble(inmueble, cotizacion);
                if (interesados.Count > 0)
                {
                    EmailHelper.SendInteresadosInEmail(interesados, inmueble);
                }
            }
            catch (Exception ex)
            {
                EmailHelper.EnviarNotificacion(ex);
            }
        }
Example #2
0
 public void GuardarInteresado(Interesado interesado)
 {
     try
     {
         InteresadoDAO.CrearInteresado(interesado);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #3
0
        public void Test3(int interesadoId)
        {
            List <Interesado> interesados = new List <InmobiliariaService.Interesado>();

            interesados = InteresadoDAO.GetInteresados();
            Interesado interesado = interesados.Find(XmlAttribute => XmlAttribute.Id == interesadoId);

            decimal cotizacion = GetDolar();

            GetInmueblesParaInteresado(interesado, cotizacion);
        }
Example #4
0
 public Interesado[] GetInteresados()
 {
     try
     {
         return(InteresadoDAO.GetInteresados().ToArray());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #5
0
 public void TestNotificarSobreInmueble()
 {
     try
     {
         //Este metodo es para probar el envio de los inmuebles
         List <Interesado> interesados = InteresadoDAO.GetInteresados();
         Interesado        interesado  = interesados.Find(x => x.Nombre == " Lorena");
         NotificarSobreInmueble(interesado, GetDolar());
     }
     catch (Exception ex)
     {
     }
 }