コード例 #1
0
    protected void InitPage()
    {
        int             mer_id = int.Parse(Request.QueryString["mer_id"]);
        MerInfoMaintDAL func   = new MerInfoMaintDAL();
        McBasicInfo     mc     = func.GetMerchantInfoByID(mer_id);

        MerInfoMod_Name.Text         = mc.MerName;
        MerInfoMod_Introduction.Text = mc.MerInfo;
        MerInfoMod_Pic.Src           = mc.MerPic;
        MerInfoMod_Address.Text      = mc.MerAddr;
        MerInfoMod_Telephone.Text    = mc.MerPhone;
        MerInfoMod_Website.Text      = mc.MerWebsite;
        MerInfoMod_Email.Text        = mc.RegEmail;
        MerInfoMod_Relat.Text        = mc.RegName;



        string[] city_Pro = func.GetCityAndProvin(mc.CityID);
        MerInfoMod_Province.DataSource     = func.GetAllProvince();
        MerInfoMod_Province.DataValueField = "pro_id";
        MerInfoMod_Province.DataTextField  = "pro_name";
        MerInfoMod_Province.DataBind();
        MerInfoMod_Province.Text = city_Pro[1];

        MerInfoMod_City.DataSource     = func.GetAllCityByProvin(int.Parse(MerInfoMod_Province.SelectedValue));
        MerInfoMod_City.DataValueField = "city_id";
        MerInfoMod_City.DataTextField  = "city_name";
        MerInfoMod_City.DataBind();
        MerInfoMod_City.Text = city_Pro[0];
    }
コード例 #2
0
    protected void MerInfoMod_Province_TextChanged(object sender, EventArgs e)
    {
        MerInfoMaintDAL func = new MerInfoMaintDAL();

        MerInfoMod_City.DataSource     = func.GetAllCityByProvin(int.Parse(MerInfoMod_Province.SelectedValue));
        MerInfoMod_City.DataValueField = "city_id";
        MerInfoMod_City.DataTextField  = "city_name";
        MerInfoMod_City.DataBind();
    }