Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public static string Make(AppointmentInfo info)
        {
            string templateName = GetTemplateName(info);

            string content = GetSendAppointmentTemplate(templateName);

            content = ReplaceData(content, info);

            if (info.Alert != null)
            {
                content = ReplaceData(content, info.Alert);
            }

            return(content);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Reperimento template ics da utilizzare in base al tipo dell'appuntamenot
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        private static string GetTemplateName(AppointmentInfo info)
        {
            string templateName = string.Empty;

            if (info.Alert != null)
            {
                templateName = typeof(Appointment).Namespace + ".Templates." + SEND_APPOINTMENT_DISPLAY_ALERT;
            }
            else
            {
                templateName = typeof(Appointment).Namespace + ".Templates." + SEND_APPOINTMENT;
            }

            return(templateName);
        }