CmsWeb/shop/EditAddress.aspx.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Cms.Common;

public partial class shop_EditAddress : System.Web.UI.Page
{
    protected int user_id;//会员id
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Cms.Model.C_user userModel = adminUser.GetuserLoginState();
            this.user_id = userModel.id;
            bind_Province(Province);
            bind_City(1, City);
            bind_District(1, District);
            if (Request["id"] != null)
            {
                int id = Convert.ToInt32(Request["id"].ToString());
                Bind_date(id);
            }
            else
            {

            }

        }
    }

    #region 省市===========================================
    /// <summary>
    /// 绑定省
    /// </summary>
    public void bind_Province(DropDownList lbCity)
    {
        DataSet ds = new Cms.BLL.C_Province().GetList("");
        lbCity.DataSource = ds.Tables[0].DefaultView;
        lbCity.DataValueField = "ProvinceID";
        lbCity.DataTextField = "ProvinceName";
        lbCity.DataBind();
    }
    protected void Province_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (this.Province.SelectedValue == "")
        {
            return;
        }
        int txtProvince = Utils.StrToInt(Province.SelectedValue.ToString(), 0);
        bind_City(txtProvince, City);

    }
    /// <summary>
    /// 绑定市
    /// </summary>
    public void bind_City(int Province, DropDownList lbCity)
后面还有 163 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。