示例#1
0
        private static void SaveTalkInterest(RegistrationInformation registration)
        {
            var registrantID = DATABASE
                               .Registrants.Single(reg => reg.FirstName == registration.FirstName && reg.LastName == registration.LastName).ID;

            var talkInterests = (from talk in registration.ChosenTalks
                                 where talk.Chosen
                                 select new TalkInterest
            {
                InterestedRegistrantID = registrantID,
                TalkID = talk.TalkID,
                UpdateTime = DateTime.Now,
                DiagnosticInformation = new StackTrace().ToString()
            }).ToList();

            DATABASE.TalkInterest.InsertAllOnSubmit(talkInterests);

            DATABASE.SubmitChanges();
        }
示例#2
0
        /// <summary>
        /// Save the given Registration Information to the database
        /// </summary>
        /// <param name="registration">RegistrationInformation record to save</param>
        public static void SaveRegistration(RegistrationInformation registration)
        {
            SaveRegistrant(registration);

            SaveTalkInterest(registration);
        }