Esempio n. 1
0
 protected override void FixedUpdate()
 {
     base.FixedUpdate();
     if (CurrentAction.Equals(Action.ReadyAttack))
     {
         if (PermitMove)
         {
             ReadyAttacking();
         }
     }
 }
Esempio n. 2
0
        protected void imgNext_Click(object sender, ImageClickEventArgs e)
        {
            if (!EmailValidation())
            {
                return;
            }
            if (!UniqueUserNameValidation())
            {
                return;
            }
            try
            {
                CustomerId = SaveCustomer();
                CreateProspectCustomer();
            }
            catch (InvalidAddressException ex)
            {
                DisplayErrorMessage(ex.Message);
                return;
            }

            if (CustomerId > 0)
            {
                if (CurrentCustomer.EnableTexting && CurrentCustomer.IsSubscribed == null)
                {
                    var smsNotificaionModelFactory = IoC.Resolve <IPhoneNotificationModelsFactory>();
                    var notifier            = IoC.Resolve <INotifier>();
                    var smsNotificaionModel = smsNotificaionModelFactory.GetWellcomeSmsNotificationViewModel();
                    notifier.NotifyViaSms(NotificationTypeAlias.WellcomeSmsMessage, EmailTemplateAlias.WellcomeSmsMessage, smsNotificaionModel, CurrentCustomer.Id, CurrentCustomer.CustomerId, Request.Url.AbsolutePath);
                }
            }

            if (CurrentAction == null || !CurrentAction.Equals("Back"))
            {
                var notifier = IoC.Resolve <INotifier>();
                var emailNotificationModelsFactory = IoC.Resolve <IEmailNotificationModelsFactory>();
                var currentSession = IoC.Resolve <ISessionContext>().UserSession;

                if (AccountByEventId == null || AccountByEventId.SendWelcomeEmail)
                {
                    var welcomeEmailViewModel = emailNotificationModelsFactory.GetWelcomeWithUserNameNotificationModel(CurrentCustomer.UserLogin.UserName, CurrentCustomer.Name.FullName, CurrentCustomer.DateCreated);
                    notifier.NotifySubscribersViaEmail(NotificationTypeAlias.CustomerWelcomeEmailWithUsername, EmailTemplateAlias.CustomerWelcomeEmailWithUsername, welcomeEmailViewModel, CurrentCustomer.Id, currentSession.CurrentOrganizationRole.OrganizationRoleUserId, Request.Url.AbsolutePath);

                    if (CurrentCustomer.UserLogin != null && !CurrentCustomer.UserLogin.UserVerified)
                    {
                        var customerRegistrationService = IoC.Resolve <ICustomerRegistrationService>();
                        customerRegistrationService.SendResetPasswordMail(CurrentCustomer.Id, CurrentCustomer.Name.FullName, currentSession.CurrentOrganizationRole.OrganizationRoleUserId, Request.Url.AbsolutePath);
                    }
                }
            }
            long eventid = Convert.ToInt64(Request.QueryString["Eventid"]);

            //check for existing or new customer
            if (Request.QueryString["Eventid"] != null)
            {
                if (Request.QueryString["Customer"] != null)
                {
                    if (CustomerType == CustomerType.New)
                    {
                        RegistrationFlow.ProspectCustomerId = 0;
                        Response.RedirectUser("/App/Common/RegisterCustomer/SelectPackage.aspx?EventID=" + eventid + "&From=ECL&Customer=" + Request.QueryString["Customer"] + "&guid=" + GuId);
                    }
                    else if (CustomerType == CustomerType.Existing)
                    {
                        if (!EventValidation())
                        {
                            return;
                        }
                        Response.RedirectUser("/App/Common/RegisterCustomer/SelectPackage.aspx?Customer=Existing&EventID=" + eventid + "&guid=" + GuId);
                    }
                }
            }
            else if (Request.QueryString["Customer"] != null && CustomerType == CustomerType.Existing && Request.QueryString["Eventid"] == null)
            {
                Response.RedirectUser("RegCustomerSearchEvent.aspx?Customer=Existing" + "&guid=" + GuId);
            }
            else
            {
                RegistrationFlow.ProspectCustomerId = 0;
                Response.RedirectUser("RegCustomerSearchEvent.aspx?guid=" + GuId);
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SetDisplayControls();

            if (!IsPostBack)
            {
                if (RegistrationFlow != null)
                {
                    RegistrationFlow.SourceCodeId       = 0;
                    RegistrationFlow.SourceCode         = string.Empty;
                    RegistrationFlow.SourceCodeAmount   = 0;
                    RegistrationFlow.TestIds            = null;
                    RegistrationFlow.PackageId          = 0;
                    RegistrationFlow.AppointmentSlotIds = null;
                    RegistrationFlow.ShippingDetailId   = 0;
                    RegistrationFlow.ShippingOptionId   = 0;
                    RegistrationFlow.ShippingAddressId  = 0;
                    RegistrationFlow.ProductId          = 0;
                }

                FillSecurityQuestions();
                BindDropDownControls();
                if (CustomerType == CustomerType.New && CurrentAction != null && CurrentAction.Equals("Back"))
                {
                    isPageOpenedByBackClick.Value         = "true";
                    MarketingSourceDropDown.SelectedValue = CurrentCustomer.MarketingSource;
                }

                if (CurrentAction != null || CurrentProspectCustomer == null)
                {
                    SetCustomerDataToControls();
                    LogAudit(ModelType.View, customerLogEditModel, CustomerId);
                }
                else
                {
                    SetProspectCustomerDataToControls();
                    LogAudit(ModelType.View, prospectCustomerLogEditModel, CustomerId);
                }
                SetJavaScriptEvents();

                var callCenterDal    = new CallCenterDAL();
                var listScriptType   = callCenterDal.GetScriptType("Above 40", 2);
                var objAbove40Script = callCenterDal.GetScript(listScriptType[0].ScriptTypeID.ToString(), 4);
                if (objAbove40Script.Count > 0)
                {
                    bubbleContent.InnerText = objAbove40Script[0].ScriptText;
                }

                ViewState["RefferedUrl"] = Request.UrlReferrer.PathAndQuery;


                InsuranceIdContainer.Style.Add(HtmlTextWriterStyle.Display, "none");
                InsuranceIdRequiredHiddenField.Value = Boolean.FalseString;
                var settings = IoC.Resolve <ISettings>();
                if (settings.CaptureInsuranceId)
                {
                    if (EventData != null && EventData.CaptureInsuranceId)
                    {
                        InsuranceIdContainer.Style.Add(HtmlTextWriterStyle.Display, "block");
                        if (EventData.InsuranceIdRequired)
                        {
                            InsuranceIdRequiredHiddenField.Value = Boolean.TrueString;
                        }
                    }
                }
                SsnContainer.Style.Add(HtmlTextWriterStyle.Display, "none");
                if (EventId > 0)
                {
                    var captureSsn = EventRepository.CaptureSsn(EventId);
                    if (captureSsn)
                    {
                        SsnContainer.Style.Add(HtmlTextWriterStyle.Display, "block");
                    }
                }
            }
            HideUserCredentialPanel();

            var toolTipRepository = IoC.Resolve <IToolTipRepository>();
            var insuranceIdLabel  = toolTipRepository.GetToolTipContentByTag(ToolTipType.InsuranceIdLabel);

            insuranceIdLabel = string.IsNullOrEmpty(insuranceIdLabel) ? "Insurance Id" : (insuranceIdLabel);

            if (AccountByEventId != null && !string.IsNullOrEmpty(AccountByEventId.MemberIdLabel))
            {
                insuranceIdLabel = AccountByEventId.MemberIdLabel;
            }

            InsuranceIdLabel.InnerText = insuranceIdLabel;

            MedicareIdRequiredHiddenField.Value = Boolean.FalseString;

            if (EventId <= 0)
            {
                return;
            }

            var eventTestRepository = IoC.Resolve <EventTestRepository>();

            var eventTestList = eventTestRepository.GetTestsForEvent(EventId);

            MedicareIdRequiredHiddenField.Value = eventTestList != null && eventTestList.Any(x => x.TestId == (long)TestType.AWV) ? Boolean.TrueString : Boolean.FalseString;
        }