// GET: Registration
        public ActionResult Index()
        {
            List <Attendee> attendees = new List <Attendee>();
            UserContext     uc        = new UserContext();

            uc.ConnectionString = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;
            attendees           = UnityCache.ResolveDefault <IRegistrationManager>().GetAllAttendees(uc).ToList();
            return(View(attendees));
        }
Beispiel #2
0
        public void ProcessRegistration(UserContext userContext, ICollection <Attendee> attendees)
        {
            Registration    returnRegistration    = new Registration();
            List <Attendee> registrationAttendees = new List <Attendee>(UnityCache.ResolveDefault <IRegistrationEngine>().ProcessAttendees(userContext, attendees));


            Registration newReg = new Registration();

            newReg.Attendees = registrationAttendees;

            UnityCache.ResolveDefault <IRegistrationAccessor>().AddRegistration(userContext, newReg);
        }
        public ActionResult Create(List <Attendee> attendees)
        {
            IRegistrationManager regManager = UnityCache.ResolveDefault <IRegistrationManager>();
            UserContext          uc         = new UserContext();

            uc.AuditUserName = "******";

            uc.ConnectionString = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;
            var reg = regManager.ProcessRegistration(uc, attendees);

            return(View());
        }
        public ActionResult Create(Attendee attendee)
        {
            List <Attendee> attendees = new List <Attendee>();

            attendees.Add(attendee);
            IRegistrationManager regManager = UnityCache.ResolveDefault <IRegistrationManager>();
            UserContext          uc         = new UserContext();

            uc.ConnectionString = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;
            regManager.ProcessRegistration(uc, attendees);
            return(View());
        }
Beispiel #5
0
        public ICollection <Attendee> ProcessAttendees(UserContext userContext, ICollection <Attendee> attendees)
        {
            List <Attendee> registrationAttendees = new List <Attendee>();

            foreach (Attendee attendee in attendees)
            {
                Attendee CheckedAttendee = new Attendee();
                CheckedAttendee = UnityCache.ResolveDefault <IRegistrationAccessor>().FindAttendee(userContext, attendee);

                registrationAttendees.Add(CheckedAttendee);
            }

            return(registrationAttendees);
        }
        public ICollection <Attendee> ProcessAttendees(UserContext userContext, ICollection <Attendee> attendees)
        {
            List <Attendee> registrationAttendees = new List <Attendee>();

            foreach (Attendee a in attendees)
            {
                if (a.Id == null)
                {
                    registrationAttendees.Add(UnityCache.ResolveDefault <IAttendeeAccessor>().AddAttendee(userContext, a));
                }
                else
                {
                    registrationAttendees.Add(a);
                }
            }

            return(registrationAttendees);
        }
Beispiel #7
0
 public ICollection <Attendee> GetAllAttendees(UserContext uc)
 {
     return(UnityCache.ResolveDefault <IRegistrationAccessor>().GetAllAttendees(uc));
 }
        ICollection <Registration> IRegistrationManager.ProcessRegistration(UserContext userContext, ICollection <Attendee> attendees)
        {
            ICollection <Attendee> CheckedAttendees = UnityCache.ResolveDefault <IRegistrationEngine>().ProcessAttendees(userContext, attendees);

            return(UnityCache.ResolveDefault <IRegistrationAccessor>().AddRegistration(userContext, CheckedAttendees));
        }