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); } }
public void GuardarInteresado(Interesado interesado) { try { InteresadoDAO.CrearInteresado(interesado); } catch (Exception) { throw; } }
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); }
public Interesado[] GetInteresados() { try { return(InteresadoDAO.GetInteresados().ToArray()); } catch (Exception ex) { throw ex; } }
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) { } }