示例#1
0
        protected void mensajeOper(int codigo, string id_solicitud)
        {
            Usuario musuario = new UsuarioBC().GetUsuario((string)(Session["usrname"]));
            MailBCA mBCA     = new MailBCABC().getMailbycodigo(codigo);
            string  ccopia   = mBCA.Ccopy;

            string[]      body    = mBCA.Body.Split('.');
            Mail.Mail     mail    = new Mail.Mail();
            StringBuilder strBody = new StringBuilder();

            strBody.Append("<html><head><title>Correo Automatico</title><body>");
            strBody.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
            strBody.Append("<tr><td>");
            foreach (string item in body)
            {
                strBody.AppendLine("<br/>");
                strBody.AppendLine(item);
            }
            strBody.AppendLine("");

            strBody.Append("</td></tr>");
            strBody.Append("<tr><td>");
            strBody.AppendLine("<br/>");
            strBody.AppendLine("Atte.,");
            strBody.AppendLine("<br/>");
            strBody.AppendLine(mBCA.Firma);
            strBody.Append("</td></tr><tr><td>");
            strBody.Append("<IMG SRC=" + "http://190.196.121.53/imagenes/firmaCA.jpg" + ">");
            strBody.Append("</td></tr></table>");
            strBody.Append("</body></html>");

            mail.SendMail(musuario.Correo, mBCA.Ccopy, mBCA.Subject.Replace("NOperacion", id_solicitud), strBody.ToString().Replace("NOperacion", id_solicitud));
        }
示例#2
0
        protected void mensajeOper(int codigo, string id_solicitud)
        {
            MailBCA   mBCA   = new MailBCABC().getMailbycodigo(codigo);
            Operacion op     = new OperacionBC().getoperacion(Convert.ToInt32(id_solicitud));
            string    ccopia = mBCA.Ccopy;

            Agenda agn = new AgendaBC().getAgenda(Convert.ToInt32(id_solicitud));

            //Usuario eject = new UsuarioBC().GetUsuario(agn.Ejecutivo);

            Persona pers = new PersonaBC().getpersonabyrut(agn.Rut_persona);

            string[]      body    = mBCA.Body.Split('.');
            Mail.Mail     mail    = new Mail.Mail();
            StringBuilder strBody = new StringBuilder();

            strBody.Append("<html><head><title>Correo Automatico</title><body>");
            strBody.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
            strBody.Append("<tr><td>");
            foreach (string item in body)
            {
                strBody.AppendLine("<br/>");
                strBody.AppendLine(item);
            }
            strBody.AppendLine("<br/>");
            strBody.AppendLine("Se Frimaron los siguientes Creditos");
            strBody.AppendLine("<br/>");
            strBody.AppendLine("<table whidth=\"70px\">");
            foreach (GridViewRow row in grdCreditos.Rows)
            {
                string idref;
                string idinterno;
                idref     = row.Cells[0].Text;
                idinterno = row.Cells[1].Text;
                CheckBox chkF = (CheckBox)row.Cells[2].FindControl("chkfirma");

                if (chkF.Checked)
                {
                    strBody.Append("<tr><td aling=\"Center\">");
                    strBody.AppendLine(idinterno);
                    strBody.Append("</td></tr>");
                }
            }
            strBody.AppendLine("</table>");
            strBody.Append("</td></tr>");
            strBody.Append("<tr><td>");
            strBody.AppendLine("<br/>");
            strBody.AppendLine("Atte.,");
            strBody.AppendLine("<br/>");
            strBody.AppendLine(mBCA.Firma);
            strBody.Append("</td></tr><tr><td>");
            strBody.Append("<IMG SRC=" + "http://190.196.121.53/imagenes/firmaCA.jpg" + ">");
            strBody.Append("</td></tr></table>");
            strBody.Append("</body></html>");
            //op.Usuario.Correo
            mail.SendMail(op.Usuario.Correo, mBCA.Ccopy, mBCA.Subject.Replace("NOperacion", id_solicitud), strBody.ToString().Replace("NOperacion", id_solicitud).Replace("NombreCliente", pers.Nombre + " " + pers.Apellido_paterno + " " + pers.Apellido_materno));
        }
示例#3
0
        protected void mensajeOper(int codigo, string id_solicitud)
        {
            Usuario musuario = new UsuarioBC().GetUsuario((string)(Session["usrname"]));
            MailBCA mBCA     = new MailBCABC().getMailbycodigo(codigo);

            EstadoOperacion mobservacion      = new EstadooperacionBC().getEstadobycodigoestado(Convert.ToInt32(id_solicitud), 123);
            Usuario         musuarioComercial = new UsuarioBC().GetUsuario(cbo_EjeCom.SelectedValue);


            string ccopia = mBCA.Ccopy;

            if (codigo == 4)
            {
                ccopia = ccopia + ";" + musuarioComercial.Correo;
            }


            string[]      body    = mBCA.Body.Split('.');
            Mail.Mail     mail    = new Mail.Mail();
            StringBuilder strBody = new StringBuilder();

            strBody.Append("<html><head><title>Correo Automatico</title><body>");
            strBody.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
            strBody.Append("<tr><td>");
            foreach (string item in body)
            {
                strBody.AppendLine("<br/>");
                strBody.AppendLine(item.Replace("XX:XX", lbl_hora.Text));
            }
            strBody.Append("<tr><td>");
            strBody.AppendLine("OBS.: " + mobservacion.Observacion);
            strBody.Append("</td></tr>");
            strBody.AppendLine("");

            strBody.Append("</td></tr>");
            strBody.Append("<tr><td>");
            strBody.AppendLine("<br/>");
            strBody.AppendLine("Atte.,");
            strBody.AppendLine("<br/>");
            strBody.AppendLine(mBCA.Firma);
            strBody.Append("</td></tr><tr><td>");
            strBody.Append("<IMG SRC=" + "http://190.196.121.53/imagenes/firmaCA.jpg" + ">");
            strBody.Append("</td></tr></table>");
            strBody.Append("</body></html>");

            mail.SendMail(musuario.Correo, mBCA.Ccopy, mBCA.Subject.Replace("NOperacion", id_solicitud), strBody.ToString().Replace("XX:XX", lbl_hora.Text).Replace("NOperacion", id_solicitud));
        }