⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectarea_ajax.aspx.cs

📁 易想商城系统
💻 CS
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;

namespace YXShop.Web.configuration.system
{
    public partial class SelectArea_ajax : System.Web.UI.Page
    {
        //public SelectArea_ajax()
        //{
        //    BrowserAuthor = EnumDialogAuthority.ForAdmin;
        //}
        YXShop.BLL.Provinces datab = new YXShop.BLL.Provinces();
        //rootPublic pd = new rootPublic();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Response.CacheControl = "no-cache";
                Response.Expires = 0;
                newsList.InnerHtml = newsstr();
            }
        }

        string newsstr()
        {
            string ParentId = Request.QueryString["ParentId"];
            if (ParentId == "" || ParentId == null)
            {
                ParentId = "0";
            }
            else
            {
                ParentId = ParentId.ToString();
            }
            string liststr = string.Empty;
            //IDataReader rd = datab.GetajaxsProvinceList(ParentId);
            List<YXShop.Model.Provinces> data = datab.GetListByColumn("Fid", ParentId);
            foreach (YXShop.Model.Provinces da in data)
            {
                List<YXShop.Model.Provinces> datas = datab.GetListByColumn("Fid",da.ID);
               
                    if (datas.Count > 0)
                    {
                        liststr += "<div><img src=\"../../Admin/images/b.gif\" alt=\"点击展开子栏目\"  border=\"0\" class=\"LableItem\" onClick=\"javascript:SwitchImg(this,'" + da.ID + "');\" />&nbsp;<span id=\"" + da.ID + "\" class=\"LableItem\" ondblclick=\"ReturnValue();\" onClick=\"SelectLable(this);sFiles('" + da.ID + "','" + da.Province_city + "');\">" + da.Province_city + "</span><div id=\"Parent" + da.ID + "\" class=\"SubItem\" HasSub=\"True\" style=\"height:100%;display:none;\"></div></div>";
                    }
                    else
                    {
                        liststr += "<div><img src=\"../../Admin/images/s.gif\" alt=\"没有子栏目\"  border=\"0\" class=\"LableItem\" />&nbsp;<span id=\"" + da.ID + "\" class=\"LableItem\" ondblclick=\"ReturnValue();\" onClick=\"SelectLable(this);sFiles('" + da.ID + "','" + da.Province_city + "');\">" + da.Province_city + "</span></div>";
                    }
                
            }
          
            if (liststr != string.Empty)
                liststr = "Succee|||" + ParentId + "|||" + liststr;
            else
                liststr = "Fail|||" + ParentId + "|||";
            return liststr;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -