CalendarGetSimpleBytes Method |
Namespace: SIC.File
public static byte[] GetSimpleBytes( string pSubject, string pDescription, DateTime pBeginDate, DateTime pEndDate, string pLocation = "" )
[Missing <returns> documentation for "M:SIC.File.Calendar.GetSimpleBytes(System.String,System.String,System.DateTime,System.DateTime,System.String)"]
//* create iCal content * byte[] liCalContent = SIC.File.Calendar.GetSimpleBytes(lObject, lBody, (System.DateTime)pTicket.DueDate, (System.DateTime)pTicket.DueDate); //* definition MIME type * System.Net.Mime.ContentType lMimeType = new System.Net.Mime.ContentType("text/calendar; method=REQUEST"); //* declaration attachments list and attachment object * List<System.Net.Mail.Attachment> lAttachments = new List<System.Net.Mail.Attachment>(); System.Net.Mail.Attachment lAttachment; //* create attachment and added to attachment list * lAttachment = new System.Net.Mail.Attachment(new System.IO.MemoryStream(liCalContent), lMimeType); lAttachment.Name = "Ticket_" + Guid.NewGuid().ToString() + ".ics"; lAttachments.Add(lAttachment);