/// <summary>
        /// 获取一个完整的招商信息实体
        /// </summary>
        /// <param name="InfoID"></param>
        /// <returns></returns>
        public Tz888.Model.Info.MerchantSetModel GetIntegrityModel(long InfoID)
        {
            Tz888.Model.Info.MerchantSetModel model = new MerchantSetModel();

            //获取主要信息
            MainInfoDAL obj1 = new MainInfoDAL();

            model.MainInfoModel = obj1.GetModel(InfoID);

            //获取投资资源个性信息
            model.MerchantInfoModel = this.GetModel(InfoID);

            //获取信息联系方式
            InfoContactDAL obj3 = new InfoContactDAL();

            model.InfoContactModel = obj3.GetModel(InfoID);

            //获取招商信息联系人
            //InfoContactManDAL obj4 = new InfoContactManDAL();
            //model.InfoContactManModels = obj4.GetModelList(InfoID);

            //获取招商信息相关资源
            InfoResourceDAL obj5 = new InfoResourceDAL();

            model.InfoResourceModels = obj5.GetModelList(InfoID);

            //短信息
            ShortInfoDAL obj6 = new ShortInfoDAL();

            model.ShortInfoModel = obj6.GetModel(InfoID);

            return(model);
        }
Exemple #2
0
    public string getInfoResourceById(long infoID)
    {
        string resStr  = "";
        string tempStr = "<li><a href=\"#ResURL\"><div class=\"pic\"><img src=\"/CommonV3/img/res_ad2.gif\" alt=\"#ResType\"></div>#ResTitle</a></li>";

        //string tempStr = "<li>[#ResType]<a href='#ResURL' alt='#ResT2'>#ResTitle</a>——#ResDec</li>";
        Tz888.SQLServerDAL.Info.InfoResourceDAL   bll    = new Tz888.SQLServerDAL.Info.InfoResourceDAL();
        List <Tz888.Model.Info.InfoResourceModel> models = bll.GetModelList(infoID);

        if (models != null)
        {
            foreach (Tz888.Model.Info.InfoResourceModel ResModel in models)
            {
                string temp     = tempStr;
                string restype  = "image";
                string fileName = ResModel.ResourceAddr.Trim();
                if (fileName != "")
                {
                    fileName = "http://images.topfo.com/" + ResModel.ResourceAddr;
                }
                else
                {
                    fileName = "#";
                }
                if (fileName.IndexOf(".doc") > 0 || fileName.IndexOf(".ppt") > 0 || fileName.IndexOf(".pdf") > 0)
                {
                    restype = "file";
                }
                temp = temp.Replace("#ResType", restype == "image" ? "点击查看图片" : "点击下载文件");
                temp = temp.Replace("#ResURL", fileName.Trim());
                //temp = temp.Replace("#ResDec", ResModel.ResourceDescrib);
                temp    = temp.Replace("#ResTitle", ResModel.ResourceTitle);
                resStr += temp;
            }
        }
        if (resStr.Trim() == "")
        {
            resStr = "<li>无相关附件</li>";
        }
        return(resStr);
    }
        /// <summary>
        /// 获取一个完整的投资资源信息实体
        /// </summary>
        /// <param name="InfoID"></param>
        /// <returns></returns>
        public Tz888.Model.Info.CapitalSetModel GetIntegrityModel(long InfoID)
        {
            Tz888.Model.Info.CapitalSetModel model = new CapitalSetModel();

            //获取主要信息
            MainInfoDAL obj1 = new MainInfoDAL();

            model.MainInfoModel = obj1.GetModel(InfoID);

            //获取投资资源个性信息
            model.CapitalInfoModel = this.GetModel(InfoID);

            //获取信息联系方式
            InfoContactDAL obj3 = new InfoContactDAL();

            model.InfoContactModel = obj3.GetModel(InfoID);

            //获取投资信息联系人
            InfoContactManDAL obj4 = new InfoContactManDAL();

            model.InfoContactManModels = obj4.GetModelList(InfoID);

            //获取信息相关资源
            InfoResourceDAL obj5 = new InfoResourceDAL();

            model.InfoResourceModels = obj5.GetModelList(InfoID);

            //获取信息投资区域
            CapitalInfoAreaDAL obj6 = new CapitalInfoAreaDAL();

            model.CapitalInfoAreaModels = obj6.GetModelList(InfoID);

            //短信息
            ShortInfoDAL obj7 = new ShortInfoDAL();

            model.ShortInfoModel = obj7.GetModel(InfoID);

            return(model);
        }
