protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         changeLinks();
         getCompanyName();
         if (!IsPostBack)
         {
             lblMsg.Text = "";
             dbzip.bindZipDropdown(drpZip);
             string checkNM = string.Empty;
             checkNM = Convert.ToString(Request.QueryString["chk"]);
             if (checkNM == "1")
             {
                 string strStateNm   = string.Empty;
                 string strZipCode   = string.Empty;
                 string strStartDate = string.Empty;
                 string strEndDate   = string.Empty;
                 strZipCode           = Convert.ToString(Request.QueryString["Zip"]);
                 strStartDate         = Convert.ToString(Request.QueryString["sDate"]);
                 strEndDate           = Convert.ToString(Request.QueryString["eDate"]);
                 drpZip.SelectedValue = strZipCode;
                 txtFromDate.Text     = strStartDate;
                 txtToDate.Text       = strEndDate;
             }
         }
     }
     catch (Exception ex)
     {
         Response.Write(ex.Message);
     }
 }
예제 #2
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)
        {
            if (!Request.IsSecureConnection)
            {
                String sNewURL = "https://" + Request.ServerVariables["SERVER_NAME"] + Request.ServerVariables["URL"];
                Response.Redirect(sNewURL);
            }

            if (!IsPostBack)
            {
                getCompanyName();
                dropZip.bindZipDropdown(drpZip);
                HtmlGenericControl liItem = (HtmlGenericControl)Master.FindControl("home");
                liItem.Attributes.Add("class", "selected");
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         changeLinks();
         getCompanyName();
         if (!IsPostBack)
         {
             pnlClient.Visible = false;
             dbzip.bindZipDropdown(drpZip);
         }
     }
     catch (Exception ex)
     {
         Response.Write(ex.Message);
     }
 }