Пример #1
0
    private void LoadInfo(long InfoID)
    {
        Tz888.BLL.Conn dal = new Tz888.BLL.Conn();
        DataTable      dt  = dal.GetList("dicttab", "*", "idictvalue", 10, 1, 0, 0, " cdicttype='xmyxqxx' ");

        this.rdlValiditeTerm.DataTextField  = "cdictname";
        this.rdlValiditeTerm.DataValueField = "idictvalue";
        this.rdlValiditeTerm.DataSource     = dt;
        this.rdlValiditeTerm.DataBind();
        //2010-07-28 以上绑定项目有效期限



        Tz888.BLL.Info.CapitalInfoBLL    bll   = new Tz888.BLL.Info.CapitalInfoBLL();
        Tz888.Model.Info.CapitalSetModel model = new Tz888.Model.Info.CapitalSetModel();
        model = bll.GetIntegrityModel(InfoID);

        //07-28项目有效期限
        this.rdlValiditeTerm.SelectedValue = model.MainInfoModel.ValidateTerm.ToString();

        this.txtCapitalName.Text          = model.MainInfoModel.Title;
        this.rblCapitalType.SelectedValue = model.CapitalInfoModel.CapitalTypeID.Trim();;

        string CooperationDemandType = model.CapitalInfoModel.CooperationDemandType;
        string CooperationDemandTypeItems;

        for (int i = 0; i < chkLstCooperationDemand.Items.Count; i++)
        {
            CooperationDemandTypeItems = chkLstCooperationDemand.Items[i].Value;
            //CooperationDemandTypeItems += ",";
            if (CooperationDemandType.IndexOf(CooperationDemandTypeItems) != -1)
            {
                chkLstCooperationDemand.Items[i].Selected = true;
            }
        }

        if (!string.IsNullOrEmpty(model.MainInfoModel.KeyWord.Trim()))
        {
            string[] keys = model.MainInfoModel.KeyWord.Trim().Split(',');
            for (int i = 0; i < keys.Length; i++)
            {
                string key = keys[i].ToString().Trim();
                switch (i)
                {
                case 0:
                    this.txtKeyword1.Text = key;
                    break;

                case 1:
                    this.txtKeyword2.Text = key;
                    break;

                case 2:
                    this.txtKeyword3.Text = key;
                    break;

                default:
                    break;
                }
            }
        }

        this.ZoneMoreSelectControl1.CapitalInfoAreaModels = model.CapitalInfoAreaModels;

        this.SelectIndustryControl1.IndustryString = model.CapitalInfoModel.IndustryBID;

        this.ImageUploadControl1.InfoList = model.InfoResourceModels;

        this.ddlCurrency.SelectedValue = model.CapitalInfoModel.Currency.Trim();;

        this.ddlCapital.SelectedValue = model.CapitalInfoModel.CapitalID;

        this.txtCapitalIntent.Value = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(Tz888.Common.Utility.PageValidate.HtmlToTxt(model.CapitalInfoModel.ComAbout));

        // this.ddlValiditeTerm.SelectedValue = model.MainInfoModel.ValidateTerm.ToString();

        this.CapitalAddressInfo1.InfoContact = model.InfoContactModel;

        this.CapitalAddressInfo1.InfoContactMans = model.InfoContactManModels;


        if (Request.UrlReferrer != null)
        {
            ViewState["strPrePage"] = Request.UrlReferrer.ToString();
        }
        else
        {
            ViewState["strPrePage"] = "";
        }
        ViewState["InfoID"]         = model.MainInfoModel.InfoID;
        ViewState["PublishT"]       = model.MainInfoModel.publishT;
        ViewState["ComBreif"]       = model.CapitalInfoModel.ComBreif;
        ViewState["AuditingStatus"] = model.MainInfoModel.AuditingStatus;
        ViewState["HtmlFile"]       = model.MainInfoModel.HtmlFile;

        ViewState["ShortTitle"]         = model.ShortInfoModel.ShortTitle;
        ViewState["ShortContent"]       = model.ShortInfoModel.ShortContent;
        ViewState["ShortInfoControlID"] = model.ShortInfoModel.ShortInfoControlID;
    }
    private void LoadInfo(long InfoID)
    {
        Tz888.BLL.Info.CapitalInfoBLL    bll   = new Tz888.BLL.Info.CapitalInfoBLL();
        Tz888.Model.Info.CapitalSetModel model = new Tz888.Model.Info.CapitalSetModel();
        model = bll.GetIntegrityModel(InfoID);

        this.txtCapitalName.Text          = model.MainInfoModel.Title;
        this.rblCapitalType.SelectedValue = model.CapitalInfoModel.CapitalTypeID.Trim();;

        string CooperationDemandType = model.CapitalInfoModel.CooperationDemandType;
        string CooperationDemandTypeItems;

        for (int i = 0; i < chkLstCooperationDemand.Items.Count; i++)
        {
            CooperationDemandTypeItems = chkLstCooperationDemand.Items[i].Value;
            //CooperationDemandTypeItems += ",";
            if (CooperationDemandType.IndexOf(CooperationDemandTypeItems) != -1)
            {
                chkLstCooperationDemand.Items[i].Selected = true;
            }
        }

        if (!string.IsNullOrEmpty(model.MainInfoModel.KeyWord.Trim()))
        {
            string[] keys = model.MainInfoModel.KeyWord.Trim().Split(',');
            for (int i = 0; i < keys.Length; i++)
            {
                string key = keys[i].ToString().Trim();
                switch (i)
                {
                case 0:
                    this.txtKeyword1.Text = key;
                    break;

                case 1:
                    this.txtKeyword2.Text = key;
                    break;

                case 2:
                    this.txtKeyword3.Text = key;
                    break;

                default:
                    break;
                }
            }
        }

        this.ZoneMoreSelectControl1.CapitalInfoAreaModels = model.CapitalInfoAreaModels;

        this.SelectIndustryControl1.IndustryString = model.CapitalInfoModel.IndustryBID;

        this.ImageUploadControl1.InfoList = model.InfoResourceModels;

        this.ddlCurrency.SelectedValue = model.CapitalInfoModel.Currency.Trim();;

        this.ddlCapital.SelectedValue = model.CapitalInfoModel.CapitalID;

        this.txtCapitalIntent.Value = model.CapitalInfoModel.ComAbout;

        this.ddlValiditeTerm.SelectedValue = model.MainInfoModel.ValidateTerm.ToString();

        this.CapitalAddressInfo1.InfoContact = model.InfoContactModel;

        this.CapitalAddressInfo1.InfoContactMans = model.InfoContactManModels;


        if (Request.UrlReferrer != null)
        {
            ViewState["strPrePage"] = Request.UrlReferrer.ToString();
        }
        else
        {
            ViewState["strPrePage"] = "";
        }
        ViewState["InfoID"]         = model.MainInfoModel.InfoID;
        ViewState["PublishT"]       = model.MainInfoModel.publishT;
        ViewState["ComBreif"]       = model.CapitalInfoModel.ComBreif;
        ViewState["AuditingStatus"] = model.MainInfoModel.AuditingStatus;
        ViewState["HtmlFile"]       = model.MainInfoModel.HtmlFile;

        ViewState["ShortTitle"]         = model.ShortInfoModel.ShortTitle;
        ViewState["ShortContent"]       = model.ShortInfoModel.ShortContent;
        ViewState["ShortInfoControlID"] = model.ShortInfoModel.ShortInfoControlID;
    }
