Ejemplo n.º 1
0
    protected string navigation = ""; //导航

    #endregion Fields

    #region Methods

    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        int aid = Common.GetReqIntValue("aid") ;
        string id = Common.GetReqStrValue("id");
        //导航
        WEC_CATEBANNER condner = new WEC_CATEBANNER();
        condner.STATUS = 0;
        condner.AID = aid;
        condner.OrderBy(WEC_CATEBANNER.Attribute.SORT_ID);
        List<WEC_CATEBANNER> list = BLLTable<WEC_CATEBANNER>.Select(new WEC_CATEBANNER(), condner);
        if (list.Count != 0)
        {
            foreach (WEC_CATEBANNER wr in list)
            {
                navigation = string.Format("{0} <li><a onclick=\"return false;\"><img src=\"{1}\" alt=\"{2}\" style=\"width:100%;\" /></a></li>", navigation, wr.PIC_URL, wr.NAME);
            }
        }
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();
        cond.STATUS = 0;
        cond.UP_FLAG = 1;
        cond.PID = id;
        cond.AID = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        List<WEC_COLUMN> list1 = BLLTable<WEC_COLUMN>.Select(new WEC_COLUMN(), cond);
        foreach (WEC_COLUMN wc in list1)
        {
            mainvalue = string.Format("{0}<li style=\"background:#dadada;\"><a href=\"{1}\"><div><span class=\"icon-smile\"></span></div><div><p>{2}</p></div></a></li>", mainvalue, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : "list.aspx?id=" + wc.ID + "&aid=" + aid, wc.COLUMN_NAME);
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();

        //导航
        WEC_CATEBANNER condner = new WEC_CATEBANNER();

        condner.STATUS = 0;
        condner.AID    = aid;
        condner.OrderBy(WEC_CATEBANNER.Attribute.SORT_ID);
        list = BLLTable <WEC_CATEBANNER> .Select(new WEC_CATEBANNER(), condner);

        if (list.Count != 0)
        {
            foreach (WEC_CATEBANNER wr in list)
            {
                navigation = string.Format("{0}<li style=\"width: 640px; display: table-cell; vertical-align: top;\"><a onclick=\"{1};\"><img src={2} alt={3} style=\"width:100%;\"></a></li>", navigation, wr.OUT_URL == ""?"return false":wr.OUT_URL, wr.PIC_URL, wr.NAME);
            }
        }
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();

        cond.STATUS  = 0;
        cond.UP_FLAG = 1;
        cond.PID     = "0";
        cond.AID     = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        list1 = BLLTable <WEC_COLUMN> .Select(new WEC_COLUMN(), cond);
    }
Ejemplo n.º 3
0
    protected string navigation = ""; //导航

    #endregion Fields

    #region Methods

    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();

        //导航
        WEC_CATEBANNER condner = new WEC_CATEBANNER();
        condner.STATUS = 0;
        condner.AID = aid;
        condner.OrderBy(WEC_CATEBANNER.Attribute.SORT_ID);
         list = BLLTable<WEC_CATEBANNER>.Select(new WEC_CATEBANNER(), condner);
        if (list.Count != 0)
        {
            foreach (WEC_CATEBANNER wr in list)
            {
                navigation = string.Format("{0}<li style=\"width: 640px; display: table-cell; vertical-align: top;\"><a onclick=\"{1};\"><img src={2} alt={3} style=\"width:100%;\"></a></li>", navigation, wr.OUT_URL==""?"return false":wr.OUT_URL ,wr.PIC_URL, wr.NAME);
            }
        }
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();
        cond.STATUS = 0;
        cond.UP_FLAG = 1;
        cond.PID = "0";
        cond.AID = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        list1 = BLLTable<WEC_COLUMN>.Select(new WEC_COLUMN(), cond);
    }
Ejemplo n.º 4
0
    protected string mainvalue  = ""; //主内容
    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        int    aid = Common.GetReqIntValue("aid");
        string id  = Common.GetReqStrValue("id");
        //导航
        WEC_CATEBANNER condner = new WEC_CATEBANNER();

        condner.STATUS = 0;
        condner.AID    = aid;
        condner.OrderBy(WEC_CATEBANNER.Attribute.SORT_ID);
        List <WEC_CATEBANNER> list = BLLTable <WEC_CATEBANNER> .Select(new WEC_CATEBANNER(), condner);

        if (list.Count != 0)
        {
            foreach (WEC_CATEBANNER wr in list)
            {
                navigation = string.Format("{0} <li><a onclick=\"return false;\"><img src=\"{1}\" alt=\"{2}\" style=\"width:100%;\" /></a></li>", navigation, wr.PIC_URL, wr.NAME);
            }
        }
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();

        cond.STATUS  = 0;
        cond.UP_FLAG = 1;
        cond.PID     = id;
        cond.AID     = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        List <WEC_COLUMN> list1 = BLLTable <WEC_COLUMN> .Select(new WEC_COLUMN(), cond);

        foreach (WEC_COLUMN wc in list1)
        {
            mainvalue = string.Format("{0<a href=\"{1}\" class=\"shengyt-list-item\"><div class=\"shengyt-list-item-bg\"><div class=\"shengyt-list-item-image\" style=\"background-image:url({2})\"></div><div class=\"shengyt-list-item-box\"><div class=\"shengyt-list-item-line\"><div class=\"shengyt-list-item-title\">{3}</div><div class=\"shengyt-list-item-summary\">{4}</div></div></div></div></a>", mainvalue, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : "list.aspx?id=" + wc.ID + "&aid=" + aid, wc.PIC_URL, wc.COLUMN_NAME, wc.COLUMN_DES);
        }
    }
Ejemplo n.º 5
0
    protected string mainvalue  = ""; //主内容
    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        int aid = Common.GetReqIntValue("aid") == 0 ? 1 : Common.GetReqIntValue("aid");
        //导航
        WEC_CATEBANNER condner = new WEC_CATEBANNER();

        condner.STATUS = 0;
        condner.AID    = aid;
        condner.OrderBy(WEC_CATEBANNER.Attribute.SORT_ID);
        List <WEC_CATEBANNER> list = BLLTable <WEC_CATEBANNER> .Select(new WEC_CATEBANNER(), condner);

        if (list.Count != 0)
        {
            foreach (WEC_CATEBANNER wr in list)
            {
                navigation = string.Format("{0} <li><a onclick=\"return false;\"><img src=\"{1}\" alt=\"{2}\" style=\"width:100%;\" /></a></li>", navigation, wr.PIC_URL, wr.NAME);
            }
        }
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();

        cond.STATUS  = 0;
        cond.UP_FLAG = 1;
        cond.PID     = "0";
        cond.AID     = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        List <WEC_COLUMN> list1 = BLLTable <WEC_COLUMN> .Select(new WEC_COLUMN(), cond);

        int a = 0;

        mainvalue = "<li>";
        foreach (WEC_COLUMN wc in list1)
        {
            a = a + 1;
            if (a == 5)
            {
                a         = 1;
                mainvalue = mainvalue + "</li><li>";
            }
            WEC_COLUMN wn = new WEC_COLUMN();
            wn.PID = wc.ID;
            string path = "";
            if (!BLLTable <WEC_COLUMN> .Exists(wn))
            {
                path = "list.aspx?id=" + wc.ID + "&aid=" + aid;
            }
            else
            {
                path = "channel.aspx?id=" + wc.ID + "&aid=" + aid;
            }
            mainvalue = string.Format("{0}<a href=\"{1}\" class=\"shengyt-list-item\"> <img src=\"{2}\" alt=\"{3}\" /> <div>{3}</div> </a>", mainvalue, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : path, wc.PIC_URL, wc.COLUMN_NAME);
        }
        mainvalue = mainvalue + "</li>";
    }
Ejemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int        aid     = Convert.ToInt32(HttpUtil.GetReqStrValue("aid"));
            WEC_COLUMN objVal  = new WEC_COLUMN();
            WEC_COLUMN objCond = new WEC_COLUMN();
            objCond.PID = "0";
            objCond.AID = aid;
            objVal.OrderBy(WEC_COLUMN.Attribute.SORT_ID, Order.Asc);
            List <WEC_COLUMN> lstChnl = BLLTable <WEC_COLUMN> .Select(objVal, objCond);

            StringBuilder sb = new StringBuilder();
            if (lstChnl.Count > 0)
            {
                sb.Append("<li id=\"root_0\" data=\"{id:'0',pid:'0',sc:9999,name:'站点栏目管理'}\" class=\"root\"><div class=\"opened\"><b></b><em></em><a href=\"#\">站点栏目管理</a></div>");
                sb.Append("<ul>");
                for (int i = 0; i < lstChnl.Count; i++)
                {
                    StringBuilder sbData = new StringBuilder();
                    string        licls  = "";
                    if (i == lstChnl.Count - 1)
                    {
                        licls = "last";
                    }

                    if (licls != "")
                    {
                        licls = " class='" + licls + "'";
                    }
                    objCond     = new WEC_COLUMN();
                    objCond.PID = lstChnl[i].ID;
                    objCond.AID = Convert.ToInt32(aid);
                    int subcount = BLLTable <WEC_COLUMN> .Factory(conn).Select(new WEC_COLUMN(), objCond).Count;

                    sbData.Append("{rid:'0',id:'").Append(lstChnl[i].ID.ToString());
                    sbData.Append("',pid:'").Append(lstChnl[i].PID).Append("',no:").Append(lstChnl[i].SORT_ID.ToString());
                    sbData.Append(",sc:").Append(subcount);
                    sbData.Append(",name:'").Append(lstChnl[i].COLUMN_NAME).Append("'}");

                    sb.Append("<li " + licls + " id='node_" + lstChnl[i].ID + "' data=\"" + sbData.ToString() + "\"><div><b></b><em></em><a href='#'>" + lstChnl[i].COLUMN_NAME + "</a></div></li>");
                }
                sb.Append("</ul>");
                sb.Append("</li>");
            }
            else
            {
                sb.Append("<li id=\"root_0\" data=\"{id:'0',pid:'',sc:0,name:'站点栏目管理'}\" class=\"root\"><div><b></b><em></em><a href=\"#\">站点栏目管理</a></div></li>");
            }
            litChnl.Text = sb.ToString();
        }
    }
Ejemplo n.º 7
0
    protected string navigation = ""; //导航

    #endregion Fields

    #region Methods

    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        aid = Common.GetReqIntValue("aid");
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();
        cond.STATUS = 0;
        cond.UP_FLAG = 1;
        cond.PID = "0";
        cond.AID = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        list1 = BLLTable<WEC_COLUMN>.Select(new WEC_COLUMN(), cond);
    }
Ejemplo n.º 8
0
    protected string navigation = ""; //导航

    #endregion Fields

    #region Methods

    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        int aid = Common.GetReqIntValue("aid") == 0 ? 1 : Common.GetReqIntValue("aid");
        //导航
        WEC_CATEBANNER condner = new WEC_CATEBANNER();
        condner.STATUS = 0;
        condner.AID = aid;
        condner.OrderBy(WEC_CATEBANNER.Attribute.SORT_ID);
        List<WEC_CATEBANNER> list = BLLTable<WEC_CATEBANNER>.Select(new WEC_CATEBANNER(), condner);
        if (list.Count != 0)
        {
            foreach (WEC_CATEBANNER wr in list)
            {

                navigation = string.Format("{0} <li><a onclick=\"return false;\"><img src=\"{1}\" alt=\"{2}\" style=\"width:100%;\" /></a></li>", navigation, wr.PIC_URL, wr.NAME);
            }
        }
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();
        cond.STATUS = 0;
        cond.UP_FLAG = 1;
        cond.PID = "0";
        cond.AID = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        List<WEC_COLUMN> list1 = BLLTable<WEC_COLUMN>.Select(new WEC_COLUMN(), cond);
        int a=0;
        mainvalue = "<li>";
        foreach (WEC_COLUMN wc in list1)
        {
            a=a+1;
            if(a==5)
            {
                a = 1;
                mainvalue = mainvalue + "</li><li>";
            }
            WEC_COLUMN wn = new WEC_COLUMN();
            wn.PID = wc.ID;
            string path = "";
            if (!BLLTable<WEC_COLUMN>.Exists(wn))
            {
                path = "list.aspx?id=" + wc.ID + "&aid=" + aid;
            }
            else
            {
                path = "channel.aspx?id=" + wc.ID + "&aid=" + aid;
            }
            mainvalue = string.Format("{0}<a href=\"{1}\" class=\"shengyt-list-item\"> <img src=\"{2}\" alt=\"{3}\" /> <div>{3}</div> </a>", mainvalue, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : path, wc.PIC_URL, wc.COLUMN_NAME);
        }
            mainvalue = mainvalue + "</li>";
    }
Ejemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        aid    = Common.GetReqIntValue("aid");
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();

        cond.STATUS  = 0;
        cond.UP_FLAG = 1;
        cond.PID     = "0";
        cond.AID     = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        list1 = BLLTable <WEC_COLUMN> .Select(new WEC_COLUMN(), cond);
    }
Ejemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int aid = Convert.ToInt32(HttpUtil.GetReqStrValue("aid"));
            WEC_COLUMN objVal = new WEC_COLUMN();
            WEC_COLUMN objCond = new WEC_COLUMN();
            objCond.PID = "0";
            objCond.AID = aid;
            objVal.OrderBy(WEC_COLUMN.Attribute.SORT_ID, Order.Asc);
            List<WEC_COLUMN> lstChnl = BLLTable<WEC_COLUMN>.Select(objVal, objCond);
            StringBuilder sb = new StringBuilder();
            if (lstChnl.Count > 0)
            {
                sb.Append("<li id=\"root_0\" data=\"{id:'0',pid:'0',sc:9999,name:'站点栏目管理'}\" class=\"root\"><div class=\"opened\"><b></b><em></em><a href=\"#\">站点栏目管理</a></div>");
                sb.Append("<ul>");
                for (int i = 0; i < lstChnl.Count; i++)
                {
                    StringBuilder sbData = new StringBuilder();
                    string licls = "";
                    if (i == lstChnl.Count - 1)
                    {
                        licls = "last";
                    }

                    if (licls != "") { licls = " class='" + licls + "'"; }
                    objCond = new WEC_COLUMN();
                    objCond.PID = lstChnl[i].ID;
                    objCond.AID = Convert.ToInt32(aid);
                    int subcount = BLLTable<WEC_COLUMN>.Factory(conn).Select(new WEC_COLUMN(), objCond).Count;
                    sbData.Append("{rid:'0',id:'").Append(lstChnl[i].ID.ToString());
                    sbData.Append("',pid:'").Append(lstChnl[i].PID).Append("',no:").Append(lstChnl[i].SORT_ID.ToString());
                    sbData.Append(",sc:").Append(subcount);
                    sbData.Append(",name:'").Append(lstChnl[i].COLUMN_NAME).Append("'}");

                    sb.Append("<li " + licls + " id='node_" + lstChnl[i].ID + "' data=\"" + sbData.ToString() + "\"><div><b></b><em></em><a href='#'>" + lstChnl[i].COLUMN_NAME + "</a></div></li>");
                }
                sb.Append("</ul>");
                sb.Append("</li>");
            }
            else
            {
                sb.Append("<li id=\"root_0\" data=\"{id:'0',pid:'',sc:0,name:'站点栏目管理'}\" class=\"root\"><div><b></b><em></em><a href=\"#\">站点栏目管理</a></div></li>");

            }
            litChnl.Text = sb.ToString();
        }
    }
Ejemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();

         WEC_COLUMN cond = new WEC_COLUMN();
        cond.STATUS = 0;
        cond.UP_FLAG = 1;
        cond.PID = id;
        cond.AID = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        List<WEC_COLUMN> list1 = BLLTable<WEC_COLUMN>.Select(new WEC_COLUMN(), cond);
        foreach (WEC_COLUMN wc in list1)
        {
            mainvalue = string.Format("{0}<a href=\"{1}\"><label><small>{2}</small></label><span class=\"icon-smile\"></span></a>", mainvalue, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : "list.aspx?id=" + wc.ID + "&aid=" + aid, wc.COLUMN_NAME);
        }
    }
Ejemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();

        WEC_COLUMN cond = new WEC_COLUMN();

        cond.STATUS  = 0;
        cond.UP_FLAG = 1;
        cond.PID     = id;
        cond.AID     = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        List <WEC_COLUMN> list1 = BLLTable <WEC_COLUMN> .Select(new WEC_COLUMN(), cond);

        foreach (WEC_COLUMN wc in list1)
        {
            mainvalue = string.Format("{0}<a href=\"{1}\"><label><small>{2}</small></label><span class=\"icon-smile\"></span></a>", mainvalue, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : "list.aspx?id=" + wc.ID + "&aid=" + aid, wc.COLUMN_NAME);
        }
    }
Ejemplo n.º 13
0
    protected string navigation = ""; //导航

    #endregion Fields

    #region Methods

    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        aid = Common.GetReqIntValue("aid");
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();
        cond.STATUS = 0;
        cond.UP_FLAG = 1;
        cond.PID = "0";
        cond.AID = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        list1 = BLLTable<WEC_COLUMN>.Select(new WEC_COLUMN(), cond);
        foreach (WEC_COLUMN wc in list1)
        {
            mainvalue = string.Format("{0}<a href=\"{1}\"><label><small>{2}</small></label><span><img  src=\"{3}\"/></span></a>", mainvalue, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : "list.aspx?id=" + wc.ID + "&aid=" + aid, wc.COLUMN_NAME, wc.SMALL_PIC != "" ? wc.SMALL_PIC : "return false");

        }
    }
Ejemplo n.º 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        aid    = Common.GetReqIntValue("aid");
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();

        cond.STATUS  = 0;
        cond.UP_FLAG = 1;
        cond.PID     = "0";
        cond.AID     = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        list1 = BLLTable <WEC_COLUMN> .Select(new WEC_COLUMN(), cond);

        foreach (WEC_COLUMN wc in list1)
        {
            mainvalue = string.Format("{0}<a href=\"{1}\"><label><small>{2}</small></label><span><img  src=\"{3}\"/></span></a>", mainvalue, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : "list.aspx?id=" + wc.ID + "&aid=" + aid, wc.COLUMN_NAME, wc.SMALL_PIC != "" ? wc.SMALL_PIC : "return false");
        }
    }
Ejemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        aid    = Common.GetReqIntValue("aid");
        //导航
        WEC_CATEBANNER condner = new WEC_CATEBANNER();

        condner.STATUS = 0;
        condner.AID    = aid;
        condner.OrderBy(WEC_CATEBANNER.Attribute.SORT_ID);
        List <WEC_CATEBANNER> list = BLLTable <WEC_CATEBANNER> .Select(new WEC_CATEBANNER(), condner);

        if (list.Count != 0)
        {
            foreach (WEC_CATEBANNER wr in list)
            {
                navigation = string.Format("{0} <li><a onclick=\"{1};\"><img src=\"{2}\" alt=\"{3}\" style=\"width:100%;\" /></a></li>", navigation, wr.OUT_URL == "" ? "return false" : wr.OUT_URL, wr.PIC_URL, wr.NAME);
            }
        }
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();

        cond.STATUS  = 0;
        cond.UP_FLAG = 1;
        cond.PID     = "0";
        cond.AID     = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        list1 = BLLTable <WEC_COLUMN> .Select(new WEC_COLUMN(), cond);

        foreach (WEC_COLUMN wc in list1)
        {
            //int a = 0;

            //a++;

            //mainvalue = string.Format("{0} <a class=\"list-item _C{1}_L0\" href=\"{2}\"><div class=\"item-title\"><div class=\"title-text\">{3}</div></div><div class=\"item-image\" style=\"background-image: url(<%=wc.PIC_URL%>)">div class="item_title2"><%=wc.COLUMN_DES %></div></div></a>"
            //, mainvalue,a, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : "list.aspx?id=" + wc.ID + "&aid=" + aid,wc.COLUMN_NAME, wc.SMALL_PIC != "" ? wc.SMALL_PIC : "return false", wc.COLUMN_NAME, wc.COLUMN_DES);
        }
    }
Ejemplo n.º 16
0
    protected string navigation = ""; //导航

    #endregion Fields

    #region Methods

    protected void Page_Load(object sender, EventArgs e)
    {
        preUrl = WebHelper.GetAppPath();
        aid = Common.GetReqIntValue("aid");
        //导航
        WEC_CATEBANNER condner = new WEC_CATEBANNER();
        condner.STATUS = 0;
        condner.AID = aid;
        condner.OrderBy(WEC_CATEBANNER.Attribute.SORT_ID);
        List<WEC_CATEBANNER> list = BLLTable<WEC_CATEBANNER>.Select(new WEC_CATEBANNER(), condner);
        if (list.Count != 0)
        {
            foreach (WEC_CATEBANNER wr in list)
            {
                navigation = string.Format("{0} <li><a onclick=\"{1};\"><img src=\"{2}\" alt=\"{3}\" style=\"width:100%;\" /></a></li>", navigation, wr.OUT_URL == "" ? "return false" : wr.OUT_URL, wr.PIC_URL, wr.NAME);
            }
        }
        //主内容
        WEC_COLUMN cond = new WEC_COLUMN();
        cond.STATUS = 0;
        cond.UP_FLAG = 1;
        cond.PID = "0";
        cond.AID = aid;
        cond.OrderBy(WEC_COLUMN.Attribute.SORT_ID);
        list1 = BLLTable<WEC_COLUMN>.Select(new WEC_COLUMN(), cond);
        foreach (WEC_COLUMN wc in list1)
        {

            //int a = 0;

            //a++;

            //mainvalue = string.Format("{0} <a class=\"list-item _C{1}_L0\" href=\"{2}\"><div class=\"item-title\"><div class=\"title-text\">{3}</div></div><div class=\"item-image\" style=\"background-image: url(<%=wc.PIC_URL%>)">div class="item_title2"><%=wc.COLUMN_DES %></div></div></a>"
            //, mainvalue,a, !string.IsNullOrEmpty(wc.OUT_URL) ? wc.OUT_URL : "list.aspx?id=" + wc.ID + "&aid=" + aid,wc.COLUMN_NAME, wc.SMALL_PIC != "" ? wc.SMALL_PIC : "return false", wc.COLUMN_NAME, wc.COLUMN_DES);

        }
    }
Ejemplo n.º 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //显示子节点
        if (Request["ShowSubNodes"] != null)
        {
            #region
            string pid = Request["id"];
            WEC_COLUMN obj = new WEC_COLUMN();
            WEC_COLUMN objval = new WEC_COLUMN();
            obj.PID = pid;
            obj.AID = Convert.ToInt32(userBase2.Curraid);
            objval.OrderBy(WEC_COLUMN.Attribute.SORT_ID, Order.Asc);

            List<WEC_COLUMN> lst = BLLTable<WEC_COLUMN>.Select(objval, obj);
            if (lst.Count > 0)
            {
                StringBuilder sb = new StringBuilder("[");
                for (int i = 0; i < lst.Count; i++)
                {
                    if (i > 0)
                    {
                        sb.Append(",");
                    }
                    obj = new WEC_COLUMN();
                    obj.PID = lst[i].ID;
                    obj.AID = Convert.ToInt32(userBase2.Curraid);
                    int subcount = BLLTable<WEC_COLUMN>.Factory(conn).Select(new WEC_COLUMN(), obj).Count;
                    sb.Append("{rid:'").Append(lst[i].PID).Append("',id:'").Append(lst[i].ID.ToString());
                    sb.Append("',pid:'").Append(lst[i].PID.ToString()).Append("',no:").Append(lst[i].SORT_ID);
                    sb.Append(",sc:").Append(subcount);
                    sb.Append(",name:'").Append(lst[i].COLUMN_NAME).Append("'}");

                }
                sb.Append("]");
                Response.Write(sb.ToString());
            }

            #endregion
        }
        //删除群组
        if (Request["DelNodeID"] != null)
        {
            string keyid = Request["id"];

            int re = BLLTable<WEC_COLUMN>.Delete(WEC_COLUMN.Attribute.ID, keyid);
            if (re > 0)
            {

            }
            Response.Write(re.ToString());

        }
        if (Request["DelID"] != null)
        {
            string keyid = Request["DelID"];
            CMS_SiteChannel ccc = new CMS_SiteChannel();
            ccc.ChnlID = BLLTable<CMS_SiteChannel>.GetOneValue(CMS_SiteChannel.Attribute.ChnlID, keyid, CMS_SiteChannel.Attribute.ParentID);
            int re = BLLTable<CMS_SiteChannel>.Delete(CMS_SiteChannel.Attribute.ChnlID, keyid);
            if (re > 0)
            {

                BLLTable<CMS_SiteChannel>.UpdateAuto(ccc, CMS_SiteChannel.Attribute.SubCount, -1);
            }
            Response.Redirect(preUrl);
        }
        //修改序号
        if (Request["UpdateSort"] != null)
        {
            string chgid1 = Request["chgid1"];
            string chgsort1 = Request["chgsort1"].ToString();
            string chgid2 = Request["chgid2"];
            string chgsort2 = Request["chgsort2"].ToString();
            try
            {
                //CMS_SiteChannel ccc = new CMS_SiteChannel();
                //ccc.ChnlID = chgid1;
                BLLTable<CMS_SiteChannel>.Update(CMS_SiteChannel.Attribute.ChnlID, chgid1, CMS_SiteChannel.Attribute.SortNum, chgsort1);
                //ccc.ChnlID = chgid2;
                BLLTable<CMS_SiteChannel>.Update(CMS_SiteChannel.Attribute.ChnlID, chgid2, CMS_SiteChannel.Attribute.SortNum, chgsort2);
                Response.Write("1");
            }
            catch
            {
                Response.Write("修改序号失败!");
            }

        }

        Response.End();
    }
Ejemplo n.º 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //显示子节点
        if (Request["ShowSubNodes"] != null)
        {
            #region
            string     pid    = Request["id"];
            WEC_COLUMN obj    = new WEC_COLUMN();
            WEC_COLUMN objval = new WEC_COLUMN();
            obj.PID = pid;
            obj.AID = Convert.ToInt32(userBase2.Curraid);
            objval.OrderBy(WEC_COLUMN.Attribute.SORT_ID, Order.Asc);

            List <WEC_COLUMN> lst = BLLTable <WEC_COLUMN> .Select(objval, obj);

            if (lst.Count > 0)
            {
                StringBuilder sb = new StringBuilder("[");
                for (int i = 0; i < lst.Count; i++)
                {
                    if (i > 0)
                    {
                        sb.Append(",");
                    }
                    obj     = new WEC_COLUMN();
                    obj.PID = lst[i].ID;
                    obj.AID = Convert.ToInt32(userBase2.Curraid);
                    int subcount = BLLTable <WEC_COLUMN> .Factory(conn).Select(new WEC_COLUMN(), obj).Count;

                    sb.Append("{rid:'").Append(lst[i].PID).Append("',id:'").Append(lst[i].ID.ToString());
                    sb.Append("',pid:'").Append(lst[i].PID.ToString()).Append("',no:").Append(lst[i].SORT_ID);
                    sb.Append(",sc:").Append(subcount);
                    sb.Append(",name:'").Append(lst[i].COLUMN_NAME).Append("'}");
                }
                sb.Append("]");
                Response.Write(sb.ToString());
            }



            #endregion
        }
        //删除群组
        if (Request["DelNodeID"] != null)
        {
            string keyid = Request["id"];


            int re = BLLTable <WEC_COLUMN> .Delete(WEC_COLUMN.Attribute.ID, keyid);

            if (re > 0)
            {
            }
            Response.Write(re.ToString());
        }
        if (Request["DelID"] != null)
        {
            string          keyid = Request["DelID"];
            CMS_SiteChannel ccc   = new CMS_SiteChannel();
            ccc.ChnlID = BLLTable <CMS_SiteChannel> .GetOneValue(CMS_SiteChannel.Attribute.ChnlID, keyid, CMS_SiteChannel.Attribute.ParentID);

            int re = BLLTable <CMS_SiteChannel> .Delete(CMS_SiteChannel.Attribute.ChnlID, keyid);

            if (re > 0)
            {
                BLLTable <CMS_SiteChannel> .UpdateAuto(ccc, CMS_SiteChannel.Attribute.SubCount, -1);
            }
            Response.Redirect(preUrl);
        }
        //修改序号
        if (Request["UpdateSort"] != null)
        {
            string chgid1   = Request["chgid1"];
            string chgsort1 = Request["chgsort1"].ToString();
            string chgid2   = Request["chgid2"];
            string chgsort2 = Request["chgsort2"].ToString();
            try
            {
                //CMS_SiteChannel ccc = new CMS_SiteChannel();
                //ccc.ChnlID = chgid1;
                BLLTable <CMS_SiteChannel> .Update(CMS_SiteChannel.Attribute.ChnlID, chgid1, CMS_SiteChannel.Attribute.SortNum, chgsort1);

                //ccc.ChnlID = chgid2;
                BLLTable <CMS_SiteChannel> .Update(CMS_SiteChannel.Attribute.ChnlID, chgid2, CMS_SiteChannel.Attribute.SortNum, chgsort2);

                Response.Write("1");
            }
            catch
            {
                Response.Write("修改序号失败!");
            }
        }

        Response.End();
    }
Ejemplo n.º 19
0
    public static string GetNewDeptID(string parentid)
    {
        if (parentid == "")
        {
            parentid = "0";
        }
        string code = "0";
        WEC_COLUMN objCond = new WEC_COLUMN();
        objCond.PID = parentid;
        object ooo = BLLTable<WEC_COLUMN>.Max(WEC_COLUMN.Attribute.ID, objCond);//010203
        string mcode = ooo == null ? "" : ooo.ToString();//010203
        if (mcode == null || mcode == "")
        {
            if (parentid == "0")
            {
                code = parentid + "1";
            }
            else
            {
                code = parentid + "01";
            }
        }
        else
        {

            string lasttwo = mcode.Substring(mcode.Length - 2);
            int ltwo = Convert.ToInt32(lasttwo, 16) + 1;
            string newlasttwo = Convert.ToString(ltwo, 16);
            if (newlasttwo.Length < 2)
            {
                newlasttwo = "0" + newlasttwo;
            }
            else if (newlasttwo.Length > 2)//编号后两位达到上限FF,只能遍历是否有空位
            {
                string prefore = mcode.Substring(0, mcode.Length - 2);
                objCond.OrderBy(WEC_COLUMN.Attribute.ID, Order.Asc);

                DataTable dt = BLLTable<WEC_COLUMN>.SelectForDataTable(new WEC_COLUMN(), objCond);
                DataView dv = new DataView();
                dv.Table = dt;
                string aaa = "";
                newlasttwo = "";
                for (int i = 1; i <= 255; i++)
                {
                    aaa = Convert.ToString(i, 16);
                    if (aaa.Length < 2)
                    {
                        aaa = "0" + aaa;
                    }
                    dv.RowFilter = "DEPT_ID='" + prefore + aaa + "'";
                    if (dv.Count <= 0)//找到空位
                    {
                        newlasttwo = aaa;
                        break;
                    }
                }
            }
            if (newlasttwo != "")//号码没有用完
            {
                code = mcode.Substring(0, mcode.Length - 2) + newlasttwo;
            }
        }
        return code;
    }
Ejemplo n.º 20
0
    public static string GetNewDeptID(string parentid)
    {
        if (parentid == "")
        {
            parentid = "0";
        }
        string     code    = "0";
        WEC_COLUMN objCond = new WEC_COLUMN();

        objCond.PID = parentid;
        object ooo = BLLTable <WEC_COLUMN> .Max(WEC_COLUMN.Attribute.ID, objCond); //010203

        string mcode = ooo == null ? "" : ooo.ToString();                          //010203

        if (mcode == null || mcode == "")
        {
            if (parentid == "0")
            {
                code = parentid + "1";
            }
            else
            {
                code = parentid + "01";
            }
        }
        else
        {
            string lasttwo    = mcode.Substring(mcode.Length - 2);
            int    ltwo       = Convert.ToInt32(lasttwo, 16) + 1;
            string newlasttwo = Convert.ToString(ltwo, 16);
            if (newlasttwo.Length < 2)
            {
                newlasttwo = "0" + newlasttwo;
            }
            else if (newlasttwo.Length > 2)//编号后两位达到上限FF,只能遍历是否有空位
            {
                string prefore = mcode.Substring(0, mcode.Length - 2);
                objCond.OrderBy(WEC_COLUMN.Attribute.ID, Order.Asc);

                DataTable dt = BLLTable <WEC_COLUMN> .SelectForDataTable(new WEC_COLUMN(), objCond);

                DataView dv = new DataView();
                dv.Table = dt;
                string aaa = "";
                newlasttwo = "";
                for (int i = 1; i <= 255; i++)
                {
                    aaa = Convert.ToString(i, 16);
                    if (aaa.Length < 2)
                    {
                        aaa = "0" + aaa;
                    }
                    dv.RowFilter = "DEPT_ID='" + prefore + aaa + "'";
                    if (dv.Count <= 0)//找到空位
                    {
                        newlasttwo = aaa;
                        break;
                    }
                }
            }
            if (newlasttwo != "")//号码没有用完
            {
                code = mcode.Substring(0, mcode.Length - 2) + newlasttwo;
            }
        }
        return(code);
    }