Exemple #1
0
        //*********************
        private Correo correoOfertante(string tenant, Subasta subasta, Oferta oferta)
        {
            Correo correo = new Correo();

            try
            {
                System.Diagnostics.Debug.WriteLine("Entro correo ofertante DAL");

                _idal = new DALUsuario();
                Usuario vendedor  = _idal.GetUsuario(tenant, subasta.id_Vendedor);
                Usuario comprador = _idal.GetUsuario(tenant, (int)oferta.id_Usuario);

                correo.destinatario = comprador.email;
                correo.asunto       = "Felicidades " + comprador.nick + ". Has ofertado el articulo " + subasta.titulo;
                correo.mensaje      = "Articulo : " + subasta.titulo + "Valor oferta " + oferta.Monto.ToString() + " Fecha : " + DateTime.Now.ToString() + System.Environment.NewLine + " Sitio " + tenant + "chebay.com";

                System.Diagnostics.Debug.WriteLine("Salgo correoComprador DAL");
            }
            catch (Exception)
            {
                throw;
            }

            return(correo);
        }
Exemple #2
0
        private Correo correoUltimoOfertante(string tenant, Subasta subasta, Oferta oferta, int id_ultimo)
        {
            Correo correo = new Correo();

            try
            {
                System.Diagnostics.Debug.WriteLine("Entro correo ultimo ofertante DAL");

                _idal = new DALUsuario();
                Usuario vendedor  = _idal.GetUsuario(tenant, id_ultimo);
                Usuario comprador = _idal.GetUsuario(tenant, (int)oferta.id_Usuario);

                correo.destinatario = comprador.email;
                correo.asunto       = "Lo siento  " + comprador.nick + ". Tu oferta en el articulo " + subasta.titulo + " ha sido superada.";
                correo.mensaje      = "Articulo : " + subasta.titulo + "Nueva oferta " + oferta.Monto.ToString() + " Fecha : " + DateTime.Now.ToString() + System.Environment.NewLine + " Sitio " + tenant + "chebay.com";

                System.Diagnostics.Debug.WriteLine("Salgo ultimo ofertante DAL");
            }
            catch (Exception)
            {
                throw;
            }

            return(correo);
        }