Пример #3
0
    public string GetInfoContractDetail(string InfoID)
    {
        string cacheStr = "ContractDetail_" + InfoID;

        if (HttpContext.Current.Cache[cacheStr] != null)
        {
            return(HttpContext.Current.Cache[cacheStr].ToString().Trim());
        }
        else
        {
            #region 获取资源的联系方式

            //最终显示的信息
            string sOut = "";
            //免费的信息的内容
            string sFree = "<a href='#88' onclick=\"javascript:GetContactDetail(" + InfoID + ");\" class='spaces' ><img src='/Web13/images/project/button_cklxfs.gif' width='150' height='30' align='absmiddle' /></a> <i></i>我的MSN在线,联系我:<img src='/web13/images/project/icon_msn.gif' width='29' height='26' align='absmiddle' /><i></i>或<i></i><a href=\"Javascript:alert('系统升级中。。。');\"> 给项目方留言&gt;</a><p>发布者:<a href='#'>1234</a><i></i><img src='/web13/images/project/icon_05.gif' width='15' height='12' /> <i></i> <a href=\"javascript:alert('系统升级中。。。');\">加为好友</a></p>|1";
            //收费的信息内容

            string sChange = "<a href=\"http://pay.topfo.com/order_item.aspx?InfoID=" + InfoID + "\" class=\"spaces\"><img src=\"/web13/images/project/button_ljgm.gif\" width=\"130\" height=\"30\" border=\"0\" align=\"absmiddle\" /></a><i></i><a href=\"http://member.topfo.com/PayManage/shopcar.aspx?InfoID=" + InfoID + "\" class=\"spaces\"><img src=\"/web13/images/project/button_flgwc.gif\" width=\"150\" height=\"30\" border=\"0\" align=\"absmiddle\" /></a><p color='#CCCCCC'>支持多种支付方式,资源若无效经中国招商投资网确认后可全额返还所付款项,请放心购买。</p>|2";

            //当前用户名

            string CurrentUserName = "";
            CurrentUserName = User.Identity.Name.Trim();

            //用户是否是拓富通会员


            bool bIsTofMember = false;
            if (User.IsInRole("GT1002"))
            {
                if (CurrentUserName.Trim() != "")
                {
                    bIsTofMember = true;
                }
            }
            Tz888.Model.Info.CapitalSetModel objCSM = new Tz888.Model.Info.CapitalSetModel();
            Tz888.BLL.Info.CapitalInfoBLL    ciBll  = new Tz888.BLL.Info.CapitalInfoBLL();
            objCSM = ciBll.GetIntegrityModel(long.Parse(InfoID));

            if (objCSM.MainInfoModel.MainPointCount > 0)
            {
                //这是一条收费信息
                if (bIsTofMember)
                {
                    //是拓富通会员

                    bool bIsBuy = false;
                    bIsBuy = ciBll.bIsBuyInfoOfUser(CurrentUserName, InfoID);

                    if (bIsBuy)
                    {
                        //拓富通会员购买了此信息

                        sOut = sFree;
                    }
                    else
                    {
                        //拓富通会员没有购买了此信息

                        sOut = sChange;
                    }
                }
                else
                {
                    //非拓富通会员

                    sOut = sChange;
                }
            }
            else
            {
                //这是一条免费信息

                sOut = sFree;
            }
            //return sOut;
            #endregion

            HttpContext.Current.Cache.Insert(cacheStr, sOut.ToString().Trim(), null, System.Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromDays(7));

            return(sOut.ToString().Trim());
        }
    }