Summary description for CurrentAttendee
Пример #1
0
        public static bool Add(CurrentAttendee attendee)
        {
            attendee.EventID = NextEventId;

            var ctx = new ICCData();
            ctx.CurrentAttendees.InsertOnSubmit(attendee);
            ctx.SubmitChanges();

            return true;
        }
Пример #2
0
        public static bool SendConfirmationEmail(CurrentAttendee attendee)
        {
            bool returnValue = true;
            try
            {
                string enabled = ConfigurationManager.AppSettings["enableRegistrationConfirmation"];
                if (enabled != "1")
                {
                    return true;
                }

                string smtpServer = ConfigurationManager.AppSettings["smtpserver"];

                var client = new SmtpClient(smtpServer);
                client.Timeout = 60000;

                string messageFrom = ConfigurationManager.AppSettings["registrationEmailAddress"];

                var message = new MailMessage(messageFrom, attendee.Email);

                message.Subject = "Iowa Code Camp - Registration Confirmation";
                message.SubjectEncoding = Encoding.UTF8;

                var nextEvent = Event.GetNextEvent();

                message.Body = GetRegistrationConfirmationMessageTemplate();
                message.Body =
                    string.Format(
                        message.Body,
                        attendee.FirstName,
                        attendee.LastName,
                        nextEvent.EventName,
                        nextEvent.StartOn.ToHumanOrdinalized(),
                        messageFrom);
                message.BodyEncoding = Encoding.UTF8;
                message.IsBodyHtml = true;

                message.Priority = MailPriority.Normal;

                string smtpUser = ConfigurationManager.AppSettings["smtpuser"];
                string smtpPassword = ConfigurationManager.AppSettings["smtppassword"];

                var cred = new NetworkCredential(smtpUser, smtpPassword);

                client.Credentials = cred;
                string smtpSsl = ConfigurationManager.AppSettings["smtpssl"];
                client.EnableSsl = (smtpSsl == "1");

                client.Send(message);
            }
            catch { returnValue = false; }

            return returnValue;
        }
Пример #3
0
        public static bool Add(CurrentAttendee attendee)
        {
            attendee.EventID = NextEventId;

            var ctx = new ICCData();

            ctx.CurrentAttendees.InsertOnSubmit(attendee);
            ctx.SubmitChanges();

            return(true);
        }
Пример #4
0
 partial void DeleteCurrentAttendee(CurrentAttendee instance);
Пример #5
0
 partial void UpdateCurrentAttendee(CurrentAttendee instance);
Пример #6
0
 partial void InsertCurrentAttendee(CurrentAttendee instance);
Пример #7
0
		private void detach_CurrentAttendees(CurrentAttendee entity)
		{
			this.SendPropertyChanging();
			entity.Event = null;
		}