Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Util.Validations.RegisterZipScriptBlock(Page.ClientScript, this.GetType(),
                                                CountryDropDownList.ClientID);

        if (!Page.IsPostBack)
        {
            // Get the common web service instance.

            ServiceAccess serviceLoader = ServiceAccess.GetInstance();
            CommonService.CommonService commonService = serviceLoader.GetCommon();

            // Get the list of contries and populate.
            IList <CommonService.CountryInfo> countries = commonService.GetCountries();

            CountryDropDownList.DataSource     = countries;
            CountryDropDownList.DataValueField = "CountryId";
            CountryDropDownList.DataTextField  = "Name";
            CountryDropDownList.DataBind();

            CountryDropDownList.Items.FindByText("United States").Selected = true;
            CountryDropDownList_SelectedIndexChanged(CountryDropDownList, new EventArgs());

            if (Session["loginInfo"] != null && Session["loginInfo"] != "")
            {
                InitializeValuesFromSession();
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Util.Validations.RegisterZipScriptBlock(Page.ClientScript, this.GetType(),
                                                CountryDropDownList.ClientID);
        //testpath.Text = Request.PhysicalPath.Replace("AgentRegistration.aspx","Members");
        if (!Page.IsPostBack)
        {
            try
            {
                // Get the common web service instance.

                ServiceAccess serviceLoader = ServiceAccess.GetInstance();
                CommonService.CommonService commonService = serviceLoader.GetCommon();

                // Get the list of contries and populate.
                IList <CommonService.CountryInfo> countries = commonService.GetCountries();

                CountryDropDownList.DataSource     = countries;
                CountryDropDownList.DataValueField = "CountryId";
                CountryDropDownList.DataTextField  = "Name";
                CountryDropDownList.DataBind();

                CountryDropDownList.Items.FindByText("United States").Selected = true;
                CountryDropDownList_SelectedIndexChanged(CountryDropDownList, new EventArgs());

                // Get the list of secret questions and populate.
                IList <CommonService.LookupInfo> secretQuestions = commonService.GetLookups("Secret Question");

                SecretQuestionDropDownList.DataSource     = secretQuestions;
                SecretQuestionDropDownList.DataValueField = "LookupId";
                SecretQuestionDropDownList.DataTextField  = "Name";
                SecretQuestionDropDownList.DataBind();
//                SecretQuestionDropDownList.Items.Add(new ListItem(" ","100"));

                SecretQuestionDropDownList.Attributes.Add("onChange", "javascript: newQuestion(this);");
            }
            catch (Exception ex)
            {
                log.Error("UNKNOWN ERROR:", ex);
                ErrorLiteral.Text = "An unknown error occurred. Please try again. If the problem persists, please contact your system administrator.";
            }
            if (Session["registrationInfo"] != null)
            {
                InitializeValuesFromSession();
            }
        }
        else
        {
            if ((SecQuestionHiddenField.Value != "") && (SecretQuestionDropDownList.SelectedValue == "13"))
            {
                SecretQuestionDropDownList.SelectedItem.Text = SecQuestionHiddenField.Value;
            }
        }
    }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Util.Validations.RegisterZipScriptBlock(Page.ClientScript, this.GetType(),
                                                BillingCountryDropDownList.ClientID);


        if (!Page.IsPostBack)
        {
            // Get the common web service instance.
            ServiceAccess serviceLoader = ServiceAccess.GetInstance();
            CommonService.CommonService commonService = serviceLoader.GetCommon();

            // Get the list of Card Types and populate.
            IList <CommonService.LookupInfo> cardTypes = commonService.GetLookups("Credit Card Type");

            CardTypeDropDownList.DataSource     = cardTypes;
            CardTypeDropDownList.DataValueField = "LookupId";
            CardTypeDropDownList.DataTextField  = "Name";
            CardTypeDropDownList.DataBind();


            //Credit Card Expiry Year List
            int        currentYear = DateTime.Now.Year;
            List <int> avlYears    = new List <int>();
            for (int i = currentYear; i <= (currentYear + 20); i++)
            {
                avlYears.Add(i);
            }
            CardYearDropDownList.DataSource = avlYears;
            CardYearDropDownList.DataBind();
            //Get country List for Billing Address
            IList <CommonService.CountryInfo> countries = commonService.GetCountries();

            BillingCountryDropDownList.DataSource     = countries;
            BillingCountryDropDownList.DataValueField = "CountryId";
            BillingCountryDropDownList.DataTextField  = "Name";
            BillingCountryDropDownList.DataBind();

            //BillingCountryDropDownList.Items.FindByText("United States").Selected = true;
            BillingCountryDropDownList_SelectedIndexChanged(BillingCountryDropDownList, new EventArgs());
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Util.Validations.RegisterZipScriptBlock(Page.ClientScript, this.GetType(),
                                                CountryDropDownList.ClientID);

        if (!Page.IsPostBack)
        {
            // Get the common web service instance.

            ServiceAccess serviceLoader = ServiceAccess.GetInstance();
            CommonService.CommonService commonService = serviceLoader.GetCommon();

            // Get the list of contries and populate.
            IList <CommonService.CountryInfo> countries = commonService.GetCountries();

            CountryDropDownList.DataSource     = countries;
            CountryDropDownList.DataValueField = "CountryId";
            CountryDropDownList.DataTextField  = "Name";
            CountryDropDownList.DataBind();

            CountryDropDownList.Items.FindByText("United States").Selected = true;
            CountryDropDownList_SelectedIndexChanged(CountryDropDownList, new EventArgs());

            RoleDropDownList.Items.Add(new ListItem(RegistrationService.UserRole.Agent.ToString(), Convert.ToInt32(RegistrationService.UserRole.Agent).ToString()));
            RoleDropDownList.Items.Add(new ListItem(RegistrationService.UserRole.Printer.ToString(), Convert.ToInt32(RegistrationService.UserRole.Printer).ToString()));
            RoleDropDownList.Items.Add(new ListItem(RegistrationService.UserRole.CSR.ToString(), Convert.ToInt32(RegistrationService.UserRole.CSR).ToString()));
            RoleDropDownList.Items.Add(new ListItem(RegistrationService.UserRole.Admin.ToString(), Convert.ToInt32(RegistrationService.UserRole.Admin).ToString()));
            RoleDropDownList.DataBind();

            if (Request.QueryString["UserId"] != "")
            {
                InitializeValuesFromSession();
            }
            else
            {
                Response.Redirect("SearchUsers.aspx");
            }
        }
    }