public void WhenIAddRegistrantToEvent(string registrant, string eventName, Table registrations)
        {
            try
            {
                registrant += uniqueStamp;                   // the unique stamp is a series of numbers to keep names different from each other
                eventName  += uniqueStamp;                   // the unique stamp is a series of numbers to keep names different from each other
                BBCRMHomePage.OpenEventsFA();                // open event functional area
                Panel.CollapseSection("Event calendar", "CalendarViewForm");
                EventsFunctionalArea.EventSearch(eventName); // search for an event
                EventPanel.AddRegistrant();
                RegistrantDialog.SetRegistrant(registrant);

                foreach (var registrantRow in registrations.Rows)  // find all the registrants in the table
                {
                    if (registrantRow.ContainsKey("Registrant") && !string.IsNullOrEmpty(registrantRow["Registrant"]) &&
                        registrantRow["Registrant"] != "(Unnamed guest)")
                    {
                        registrantRow["Registrant"] += uniqueStamp;                                                        // the unique stamp is a series of numbers to keep names different from each other
                    }
                }

                RegistrantDialog.SetRegistrants(registrations);
                Dialog.Save();
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not add a registrant to an event. " + ex.Message);
            }
        }
示例#2
0
        public void WhenIAddRegistrantToEvent(string registrant, string eventName, Table registrations)
        {
            registrant += uniqueStamp;
            eventName  += uniqueStamp;
            BBCRMHomePage.OpenEventsFA();
            EventsFunctionalArea.EventSearch(eventName);
            EventPanel.AddRegistrant();
            RegistrantDialog.SetRegistrant(registrant);

            foreach (var registrantRow in registrations.Rows)
            {
                if (registrantRow.ContainsKey("Registrant") && !string.IsNullOrEmpty(registrantRow["Registrant"]) &&
                    registrantRow["Registrant"] != "(Unnamed guest)")
                {
                    registrantRow["Registrant"] += uniqueStamp;
                }
            }

            RegistrantDialog.SetRegistrants(registrations);
            Dialog.Save();
        }