diff --git a/OI/ConvocatoriaDetalle.aspx b/OI/ConvocatoriaDetalle.aspx index 503d5a1b1..e84b2f622 100644 --- a/OI/ConvocatoriaDetalle.aspx +++ b/OI/ConvocatoriaDetalle.aspx @@ -13,7 +13,7 @@ tr[hide="1"] { display: none; - background-color: rgb(4,71,103); + background-color: rgb(4,71,103) } .portlet { @@ -180,24 +180,6 @@ -
-
-
- - - - <%----%> - -
-
-
-
- - - -
-
-
@@ -217,13 +199,26 @@
+
+ + + +
<%----%>
- +
+
+ + + + <%----%> + +
+
"); StrMail.Append(""); - return StrMail.ToString(); - } - private void enviarConvocatoria(int RCveEvento) - { - string Body; - Body = MailgetBodyConvocatoria(RCveEvento); + #endregion + + + + Body = StrMail.ToString();//MailgetBodyConvocatoria(RCveEvento); string ArrayCC = ""; //ViewState("Para") = GlobalDTUsuarios(CveUsuarioIng)(0)("correo").ToString; //ViewState("Asunto") = string.Format("SIG - Minuta {0}", TxtAsunto.Text); @@ -728,7 +735,11 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas } List LSRutasMail = new List(); ClsSisMail.ArchivoMail mailfile = new ClsSisMail.ArchivoMail { Ruta = string.Format("{0}Imagenes\\Bell.png", ModExtensiones.DirectorioBaseEmpresas), NombreArchivo = "Bell.png" }; - LSRutasMail.Add(mailfile); + LSRutasMail.Add(mailfile); + ICString = GenerateIcsContent(string.Format("{0:yyyy/MM/dd} 00:00", txtFechaI.Text.ToDateTime()).ToDateTime(), string.Format("{0:yyyy/MM/dd} 23:59", txtFechaI.Text.ToDateTime()).ToDateTime(), + UsuarioDe, CorreoRegistro, TxtLugar.Text, Asunto,Descripcion,string.Format("Convocatoria_{0}",RCveEvento) ); + ClsSisMail.ArchivoMail ICSFile = new ClsSisMail.ArchivoMail { Ruta = "",ArchivoBinario= Encoding.ASCII.GetBytes(ICString), NombreArchivo = "Agendar.ics" }; + LSRutasMail.Add(ICSFile); ClsSisMail.ArchivoMail itemMail = new ClsSisMail.ArchivoMail(); @@ -742,31 +753,44 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas } - public string GenerateIcsContent(DateTime dateStart, - DateTime dateEnd, string email, string location, - string summary, string description) + public string GenerateIcsContent(DateTime FechaInicio, DateTime FechaFin, string Nombreorganizador, string Correoorganizador, string Ubicacion, string Asunto, string descripcion, string uuid) { - string DateFormat = "yyyyMMddTHHmmssZ"; - var s = dateStart.ToUniversalTime().ToString(DateFormat); - var e = dateEnd.ToUniversalTime().ToString(DateFormat); - var iCal = string.Format(@"BEGIN:VCALENDAR -VERSION:2.0 -METHOD:PUBLISH -BEGIN:VEVENT -ORGANIZER:MAILTO:{0} -DTSTART:{1} -DTEND:{2} -LOCATION:{3} -UID:{4} -DTSTAMP:{4} -SUMMARY:{5} -DESCRIPTION:{6} -PRIORITY:5 -CLASS:PUBLIC -END:VEVENT -END:VCALENDAR", email, s, e, location, - DateTime.Now.ToUniversalTime().ToString(DateFormat), - summary, description); - return iCal; + var DTSTART = FechaInicio.ToUniversalTime().ToString("yyyyMMddTHHmmssZ"); + var DTEND = FechaFin.ToUniversalTime().ToString("yyyyMMddTHHmmssZ"); + + /* + BEGIN:VCALENDAR + VERSION:2.0 + PRODID:-//hacksw/handcal//NONSGML v1.0//EN + BEGIN:VEVENT + UID:uid1@example.com + DTSTAMP:19970714T170000Z + ORGANIZER;CN=John Doe:MAILTO:john.doe@example.com + DTSTART:19970714T170000Z + DTEND:19970715T035959Z + SUMMARY:Bastille Day Party + END:VEVENT + END:VCALENDAR + */ + StringBuilder strICS = new StringBuilder(); + strICS.AppendLine("BEGIN:VCALENDAR"); + strICS.AppendLine("VERSION:2.0"); + strICS.AppendLine("METHOD:PUBLISH"); + strICS.AppendLine("BEGIN:VEVENT"); + strICS.AppendLine(string.Format("ORGANIZER;CN={0}:MAILTO:{1}", Nombreorganizador.Replace(":", "").Replace(";", ""), Correoorganizador)); + strICS.AppendLine(string.Format("DTSTART:{0}", DTSTART)); + strICS.AppendLine(string.Format("DTEND:{0}", DTEND)); + strICS.AppendLine(string.Format("LOCATION:{0}", Ubicacion)); + strICS.AppendLine(string.Format("UID:{0}", uuid)); + strICS.AppendLine(string.Format("DTSTAMP:{0}", DateTime.Now.ToUniversalTime().ToString("yyyyMMddTHHmmssZ"))); + strICS.AppendLine(string.Format("SUMMARY:{0}", Asunto)); + strICS.AppendLine(string.Format("DESCRIPTION:{0}", descripcion)); + strICS.AppendLine("PRIORITY:5"); + strICS.AppendLine("CLASS:PUBLIC"); + strICS.AppendLine("END:VEVENT"); + strICS.AppendLine("END:VCALENDAR"); + return strICS.ToString(); } + + } \ No newline at end of file diff --git a/OI/DocumentoDetalle.aspx b/OI/DocumentoDetalle.aspx index cf04e8a79..f7b4ca4d8 100644 --- a/OI/DocumentoDetalle.aspx +++ b/OI/DocumentoDetalle.aspx @@ -164,7 +164,7 @@
- +