public ManagerSiteManager()
 {
     this._accountMgr = new AccountManager();
     this._dashboardMgr = new DashboardManager();
     this.BibNumberTool = new BibNumberingToolManager();
     this._getStartedMgr = new GetStartedManager();
     this._createNewMgr = new CreateNewManager();
     this.SearchMgr = new SearchManager();
 }
        public void ChangeBibNumberingOption(BibNumberingToolManager.AssignNumberToMember which, IEnumerable<BibNumberingToolManager.TeamWithRegTypes> teams)
        {
            //step 2
            //Select Bib Numbering Tool from the Event Details dashboard, Additional Functions
            //that means this should be up: https://activeeuropebeta.regonline.com/builder/dialogs/BibTool.aspx?
            this.DashboardMgr.ClickOption(DashboardManager.EventAdditionalFunction.BibNumberingTool);
            this.SelectBibNumberWindow();

            //step 3
            //[Enter starting bib number for some of the reg types and leave some blank to use the default number: this is done for you.]
            int zeroBasedSequenceOfRegTypes = 0;

            foreach (BibNumberingToolManager.TeamWithRegTypes team in teams)
            {
                if (team.StartingNumber > -1)
                {
                    this.BibNumberTool.SetStartingNumber(zeroBasedSequenceOfRegTypes, team.StartingNumber);
                }

                zeroBasedSequenceOfRegTypes++;
            }

            this.BibNumberTool.SetStartingNumberDefault(101);

            //Select the option to assign everyone a unique number, click assign and then exit
            this.BibNumberTool.SetTeamNumbers(which);

            //if there are any registrants with bib numbers, this is where we need to hit the prompt btnOK

            this.BibNumberTool.SaveAndClose();
            UIUtil.DefaultProvider.SelectOriginalWindow();
        }
        private int Register(BibNumberingToolManager.TeamWithRegTypes rt)
        {
            RegisterMgr.OpenRegisterPage(eventId);
            this.email = "this" + DateTime.Now.Ticks.ToString() + "@isatest.com";
            RegisterMgr.CheckinWithEmail(this.email);

            if (rt != null)
            {
                RegisterMgr.SelectRegType(rt.RegistantTypeName);
            }

            // Go to PI page
            RegisterMgr.Continue();
            RegisterMgr.EnterProfileInfoEnduranceNew();

            if (rt != null)
            {
                if (rt.CollectTeamName)
                    RegisterMgr.TypePersonalInfoEnduranceTeamName("team " + DateTime.Now.Ticks.ToString());//one per group
            }

            // Go to checkout page
            RegisterMgr.Continue();

            //no payment... just a waiver
            RegisterMgr.ClickCheckoutActiveWaiver();
            RegisterMgr.FinishRegistration();

            return Convert.ToInt32(
                RegisterMgr.GetConfirmationPageValueForPrimaryAttendee(RegisterManager.ConfirmationPageField.RegistrationId));
        }
        private void RegisterGroup(BibNumberingToolManager.TeamWithRegTypes rt, int followerCount)
        {
            RegisterMgr.OpenRegisterPage();
            RegisterMgr.Checkin();
            if (rt != null)
            {
                RegisterMgr.SelectRegType(rt.RegistantTypeName);
            }
            this.grouperEmail = RegisterMgr.CurrentEmail;
            RegisterMgr.Continue();
            RegisterMgr.EnterProfileInfoEnduranceNew();

            if (rt != null)
            {
                if (rt.CollectTeamName)
                {
                    this.teamName = "team " + DateTime.Now.Ticks.ToString();
                    RegisterMgr.TypePersonalInfoEnduranceTeamName(this.teamName);//one per group
                }
            }

            RegisterMgr.CurrentRegistrationId = RegisterMgr.GetRegIdFromSession();
            this.registrantId = RegisterMgr.GetRegIdFromSession();

            RegisterMgr.Continue();

            for (int i = 1; i < followerCount; i++)
            {
                string emailAddressTwo = string.Empty;
                int registerIDTwo = RegisterManager.InvalidId;

                if (rt != null)
                {
                    this.AddAnotherPerson(rt.RegistantTypeName, ref emailAddressTwo, ref registerIDTwo);
                }
                else
                {
                    this.AddAnotherPerson(null, ref emailAddressTwo, ref registerIDTwo);
                }
            }

            RegisterMgr.ClickCheckoutActiveWaiver();
            RegisterMgr.FinishRegistration();

            RegisterMgr.CurrentEmail = this.grouperEmail;
        }
        private void ChangeBibSetting(BibNumberingToolManager.AssignNumberToMember assignMethod)
        {
            ManagerSiteMgr.DashboardMgr.ClickOption(DashboardManager.EventAdditionalFunction.BibNumberingTool);
            ManagerSiteMgr.SelectBibNumberWindow();
            ManagerSiteMgr.BibNumberTool.SetTeamNumbers(assignMethod);
            ManagerSiteMgr.BibNumberTool.SaveAndClose(true);

            ManagerSiteMgr.DashboardMgr.ClickOption(DashboardManager.EventRegistrationFunction.DeleteTestRegistrations);
            ManagerSiteMgr.DashboardMgr.DeleteTestReg_ClickDelete();
        }