Exemple #1
0
 protected void ddlState_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlState.SelectedIndex > 0)
     {
         CommonFillMethods.FillDropDownListCityByStateID(ddlCity, Convert.ToInt32(ddlState.SelectedValue.Trim()));
         ddlCity.Focus();
     }
     else
     {
         CommonFillMethods.FillDropDownListEmpty(ddlCity);
     }
 }
Exemple #2
0
    private void FilAddressDetails()
    {
        AddressBAL balAddress = new AddressBAL();
        AddressENT entAddress = new AddressENT();

        entAddress = balAddress.SelectByPK(Convert.ToInt32(Session["AddressID"]), Convert.ToInt32(Session["UserID"]));

        if (!entAddress.FullName.IsNull)
        {
            txtFullName.Text = entAddress.FullName.Value;
        }

        if (!entAddress.StateID.IsNull)
        {
            ddlState.SelectedValue = entAddress.StateID.Value.ToString();
        }

        if (!entAddress.CityID.IsNull)
        {
            ddlCity.SelectedValue = entAddress.CityID.Value.ToString();
            CommonFillMethods.FillDropDownListCityByStateID(ddlCity, entAddress.StateID);
        }

        if (!entAddress.Address1.IsNull)
        {
            txtAddressLine1.Text = entAddress.Address1.Value;
        }

        if (!entAddress.Address2.IsNull)
        {
            txtAddressLine2.Text = entAddress.Address2.Value;
        }

        if (!entAddress.Postcode.IsNull)
        {
            txtPostCode.Text = entAddress.Postcode.Value.ToString();
        }

        if (!entAddress.MobileNo.IsNull)
        {
            txtMobileNo.Text = entAddress.MobileNo.Value;
        }
    }