Exemple #4
0
    //[WebMethod]
    public string getInfoResourceById(long infoID, string InfoOriginRoleName, decimal MainPointCount, int FixPriceID, bool bIsTofMember)
    {
        string resStr  = "";
        string tempStr = "<li>[#ResType]<a href='#ResURL' alt='#ResT2'>#ResTitle</a>——#ResDec</li>";

        Tz888.SQLServerDAL.Info.InfoResourceDAL   bll    = new Tz888.SQLServerDAL.Info.InfoResourceDAL();
        List <Tz888.Model.Info.InfoResourceModel> models = bll.GetModelList(infoID);

        if (models != null)
        {
            int nameNum = 0;
            foreach (Tz888.Model.Info.InfoResourceModel ResModel in models)
            {
                nameNum++;

                if (ResModel.ResourceDescrib.Trim() == "")
                {
                    ResModel.ResourceDescrib = "文件" + nameNum.ToString();
                }
                if (ResModel.ResourceTitle.Trim() == "")
                {
                    ResModel.ResourceTitle = "文件" + nameNum.ToString();
                }

                string temp     = tempStr;
                string restype  = "image";
                string fileName = ResModel.ResourceAddr.Trim();
                if (fileName != "")
                {
                    fileName = "http://images.topfo.com/" + ResModel.ResourceAddr;
                }
                if (fileName.IndexOf(".doc") > 0 || fileName.IndexOf(".ppt") > 0 || fileName.IndexOf(".pdf") > 0)
                {
                    restype = "file";
                }

                if (MainPointCount > 0 && FixPriceID > 1)//收费资源
                {
                    temp = temp.Replace("#ResType", restype == "image" ? "图片" : "文件");
                    //temp = temp.Replace("#ResT2", restype == "image" ? "点击查看图片" : "点击下载文件");
                    if (bIsTofMember == true)          //是否登录
                    {
                        if (InfoOriginRoleName == "0") //判断是否购买
                        {
                            temp = temp.Replace("#ResURL", "#");
                            temp = temp.Replace("#ResT2", "购买后才能下载");
                        }
                        else
                        {
                            temp = temp.Replace("#ResURL", fileName.Trim());
                            temp = temp.Replace("#ResT2", restype == "image" ? "点击查看图片" : "点击下载文件");
                        }
                    }
                    else
                    {
                        temp = temp.Replace("#ResURL", "#");
                        temp = temp.Replace("#ResT2", "登录后才能下载");
                    }
                    temp = temp.Replace("#ResDec", ResModel.ResourceDescrib);
                    temp = temp.Replace("#ResTitle", ResModel.ResourceTitle);
                }
                else//免费资源
                {
                    temp = temp.Replace("#ResType", restype == "image" ? "图片" : "文件");
                    temp = temp.Replace("#ResT2", restype == "image" ? "点击查看图片" : "点击下载文件");
                    temp = temp.Replace("#ResURL", fileName.Trim());
                    temp = temp.Replace("#ResDec", ResModel.ResourceDescrib);
                    temp = temp.Replace("#ResTitle", ResModel.ResourceTitle);
                }
                resStr += temp;
            }
        }
        if (resStr.Trim() == "")
        {
            resStr = "<li>无相关附件</li>";
        }
        //resStr = "<div class=\"lcontentbox\"><div class=\"ctop\"><ul><li>相关附件 </li></ul></div><div class=\"introbox\"><ul style=\" margin-left:20px;\">" + resStr;
        //resStr += "</ul></div></div>";

        return(resStr);
    }