public string GetContactDetail_New(string InfoID, string LoginName) { //是否收费信息 Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); bool b = false; int FixPriceID = 0; decimal MainPointCount = 0; DataTable dt = dal.GetList("MainInfoTab", "InfoID,FixPriceID,MainPointCount", "InfoID", 1, 1, 0, 1, "InfoID=" + Convert.ToInt64(InfoID)); if (dt.Rows.Count > 0) { FixPriceID = Convert.ToInt32(dt.Rows[0]["FixPriceID"].ToString().Trim()); MainPointCount = Convert.ToDecimal(dt.Rows[0]["MainPointCount"].ToString().Trim()); } if (MainPointCount > 0 && FixPriceID > 1) { Tz888.BLL.Info.CapitalInfoBLL ciBll = new Tz888.BLL.Info.CapitalInfoBLL(); b = ciBll.bIsBuyInfoOfUser(LoginName, InfoID); if (b) { return(GetContactDetail(InfoID)); } else { return("您需要购买此信息才能查看联系方式"); } } else { return(GetContactDetail(InfoID));//免费 } }
/// <summary> /// 根据信息类型ID返回DataView /// </summary> /// <param name="infoTypeID"></param> /// <param name="SelectCol"></param> /// <param name="Criteria"></param> /// <param name="OrderBy"></param> /// <param name="CurrentPage"></param> /// <param name="PageSize"></param> /// <param name="PageCount"></param> /// <returns></returns> public static DataView GetListByInfoType(string infoTypeID, string SelectCol, string Criteria, string OrderBy, ref long CurrentPage, long PageSize, ref long PageCount) { if (infoTypeID == "") { return(null); } DataView dv = null; switch (infoTypeID.Trim()) { case "Merchant": Tz888.BLL.Info.MarchantInfoBLL obj6 = new MarchantInfoBLL(); dv = obj6.GetList(SelectCol, Criteria, OrderBy, ref CurrentPage, PageSize, ref PageCount); break; case "Capital": Tz888.BLL.Info.CapitalInfoBLL obj12 = new CapitalInfoBLL(); dv = obj12.GetList(SelectCol, Criteria, OrderBy, ref CurrentPage, PageSize, ref PageCount); break; case "Project": Tz888.BLL.Info.ProjectInfoBLL obj13 = new ProjectInfoBLL(); dv = obj13.GetList(SelectCol, Criteria, OrderBy, ref CurrentPage, PageSize, ref PageCount); break; default: break; } return(dv); }
public string GetAllOtherInfoByInfoIDForStaticPage(string InfoID, string LoginName) { long lgCurrentPage = 1; long lgPageSize = 0; long lgPageCount = 0; decimal MainPointCount = 0; StringBuilder sOut = new StringBuilder(); string CurrentUserName = ""; CurrentUserName = LoginName; //用户会员资料展示页面 string MemberURL = ""; //用户是否是拓富通会员 bool bIsTofMember = false; if (User.IsInRole("GT1002")) { //拓富通会员 if (CurrentUserName.Trim() != "") { bIsTofMember = true; } } #region 用户的联系方式信息 string PublishMan = ""; string NickName = ""; string SelfWebDomain = "";//网上展厅域名 string InfoTypeName = ""; int FixPriceID = 0; string InfoOriginRoleName = "0"; string ManageTypeID = ""; Tz888.BLL.Common.CommonFunction cf = new Tz888.BLL.Common.CommonFunction(); DataTable dt = cf.GetDTFromTableOrView("MainInfoViw", "infoid", "*", " infoid=" + InfoID, "InfoID", ref lgCurrentPage, lgPageSize, ref lgPageCount); if (dt != null && dt.Rows.Count > 0) { FixPriceID = Convert.ToInt32(dt.Rows[0]["FixPriceID"].ToString().Trim()); MainPointCount = Convert.ToDecimal(dt.Rows[0]["MainPointCount"].ToString().Trim()); InfoOriginRoleName = dt.Rows[0]["InfoOriginRoleName"].ToString().Trim(); PublishMan = dt.Rows[0]["LoginName"].ToString().Trim(); ManageTypeID = dt.Rows[0]["ManageTypeID"].ToString().Trim(); Tz888.BLL.Conn con = new Tz888.BLL.Conn(); DataTable domain = con.GetWebSiteList("SelfCreateWebInfo", "Domain", "LoginName", 1, 1, 0, 1, "LoginName='" + LoginName + "'"); if (domain.Rows.Count > 0) { SelfWebDomain = domain.Rows[0]["Domain"].ToString(); } } string sContract = ""; //免费或已购买的信息的内容 string sFree = "<ul><li><a href=\"javascript:GetContactDetail('" + InfoID + "');\"><img src=\"http://images.topfo.com/Info/Capital/1/images/zibc_23.jpg\" width=\"183\" height=\"30\" /></a> <span>提示:您需要登陆后才能查看联系方式</span></li></ul>"; //收费的信息内容(需要购买才能看) string payDomain = System.Configuration.ConfigurationManager.AppSettings["payDomain"]; Tz888.BLL.Common.DictionaryInfoBLL diBll = new Tz888.BLL.Common.DictionaryInfoBLL(); Tz888.Model.Common.DictionaryInfoModel objDic = new Tz888.Model.Common.DictionaryInfoModel(); objDic = diBll.GetModel("1"); string strMainPointCount = MainPointCount.ToString("c"); string strMainPointCountVip = Convert.ToDecimal(Convert.ToString(Convert.ToDecimal(objDic.DictionaryInfoParam) * MainPointCount)).ToString("c"); //收费的信息类容 string sChange = "<ul><li>资源价格:<span class=\"orange01\"><strong>" + strMainPointCount + "</strong></span>元(拓富通会员价:<span class=\"orange01\"><strong>" + strMainPointCountVip + "</strong></span>元)</li>" + "<li><a href=\"" + payDomain + "/order_item.aspx?InfoID=" + InfoID + "\" class=\"spaces\"><img src=\"http://images.topfo.com/Info/Capital/1/images/tiem_03.jpg\" /></a> <a href=\"http://membertest.topfo.com/PayManage/shopcar.aspx?InfoID=" + InfoID + "\" class=\"spaces\" target=\"_blank\"><img src=\"http://images.topfo.com/Info/Capital/1/images/tiem_05.jpg\" width=\"162\" height=\"36\" /></a></li>" + "<li><font color=\"#CCCCCC\">支持多种支付方式,资源若无效经中国招商投资网确认后可全额返还所付款项,请放心购买</font></li></ul>"; #endregion //sOut.Append(sContract); //多少人关注 string Hits = "0"; //if (dv != null && dv.Table.Rows.Count > 0) if (dt != null && dt.Rows.Count > 0) { Hits = dt.Rows[0]["hit"].ToString().Trim(); } //sOut.Append("|"); sOut.Append(Hits.Trim()); //多少人收藏,同时更新浏览次数 string ViewCollection = "0"; if (MainPointCount > 0 && FixPriceID > 1) { Tz888.BLL.Info.MatchInfoBLL miBLL = new Tz888.BLL.Info.MatchInfoBLL(); miBLL.dvViewCollectionCount(InfoID);//更新浏览次数 Tz888.BLL.Info.MainInfoBLL mainBLL = new Tz888.BLL.Info.MainInfoBLL(); ViewCollection = mainBLL.GetInfoBuyersCount(Convert.ToInt64(InfoID)).ToString(); } else { Tz888.BLL.Info.MatchInfoBLL miBLL = new Tz888.BLL.Info.MatchInfoBLL(); DataView dvViewCollection = miBLL.dvViewCollectionCount(InfoID); if (dvViewCollection != null && dvViewCollection.Table.Rows.Count > 0) { ViewCollection = Convert.ToInt32(dvViewCollection.Table.Rows[0][0]).ToString(); } } sOut.Append("|"); sOut.Append(ViewCollection.Trim()); //推荐次数 sOut.Append("|"); sOut.Append("3"); //留言条数 Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); int c = dal.GetCount("InfoCommentTab", "InfoID", "InfoID=" + InfoID); sOut.Append("|"); sOut.Append(c.ToString()); sOut.Append("|"); if (MainPointCount > 0 && FixPriceID > 1) { //这是一条收费信息 bool bIsBuy = false; Tz888.BLL.Info.CapitalInfoBLL ciBll = new Tz888.BLL.Info.CapitalInfoBLL(); bIsBuy = ciBll.bIsBuyInfoOfUser(CurrentUserName, InfoID); if (bIsBuy) { sContract = sFree; } else { sContract = sChange; } } else { sContract = sFree; } sOut.Append(sContract); return(sOut.ToString().Trim()); }
public string GetAllOtherInfoByInfoIDForStaticPage(string InfoID, string LoginName) { #region 互告跟踪记录 ///------------------------------ ///--design by AdSystem_20090620 ///------------------------------ string sitekey = ""; AdSystem.Logic loc = new AdSystem.Logic(); if (HttpContext.Current.Request.Cookies["S"] != null && HttpContext.Current.Request.Cookies["S"].Value.Trim() != "") { sitekey = HttpContext.Current.Request.Cookies["S"].Value.Trim(); HttpContext.Current.Request.Cookies["S"].Expires = DateTime.Now.AddDays(-1); bool flag = loc.setCookie(sitekey, InfoID); if (flag) { loc.Hits_Add(); } } //跟踪浏览的用户 if (LoginName.Trim() != "") { loc.View_Add(InfoID, LoginName); } #endregion StringBuilder sOut = new StringBuilder(); #region 信息参数说与基本信息获取 long lgCurrentPage = 1; long lgPageSize = 0; long lgPageCount = 0; decimal MainPointCount = 0; //资源报价 int FixPriceID = 0; //资源是否收费 string CurrentUserName = ""; //当前登陆的查看信息的用户 //string MemberURL = ""; //用户会员资料展示页面 string PublishMan = ""; //发布信息的用户 string NickName = ""; //发布信息的用户昵称 string InfoTypeName = ""; //信息类别 string InfoOriginRoleName = "0"; // string ManageTypeID = ""; //发布信息的用户类别 string payDomain = System.Configuration.ConfigurationManager.AppSettings["payDomain"]; string buyUrl = payDomain + "/order_item.aspx?InfoID=" + InfoID; //资源购买的路径 CurrentUserName = LoginName; BatchCreateXml bcx = new BatchCreateXml(); Tz888.BLL.Common.CommonFunction cf = new Tz888.BLL.Common.CommonFunction(); DataTable dt = cf.GetDTFromTableOrView("MainInfoViw", "infoid", "*", " infoid=" + InfoID, "InfoID", ref lgCurrentPage, lgPageSize, ref lgPageCount); if (dt != null && dt.Rows.Count > 0) { FixPriceID = Convert.ToInt32(dt.Rows[0]["FixPriceID"].ToString().Trim()); MainPointCount = Convert.ToDecimal(dt.Rows[0]["MainPointCount"].ToString().Trim()); InfoOriginRoleName = dt.Rows[0]["InfoOriginRoleName"].ToString().Trim(); PublishMan = dt.Rows[0]["LoginName"].ToString().Trim(); ManageTypeID = dt.Rows[0]["ManageTypeID"].ToString().Trim(); } #endregion #region 资源是否购买的提示信息 string WhetherCharges_button = ""; //按钮提示 string WhetherCharges_Clew = ""; //提示信息 string userState = "Charge"; // Charge购买 / Login登陆 / View查看 //if (User.Identity.Name != null && LoginName.Trim() == User.Identity.Name.Trim())//已登陆 //{ if (MainPointCount > 0 && FixPriceID > 1) //是否免费信息 { bool bIsBuy = false; //这是一条收费信息 Tz888.BLL.Info.CapitalInfoBLL ciBll = new Tz888.BLL.Info.CapitalInfoBLL(); bIsBuy = ciBll.bIsBuyInfoOfUser(CurrentUserName, InfoID); if (bIsBuy) { userState = "View"; } else { userState = "Charge"; } } else { userState = "View"; } //} switch (userState) { case "Login": //提示登陆 //WhetherCharges_button = "<a href=\"http://member.topfo.com\"><img src=\"/CommonV3/img/res3_btn14.gif\" alt=\"请先登陆\"></a>"; //WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为该资源的项目核心资料,你需要登陆才能查看!</span><span class=\"btn\">" + // "<a href=\"http://member.topfo.com\"><img src=\"/CommonV3/img/res3_btn14.gif\" alt=\"点击登陆\" /></a></span>" + // "<div class=\"clear\"></div>"; //break; case "View": //提示查看 WhetherCharges_button = "<a href=\"#88\" onclick=\"javascript:GetContactDetail(" + InfoID + ");\" ><img src=\"/CommonV3/img/res3_btn13.gif\" alt=\"请点击查看\"></a>"; WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为项目核心资料,你需要购买才能查看!</span><span class=\"btn\">" + "<a href=\"#88\" onclick=\"javascript:GetContactDetail(" + InfoID + ");\"><img src=\"/CommonV3/img/res3_btn13.gif\" alt=\"点击查看\" /></a></span>" + "<div class=\"clear\"></div>"; break; case "Charge": //提示购买 WhetherCharges_button = "<a href=\"" + buyUrl + "\"><img src=\"/CommonV3/img/res3_btn7.gif\" alt=\"请点击购买\"></a>"; WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为项目核心资料,你需要购买才能查看!</span><span class=\"btn\">" + "<a href=\"" + buyUrl + "\"><img src=\"/CommonV3/img/res3_btn7.gif\" alt=\"点击购买\" /></a></span>" + "<div class=\"clear\"></div>"; break; } sOut.Append(WhetherCharges_button.Trim()); sOut.Append("|"); sOut.Append(WhetherCharges_Clew.Trim()); sOut.Append("|"); #endregion #region 购买者评级 //sOut.Append(getBuyerRatingById(InfoID).ToString().Trim()); sOut.Append(""); sOut.Append("|"); #endregion #region 相关资源列表 string list_Capital = bcx.getInfoList("Capital", InfoID); sOut.Append(list_Capital.Trim()); sOut.Append("|"); string list_Project = bcx.getInfoList("Project", InfoID); sOut.Append(list_Project.Trim()); sOut.Append("|"); string list_Merchant = bcx.getInfoList("Merchant", InfoID); sOut.Append(list_Merchant.Trim()); sOut.Append("|"); string list_Others = bcx.getInfoList("Others", InfoID); sOut.Append(list_Others.Trim()); sOut.Append("|"); string list_News = bcx.getInfoList("News", InfoID); sOut.Append(list_News.Trim()); #endregion return(sOut.ToString().Trim()); }
//public string InfoContactByID(string InfoID, string LoginName) public string GetContactDetail(string InfoID) { string LoginName = ""; #region 资源是否购买的提示信息 string WhetherCharges_button = ""; //按钮提示 string WhetherCharges_Clew = ""; //提示信息 int FixPriceID = 0; string infoTypeName = ""; decimal MainPointCount = 0; string userState = "Charge"; // Charge购买 / Login登陆 / View查看 string payDomain = System.Configuration.ConfigurationManager.AppSettings["payDomain"]; string buyUrl = payDomain + "/order_item.aspx?InfoID=" + InfoID; //资源购买的路径 Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); DataTable dt = dal.GetList("MainInfoTab", "InfoID,FixPriceID,MainPointCount,InfoType", "InfoID", 1, 1, 0, 1, "InfoID=" + Convert.ToInt64(InfoID)); if (dt != null && dt.Rows.Count > 0) { FixPriceID = Convert.ToInt32(dt.Rows[0]["FixPriceID"].ToString().Trim()); MainPointCount = Convert.ToDecimal(dt.Rows[0]["MainPointCount"].ToString().Trim()); infoTypeName = dt.Rows[0]["InfoType"].ToString().Trim(); } //if (User.Identity.Name != null && LoginName.Trim() == User.Identity.Name.Trim())//已登陆 //{ if (MainPointCount > 0 && FixPriceID > 1) //是否免费信息 { bool bIsBuy = false; //这是一条收费信息 Tz888.BLL.Info.CapitalInfoBLL ciBll = new Tz888.BLL.Info.CapitalInfoBLL(); bIsBuy = ciBll.bIsBuyInfoOfUser(LoginName, InfoID); if (bIsBuy) { userState = "View"; } else { userState = "Charge"; } } else { userState = "View"; } //} switch (userState) { case "Login": //提示登陆 //WhetherCharges_button = "<a href=\"http://member.topfo.com\"><img src=\"/CommonV3/img/res3_btn14.gif\" alt=\"请先登陆\"></a>"; //WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为该资源的项目核心资料,你需要登陆才能查看!</span><span class=\"btn\">" + // "<a href=\"http://member.topfo.com\"><img src=\"/CommonV3/img/res3_btn14.gif\" alt=\"点击登陆\" /></a></span>" + // "<div class=\"clear\"></div>"; //break; case "View": //提示查看 WhetherCharges_button = "<a href=\"#88\" onclick=\"javascript:GetContactDetail(" + InfoID + ");\" ><img src=\"/CommonV3/img/res3_btn13.gif\" alt=\"请点击查看\"></a>"; WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为项目核心资料,你需要购买才能查看!</span><span class=\"btn\">" + "<a href=\"#88\" onclick=\"javascript:GetContactDetail(" + InfoID + ");\"><img src=\"/CommonV3/img/res3_btn13.gif\" alt=\"点击查看\" /></a></span>" + "<div class=\"clear\"></div>"; break; case "Charge": //提示购买 WhetherCharges_button = "<a href=\"" + buyUrl + "\"><img src=\"/CommonV3/img/res3_btn7.gif\" alt=\"请点击购买\"></a>"; WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为项目核心资料,你需要购买才能查看!</span><span class=\"btn\">" + "<a href=\"" + buyUrl + "\"><img src=\"/CommonV3/img/res3_btn7.gif\" alt=\"点击购买\" /></a></span>" + "<div class=\"clear\"></div>"; break; } #endregion StringBuilder sbContact = new StringBuilder(); string cacheName = "Cache_Info_" + InfoID; if (userState.Trim() == "View") { if (HttpContext.Current.Cache[cacheName] != null && HttpContext.Current.Cache[cacheName].ToString() != "") { sbContact.Append(HttpContext.Current.Cache[cacheName].ToString()); } else { Tz888.Model.Info.InfoContactModel model = new Tz888.Model.Info.InfoContactModel(); Tz888.BLL.Info.InfoContact dal_IC = new Tz888.BLL.Info.InfoContact(); model = dal_IC.GetModel(Convert.ToInt64(InfoID)); sbContact.Append("<a name='#88' id='##88'> </a>"); sbContact.Append("项目建设单位: " + model.OrganizationName.Trim() + "<br />"); sbContact.Append("联系人: " + model.Name.Trim() + "<br />"); sbContact.Append("职位: " + model.Career.Trim() + "<br />"); sbContact.Append("固定电话: " + model.TelStateCode + "-" + model.TelNum.Trim() + "<br />"); sbContact.Append("手机: " + model.Mobile.Trim() + "<br />"); sbContact.Append("电子邮箱: " + model.Email + "<br />"); sbContact.Append("项目单位详细地址: " + model.Address + "<br />"); sbContact.Append("项目单位网址: " + model.WebSite); sbContact.Append("|"); string fujianStr = ""; //7,附件列表 fujianStr = getInfoResourceById(Convert.ToInt64(InfoID)); sbContact.Append(fujianStr.Trim()); sbContact.Append("|"); switch (infoTypeName.ToLower()) { case "merchant": Tz888.IDAL.Info.IMarchantInfo dal1 = Tz888.DALFactory.DataAccess.CreateInfo_MarchantInfo(); Tz888.Model.Info.MerchantSetModel TheInfo1 = new Tz888.Model.Info.MerchantSetModel(); TheInfo1 = dal1.GetIntegrityModel(Convert.ToInt64(InfoID)); sbContact.Append(TheInfo1.MerchantInfoModel.ProjectStatus); //项目现状及规划 sbContact.Append("|"); sbContact.Append(TheInfo1.MerchantInfoModel.marketAbout); //项目优势及市场分析 sbContact.Append("|"); sbContact.Append(TheInfo1.MerchantInfoModel.Benefit); //经济效益分析 break; case "project": Tz888.IDAL.Info.IProjectInfo dal2 = Tz888.DALFactory.DataAccess.CreateInfo_ProjectInfo(); Tz888.Model.Info.ProjectSetModel TheInfo2 = dal2.GetIntegrityModel(Convert.ToInt64(InfoID)); sbContact.Append(TheInfo2.ProjectInfoModel.nDwlyysy.ToString()); //单位年营业收入 sbContact.Append("|"); sbContact.Append(TheInfo2.ProjectInfoModel.nDwljly.ToString()); //单位年净利润 sbContact.Append("|"); sbContact.Append(TheInfo2.ProjectInfoModel.nDwzzc.ToString()); //单位总资产 sbContact.Append("|"); sbContact.Append(TheInfo2.ProjectInfoModel.nDwzfz.ToString()); //单位总负债 sbContact.Append("|"); sbContact.Append(TheInfo2.ProjectInfoModel.ProjectAbout.ToString()); //产品概述 sbContact.Append("|"); sbContact.Append(TheInfo2.ProjectInfoModel.marketAbout.ToString()); //市场前景 sbContact.Append("|"); sbContact.Append(TheInfo2.ProjectInfoModel.competitioAbout.ToString()); //竞争分析 sbContact.Append("|"); sbContact.Append(TheInfo2.ProjectInfoModel.BussinessModeAbout.ToString()); //商业模式 sbContact.Append("|"); sbContact.Append(TheInfo2.ProjectInfoModel.ManageTeamAbout.ToString()); //管理团队 break; case "capital": Tz888.IDAL.Info.IInfoContact dal3 = Tz888.DALFactory.DataAccess.CreateInfo_InfoContact(); Tz888.Model.Info.InfoContactModel TheInfo3 = dal3.GetModel(Convert.ToInt64(InfoID)); sbContact.Append(TheInfo3.OrgIntro.ToString()); //投资方简介 break; default: break; } HttpContext.Current.Cache[cacheName] = sbContact.ToString(); } } return(sbContact.ToString().Trim()); }
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; }
protected void btnUpdate_Click(object sender, EventArgs e) { Tz888.Model.Info.CapitalSetModel model = new Tz888.Model.Info.CapitalSetModel(); model.InfoContactModel = this.CapitalAddressInfo1.InfoContact; model.InfoContactManModels = this.CapitalAddressInfo1.InfoContactMans; model.CapitalInfoAreaModels = this.ZoneMoreSelectControl1.CapitalInfoAreaModels; #region 投资信息实体赋值 model.CapitalInfoModel.ComAbout = this.txtCapitalIntent.Value.Trim(); model.CapitalInfoModel.CapitalTypeID = this.rblCapitalType.SelectedValue; model.CapitalInfoModel.Currency = this.ddlCurrency.SelectedValue; model.CapitalInfoModel.CapitalID = this.ddlCapital.SelectedValue; model.CapitalInfoModel.ComBreif = this.ViewState["ComBreif"].ToString(); model.CapitalInfoModel.IndustryBID = this.SelectIndustryControl1.IndustryString; model.CapitalInfoModel.CooperationDemandType = ""; for (int i = 0; chkLstCooperationDemand.Items.Count > i; i++) { if (chkLstCooperationDemand.Items[i].Selected) { model.CapitalInfoModel.CooperationDemandType += chkLstCooperationDemand.Items[i].Value + ","; } } #endregion model.MainInfoModel.InfoID = Convert.ToInt64(this.ViewState["InfoID"]); if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim())) { model.MainInfoModel.Title = this.txtCapitalName.Text.Trim(); } model.MainInfoModel.publishT = Convert.ToDateTime(this.ViewState["PublishT"]); model.MainInfoModel.LoginName = ""; //用户名称 string keyword = ""; if (!string.IsNullOrEmpty(this.txtKeyword1.Text.Trim())) { keyword += this.txtKeyword1.Text.Trim() + ","; } if (!string.IsNullOrEmpty(this.txtKeyword2.Text.Trim())) { keyword += this.txtKeyword2.Text.Trim() + ","; } if (!string.IsNullOrEmpty(this.txtKeyword3.Text.Trim())) { keyword += this.txtKeyword3.Text.Trim() + ","; } model.MainInfoModel.KeyWord = keyword; model.MainInfoModel.Descript = ""; model.MainInfoModel.DisplayTitle = this.txtCapitalName.Text.Trim(); model.MainInfoModel.FrontDisplayTime = System.DateTime.Now; model.MainInfoModel.ValidateStartTime = System.DateTime.Now.AddDays(1); model.MainInfoModel.ValidateTerm = Convert.ToInt32(this.ddlValiditeTerm.SelectedValue.Trim()); model.MainInfoModel.TemplateID = "001"; model.MainInfoModel.HtmlFile = ViewState["HtmlFile"].ToString(); model.ShortInfoModel.ShortInfoControlID = Convert.ToString(ViewState["ShortInfoControlID"]); model.ShortInfoModel.ShortTitle = ViewState["ShortTitle"].ToString(); model.ShortInfoModel.ShortContent = ViewState["ShortContent"].ToString(); model.ShortInfoModel.Remark = ""; List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = Tz888.Common.InfoResourceManage.ImageTransfer("Image", "Capital", Tz888.Common.ResourceType.Image, Tz888.Common.ResourceProperty.InfoImage, ImageUploadControl1.InfoList); if (infoResourceModels != null) { model.InfoResourceModels.AddRange(infoResourceModels); } Tz888.BLL.Info.CapitalInfoBLL bll = new Tz888.BLL.Info.CapitalInfoBLL(); if (bll.Update(model)) { Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "修改信息成功!", Request.Url.ToString()); } else { Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "修改信息失败!", Request.Url.ToString()); } }
public string GetContactDetail(string InfoID) { StringBuilder sb = new StringBuilder(); string LoginName = ""; #region 资源是否购买的提示信息 //string WhetherCharges_button = ""; //按钮提示 //string WhetherCharges_Clew = ""; //提示信息 int FixPriceID = 0; //资源是否收费 string infoTypeName = ""; decimal MainPointCount = 0; //资源报价 string userState = "Charge"; // Charge购买 / Login登陆 / View查看 string payDomain = System.Configuration.ConfigurationManager.AppSettings["payDomain"]; string buyUrl = payDomain + "/order_item.aspx?InfoID=" + InfoID; //资源购买的路径 Tz888.BLL.Conn dal = new Tz888.BLL.Conn(); DataTable dt = dal.GetList("MainInfoTab", "InfoID,FixPriceID,MainPointCount,InfoType", "InfoID", 1, 1, 0, 1, "InfoID=" + Convert.ToInt64(InfoID)); if (dt != null && dt.Rows.Count > 0) { FixPriceID = Convert.ToInt32(dt.Rows[0]["FixPriceID"].ToString().Trim()); MainPointCount = Convert.ToDecimal(dt.Rows[0]["MainPointCount"].ToString().Trim()); infoTypeName = dt.Rows[0]["InfoType"].ToString().Trim(); } if (MainPointCount > 0 && FixPriceID > 1) //是否免费信息 { bool bIsBuy = false; //这是一条收费信息 Tz888.BLL.Info.CapitalInfoBLL ciBll = new Tz888.BLL.Info.CapitalInfoBLL(); bIsBuy = ciBll.bIsBuyInfoOfUser(LoginName, InfoID); if (bIsBuy) { userState = "View"; } else { userState = "Charge"; } } else { userState = "View"; } switch (userState) { case "View": //提示查看 //WhetherCharges_button = "<a href=\"#88\" onclick=\"javascript:GetContactDetail(" + InfoID + ");\" ><img src=\"/CommonV3/img/res3_btn13.gif\" alt=\"请点击查看\"></a>"; //WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为项目核心资料,你需要购买才能查看!</span><span class=\"btn\">" + // "<a href=\"#88\" onclick=\"javascript:GetContactDetail(" + InfoID + ");\"><img src=\"/CommonV3/img/res3_btn13.gif\" alt=\"点击查看\" /></a></span>" + // "<div class=\"clear\"></div>"; sb.Append(""); break; case "Charge": //提示购买 //WhetherCharges_button = "<a href=\"" + buyUrl + "\"><img src=\"/CommonV3/img/res3_btn7.gif\" alt=\"请点击购买\"></a>"; //WhetherCharges_Clew = "<span class=\"tit f_tit3\">以下为项目核心资料,你需要购买才能查看!</span><span class=\"btn\">" + // "<a href=\"" + buyUrl + "\"><img src=\"/CommonV3/img/res3_btn7.gif\" alt=\"点击购买\" /></a></span>" + // "<div class=\"clear\"></div>"; break; } return(sb.ToString().Trim()); #endregion }
protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e) { Tz888.BLL.Info.CapitalInfoBLL capitalObj = new Tz888.BLL.Info.CapitalInfoBLL(); Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel(); //创建主体信息实体 Tz888.Model.Info.CapitalInfoModel capitalInfoModel = new Tz888.Model.Info.CapitalInfoModel(); //创建投资信息实体 Tz888.Model.Info.InfoContactModel infoContactModel = new Tz888.Model.Info.InfoContactModel(); //创建信息联系方式主体 Tz888.Model.Info.ShortInfoModel shortInfoModel = new Tz888.Model.Info.ShortInfoModel(); //创建短信息实体 List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表 List <Tz888.Model.Info.CapitalInfoAreaModel> capitalInfoAreaModels = new List <Tz888.Model.Info.CapitalInfoAreaModel>(); //投资区域信息实体列表 List <Tz888.Model.Info.InfoContactManModel> infoContactManModels = new List <Tz888.Model.Info.InfoContactManModel>(); //联系人实体列表 List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //投资信息资源信息实体 DateTime time_now = DateTime.Now; infoContactModel = this.CapitalAddressInfo1.InfoContact; industryModels = this.SelectIndustryControl1.IndustryModels; capitalInfoAreaModels = this.ZoneMoreSelectControl1.CapitalInfoAreaModels; infoContactManModels = this.CapitalAddressInfo1.InfoContactMans; #region 投资信息实体赋值 capitalInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtCapitalIntent.Value.Trim()); capitalInfoModel.CapitalTypeID = this.rblCapitalType.SelectedValue; capitalInfoModel.Currency = this.ddlCurrency.SelectedValue; capitalInfoModel.CapitalID = this.ddlCapital.SelectedValue; capitalInfoModel.ComBreif = ""; capitalInfoModel.CooperationDemandType = ""; capitalInfoModel.IndustryBID = ""; foreach (Tz888.Model.Common.IndustryModel model in industryModels) { capitalInfoModel.IndustryBID += model.IndustryBID + ","; } for (int i = 0; chkLstCooperationDemand.Items.Count > i; i++) { if (chkLstCooperationDemand.Items[i].Selected) { capitalInfoModel.CooperationDemandType += chkLstCooperationDemand.Items[i].Value + ","; } } #endregion if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim())) { mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim()); } string CountryCode; try { CountryCode = capitalInfoAreaModels[0].CountryCode; } catch { CountryCode = "ALL"; } mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Capital", industryModels[0].IndustryBID, CountryCode, time_now); mainInfoModel.publishT = time_now; mainInfoModel.Hit = 0; mainInfoModel.IsCore = true; mainInfoModel.LoginName = Page.User.Identity.Name; //mainInfoModel.LoginName = "Clandylee"; //用户名称 mainInfoModel.InfoOriginRoleName = "0"; //用户角色 mainInfoModel.GradeID = "0"; mainInfoModel.FixPriceID = "1"; mainInfoModel.FeeStatus = 0; string keyword = ""; if (!string.IsNullOrEmpty(this.txtKeyword1.Text.Trim())) { keyword += Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtKeyword1.Text.Trim()) + ","; } if (!string.IsNullOrEmpty(this.txtKeyword2.Text.Trim())) { keyword += Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtKeyword2.Text.Trim()) + ","; } if (!string.IsNullOrEmpty(this.txtKeyword3.Text.Trim())) { keyword += Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtKeyword3.Text.Trim()) + ","; } mainInfoModel.KeyWord = keyword; mainInfoModel.Descript = ""; if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim())) { mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim()); } mainInfoModel.FrontDisplayTime = time_now; mainInfoModel.ValidateStartTime = time_now; mainInfoModel.ValidateTerm = Convert.ToInt32(this.ddlValiditeTerm.SelectedValue.Trim()); mainInfoModel.TemplateID = "001"; mainInfoModel.HtmlFile = ""; shortInfoModel.ShortInfoControlID = "CapitalIndex1"; if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim())) { shortInfoModel.ShortTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim()); } shortInfoModel.ShortContent = ""; shortInfoModel.Remark = ""; //将已上传的图片从临时目录迁移到正式目录 //infoResourceModels = Tz888.Common.InfoResourceManage.ImageTransfer("Image", "Capital", Tz888.Common.ResourceType.Image, Tz888.Common.ResourceProperty.InfoImage, ImageUploadControl1.InfoList); infoResourceModels = ImageUploadControl1.InfoList; Tz888.BLL.Info.CapitalInfoBLL bll = new Tz888.BLL.Info.CapitalInfoBLL(); //long infoID = bll.Insert(mainInfoModel, capitalInfoModel, infoContactModel, shortInfoModel, capitalInfoAreaModels, infoContactManModels, infoResourceModels); long infoID = bll.Insert(mainInfoModel, capitalInfoModel, infoContactModel, shortInfoModel, capitalInfoAreaModels, infoResourceModels); if (infoID > 0) { bool isTof = Page.User.IsInRole("GT1002"); if (isTof) { string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Capital", mainInfoModel.InfoCode, infoID); Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL(); mainBll.HasHtmlFile(infoID, HtmlFile); string actionMsg = ""; Tz888.BLL.PageStatic.CapitalPageStatic staticobj = new Tz888.BLL.PageStatic.CapitalPageStatic(); staticobj.CreateStaticPageCapital(infoID.ToString(), ref actionMsg); } Response.Redirect("PublishCapital2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Capital|" + this.txtCapitalName.Text.Trim())); } else { Tz888.Common.MessageBox.Show(this.Page, "发布失败!"); } }
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; }
public string GetAllOtherInfoByInfoIDForStaticPage(string InfoID, string LoginName) { #region 互告跟踪记录 ///------------------------------ ///--design by AdSystem_20090620 ///------------------------------ string sitekey = ""; AdSystem.Logic loc = new AdSystem.Logic(); if (HttpContext.Current.Request.Cookies["S"] != null && HttpContext.Current.Request.Cookies["S"].Value.Trim() != "") { sitekey = HttpContext.Current.Request.Cookies["S"].Value.Trim(); HttpContext.Current.Request.Cookies["S"].Expires = DateTime.Now.AddDays(-1); bool flag = loc.setCookie(sitekey, InfoID); if (flag) { loc.Hits_Add(); } } //跟踪浏览的用户 if (LoginName.Trim() != "") { loc.View_Add(InfoID, LoginName); } #endregion #region 信息参数说明 StringBuilder sOut = new StringBuilder(); long lgCurrentPage = 1; long lgPageSize = 0; long lgPageCount = 0; decimal MainPointCount = 0; string CurrentUserName = ""; CurrentUserName = LoginName; string MemberURL = ""; //用户会员资料展示页面 bool bIsTofMember = false; //用户是否是拓富通会员 if (User.IsInRole("GT1002")) { //拓富通会员 if (CurrentUserName.Trim() != "") { bIsTofMember = true; } } string sContract = ""; //1,用户的联系方式信息 | 2,type #endregion #region 获取用户的联系方式信息 string PublishMan = ""; string NickName = ""; string SelfWebDomain = ""; //网上展厅域名 string InfoTypeName = ""; int FixPriceID = 0; string InfoOriginRoleName = "0"; string ManageTypeID = ""; Tz888.BLL.Common.CommonFunction cf = new Tz888.BLL.Common.CommonFunction(); DataTable dt = cf.GetDTFromTableOrView("MainInfoViw", "infoid", "*", " infoid=" + InfoID, "InfoID", ref lgCurrentPage, lgPageSize, ref lgPageCount); if (dt != null && dt.Rows.Count > 0) { FixPriceID = Convert.ToInt32(dt.Rows[0]["FixPriceID"].ToString().Trim()); MainPointCount = Convert.ToDecimal(dt.Rows[0]["MainPointCount"].ToString().Trim()); InfoOriginRoleName = dt.Rows[0]["InfoOriginRoleName"].ToString().Trim(); PublishMan = dt.Rows[0]["LoginName"].ToString().Trim(); ManageTypeID = dt.Rows[0]["ManageTypeID"].ToString().Trim(); Tz888.BLL.Conn con = new Tz888.BLL.Conn(); DataTable domain = con.GetWebSiteList("SelfCreateWebInfo", "Domain", "LoginName", 1, 1, 0, 1, "LoginName='" + PublishMan + "'"); if (domain.Rows.Count > 0) { SelfWebDomain = domain.Rows[0]["Domain"].ToString(); } } string ToSelfWebDomain = ""; string href = ""; if (SelfWebDomain != "") { if (ManageTypeID == "2004") { href = "http://" + SelfWebDomain + ".gov.topfo.com"; } else { href = "http://" + SelfWebDomain + ".co.topfo.com"; } ToSelfWebDomain = "<a href='" + href + "' target='_blank'><img src='/images/huiy_23.jpg' width='206' height='30' /></a>"; } //总站发布的信息 string sManage = "<a href='#88' onclick=\"javascript:GetContactDetail(" + InfoID + ");\" class='spaces' ><img src='/web13/images/project/button_cklxfs.gif' width='150' height='30' align='absmiddle' /></a> " + ToSelfWebDomain + "|1"; //免费的信息的内容 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> " + ToSelfWebDomain + "|1"; //收费的信息内容(需要购买才能看) string payDomain = System.Configuration.ConfigurationManager.AppSettings["payDomain"]; string sChange = "<a href=\"" + payDomain + "/order_item.aspx?InfoID=" + InfoID + "\" class=\"spaces\"><img src='/web13/images/project/button_ljgm.gif' width=\"130\" height=\"30\" border=\"0\" align=\"absmiddle\" /></a> <a href=\"http://member.topfo.com/PayManage/shopcar.aspx?InfoID=" + InfoID + "\" class=\"spaces\" target=\"_blank\"><img src=\"/web13/images/project/button_flgwc.gif\" width=\"150\" height=\"30\" border=\"0\" align=\"absmiddle\" /></a><br /><font color='#CCCCCC'>支持多种支付方式,资源若无效经中国招商投资网确认后可全额返还所付款项,请放心购买</font><br>" + ToSelfWebDomain + "|2"; if (MainPointCount > 0 && FixPriceID > 1) //当前用户名 { bool bIsBuy = false; //这是一条收费信息 Tz888.BLL.Info.CapitalInfoBLL ciBll = new Tz888.BLL.Info.CapitalInfoBLL(); bIsBuy = ciBll.bIsBuyInfoOfUser(CurrentUserName, InfoID); if (bIsBuy) { if (InfoOriginRoleName == "0") { sContract = sFree; } else { sContract = sManage; } } else { if (bIsTofMember) { //拓富通会员购买了此信息 if (InfoOriginRoleName == "0") { sContract = sFree; } else { sContract = sManage; } } else { //拓富通会员没有购买了此信息 sContract = sChange; } } } else { //这是一条免费信息 if (InfoOriginRoleName == "0") { sContract = sFree; } else { sContract = sManage; } } #endregion sOut.Append(sContract.Trim()); sOut.Append("|"); //3,null #region 点击量 string Hits = "0"; //4,多少人关注 //if (dv != null && dv.Table.Rows.Count > 0) if (dt != null && dt.Rows.Count > 0) { Hits = dt.Rows[0]["hit"].ToString().Trim(); } #endregion sOut.Append("|"); sOut.Append(Hits.Trim()); #region 收藏与浏览量 string ViewCollection = "0"; //5,多少人收藏,同时更新浏览次数 if (MainPointCount > 0 && FixPriceID > 1) { Tz888.BLL.Info.MatchInfoBLL miBLL = new Tz888.BLL.Info.MatchInfoBLL(); miBLL.dvViewCollectionCount(InfoID);//更新浏览次数 Tz888.BLL.Info.MainInfoBLL mainBLL = new Tz888.BLL.Info.MainInfoBLL(); ViewCollection = mainBLL.GetInfoBuyersCount(Convert.ToInt64(InfoID)).ToString(); } else { Tz888.BLL.Info.MatchInfoBLL miBLL = new Tz888.BLL.Info.MatchInfoBLL(); DataView dvViewCollection = miBLL.dvViewCollectionCount(InfoID); if (dvViewCollection != null && dvViewCollection.Table.Rows.Count > 0) { ViewCollection = Convert.ToInt32(dvViewCollection.Table.Rows[0][0]).ToString(); } } #endregion sOut.Append("|"); sOut.Append(ViewCollection.Trim()); #region 查询推荐的次数 ///------------------------------------------ ///-- 20090601 ---------------- 6,查询推荐的次数 ///------------------------------------------ Tz888.BLL.CommendBLL com = new Tz888.BLL.CommendBLL(); long currpage = 1; long pagecount = 1; int count = com.GetListCount("*", "InfoID=" + InfoID.ToString(), "", ref currpage, 1, ref pagecount); #endregion sOut.Append("|"); sOut.Append(count.ToString().Trim()); #region 附件列表 string fujianStr = ""; //7,附件列表 fujianStr = getInfoResourceById(Convert.ToInt64(InfoID), InfoOriginRoleName, MainPointCount, FixPriceID, bIsTofMember); #endregion sOut.Append("|"); sOut.Append(fujianStr.Trim()); sOut.Append("|"); //8,资源价格 sOut.Append(MainPointCount.ToString()); sOut.Append("|"); if (MainPointCount > 0 && FixPriceID > 1)//9,判断是否为收费资源 { sOut.Append("收费"); } else { sOut.Append("免费"); } return(sOut.ToString().Trim()); }
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('系统升级中。。。');\"> 给项目方留言></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()); } }