Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                BindSideLink();
                getCompanyName();
                txtEmail.Attributes.Add("onblur", "CheckEmailAvailability();");
                btnRegister.Attributes.Add("onclick", "clcontent();");

                if (!IsPostBack)
                {
                    pnlSignIn.Visible  = true;
                    pnlSuccess.Visible = false;

                    txtAddress1.Text = txtAddress2.Text = txtCity.Text = txtEmail.Text = txtFName.Text = txtLName.Text = txtPassword.Text = txtPhone1.Text = txtReEmail.Text = txtRePassword.Text = txtSiteReferBy.Text = txtSpend.Text = "";

                    // dropState.bindStateDropdown(drpState);
                    dropState.bindStateDropdownNew(drpState, Convert.ToString(ViewState["StateShortName"])); //Bind state  into dropdown
                    dropState.bindZipDropdown_hide(drpZip);                                                  //Bind zip  into dropdown
                    //dropState.bindStateDropdownNew(drpState, Convert.ToString(ViewState["StateShortName"]));//Bind state  into dropdown
                    lblMsg.Text = "";
                    lblMsg.Text = "";
                    string Zip = string.Empty;
                    Zip = Convert.ToString(Request.QueryString["zip"]);
                    //txtZipCode.Text = Zip;
                    //txtZipCode.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                lblMsg.Text = ex.Message;
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                BindSideLink();
                getCompanyName();
                txtEmail.Attributes.Add("onblur", "CheckEmailAvailability();");
                btnRegister.Attributes.Add("onclick", "clcontent();");

                if (!IsPostBack)
                {
                    FillUserDropDown();
                    pnlSignIn.Visible  = true;
                    pnlSuccuss.Visible = false;
                    dropState.bindStateDropdownNew(drpState, Convert.ToString(ViewState["StateShortName"]));//Bind state  into dropdown
                    lblMsg.Text = "";
                    lblMsg.Text = "";
                    string Zip = string.Empty;
                    Zip             = Convert.ToString(Request.QueryString["zip"]);
                    txtZipCode.Text = Zip;
                }
            }
            catch (Exception ex)
            {
                lblMsg.Text = ex.Message;
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (Request.Cookies["userId"] == null)
                {
                    Response.Redirect("LoginPage.aspx", false);
                }
                else
                {
                    getCompanyName();
                    Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
                    Response.Cache.SetCacheability(HttpCacheability.NoCache);
                    Response.Cache.SetNoStore();
                    if (!IsPostBack)
                    {
                        //dropState.bindStateDropdown(drpState);//Bind state  into dropdown
                        dropState.bindStateDropdownNew(drpState, Convert.ToString(ViewState["StateShortName"])); //Bind state  into dropdown
                        dropState.bindZipDropdown(drpZip);                                                       //Bind zip  into dropdown
                        DataSet dsUserInfo = new DataSet();

                        dsUserInfo = dbInfo.GetUserDetailsInfo(Convert.ToInt32(Request.Cookies["userId"].Value));

                        if (dsUserInfo.Tables.Count > 0)
                        {
                            if (dsUserInfo != null && dsUserInfo.Tables.Count > 0 && dsUserInfo.Tables[0].Rows.Count > 0)
                            {
                                txtAddress1.Text = Convert.ToString(dsUserInfo.Tables[0].Rows[0]["users_address1"]);

                                txtAddress2.Text = Convert.ToString(dsUserInfo.Tables[0].Rows[0]["users_address2"]);

                                txtCity.Text = Convert.ToString(dsUserInfo.Tables[0].Rows[0]["users_city"]);

                                drpState.SelectedValue = Convert.ToString(dsUserInfo.Tables[0].Rows[0]["users_state"]);


                                drpZip.SelectedValue = Convert.ToString(dsUserInfo.Tables[0].Rows[0]["users_zip"]);
                            }
                        }
                    }
                }

                dbInfo.dispose();
            }

            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (Request.Cookies["userId"] == null)
                {
                    Response.Redirect("My_Account.aspx", false);
                }
                else
                {
                    btnUpdate.Attributes.Add("onclick", "clcontent();");
                    BindSideLink();
                    getCompanyName();
                    if (!IsPostBack)
                    {
                        // dropState.bindStateDropdown(drpState);//Bind state  into dropdown
                        dropState.bindStateDropdownNew(drpState, Convert.ToString(ViewState["StateShortName"]));//Bind state  into dropdown
                        dropState.bindZipDropdown_hide(drpZip);
                        int userId = 0;
                        userId = Convert.ToInt32(Request.Cookies["userId"].Value);
                        DataSet dsUserDetailsInfo = new DataSet();
                        dsUserDetailsInfo = dbInfo.GetUserDetailsInfo(userId);
                        if (dsUserDetailsInfo.Tables.Count > 0)
                        {
                            if (dsUserDetailsInfo != null && dsUserDetailsInfo.Tables.Count > 0 && dsUserDetailsInfo.Tables[0].Rows.Count > 0)
                            {
                                txtAddress1.Text       = Convert.ToString(dsUserDetailsInfo.Tables[0].Rows[0]["users_address1"]);
                                txtAddress2.Text       = Convert.ToString(dsUserDetailsInfo.Tables[0].Rows[0]["users_address2"]);
                                txtCity.Text           = Convert.ToString(dsUserDetailsInfo.Tables[0].Rows[0]["users_city"]);
                                drpState.SelectedValue = Convert.ToString(dsUserDetailsInfo.Tables[0].Rows[0]["users_state"]);
                                drpZip.SelectedValue   = Convert.ToString(dsUserDetailsInfo.Tables[0].Rows[0]["users_zip"]);
                            }
                        }


                        dsUserDetailsInfo.Dispose();
                    }
                }
                dbInfo.dispose();
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }