Пример #1
0
    public List <WebSite.Model.Mod_PicList> GetPicLists(int pid)
    {
        Bll_PicList BPicList = new Bll_PicList();
        //绑定图片集
        List <WebSite.Model.Mod_PicList> PicList = BPicList.GetModelList("Model='XWXC' and ProductID=" + pid + " and State=1 AND WebSiteID=" + PageCommon.LanguageID + " ORDER BY OrderBy asc,ID asc ");

        return(PicList);
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ModelInfo = PageCommon.GetModelInformation(id);

        ModelBaseType = PageCommon.GetModelType(ModelInfo.TypeID);
        string ObjIDPath = ModelBaseType.IDPath;

        TopNavigation1.ObjIDPath = ObjIDPath;
        ucLeft1.TypeId           = ObjIDPath.Split(',')[1].ToString();
        ucLeft1.ParentId         = ObjIDPath.Split(',')[0].ToString();

        MBaseType = PageCommon.GetModelType(int.Parse(ObjIDPath.Split(',')[0].ToString()));
        //if (ModelBaseType.Image != "")
        //{
        //    MBaseType.Image = ModelBaseType.Image;
        //}
        _ucheader1.ParentID = ObjIDPath.Split(',')[0].ToString();
        _ucheader1.TypeId   = ModelBaseType.ID.ToString();

        //统计浏览量
        OperateHelper.SetInformationClick(ModelInfo.ID);


        Bll_PicList BPicList = new Bll_PicList();

        //绑定图片集
        PicList = BPicList.GetModelList("Model='XWXC' and ProductID=" + id + " and State=1 AND WebSiteID=" + PageCommon.LanguageID + " ORDER BY OrderBy asc,ID asc ");


        //上一页下一页
        Mod_Information dto2 = GetInfo.GetLastInfo(ModelInfo, "OrderBy desc,AddDate DESC", string.Format("TypeID={0} And Model='{1}' and WebSiteID={2}", ModelInfo.TypeID, ModelInfo.Model, PageCommon.LanguageID));

        if (dto2 != null)
        {
            LastInfo = "<div><strong>上一篇:</strong><a href=\"NewsInfo.aspx?id=" + dto2.ID + "\"  class=\"els\">" + dto2.Title + "</a></div>";
        }
        else
        {
            LastInfo = "<div><strong>上一篇:</strong><a class=\"els\">没有了</a></div>";
        }

        Mod_Information dto3 = GetInfo.GetNextInfo(ModelInfo, "OrderBy desc,AddDate DESC", string.Format("TypeID={0} And Model='{1}' and WebSiteID={2}", ModelInfo.TypeID, ModelInfo.Model, PageCommon.LanguageID));

        if (dto3 != null)
        {
            NextInfo = "<div><strong>下一篇:</strong><a href=\"NewsInfo.aspx?id=" + dto3.ID + "\"  class=\"els\">" + dto3.Title + "</a></div>";
        }
        else
        {
            NextInfo = "<div><strong>下一篇:</strong><a class=\"els\">没有了</a></div>";
        }
        LinkBind();
    }
Пример #3
0
    public string GetPicList(int pid)
    {
        string      strhtml  = string.Empty;
        Bll_PicList BPicList = new Bll_PicList();
        //绑定图片集
        List <WebSite.Model.Mod_PicList> PicList = BPicList.GetModelList("Model='XWXC' and ProductID=" + pid + " and State=1 AND WebSiteID=" + PageCommon.LanguageID + " ORDER BY OrderBy asc,ID asc ");

        if (PicList.Count > 0)
        {
            foreach (var item in PicList)
            {
                strhtml += "<li><img src=\"" + item.OriginalUrl + "\" ></li>";
            }
        }
        return(strhtml);
    }