Beispiel #1
0
    public string GetContactDetail(string InfoID)
    {
        Tz888.Model.Info.InfoContactModel model = new Tz888.Model.Info.InfoContactModel();
        Tz888.BLL.Info.InfoContact        dal   = new Tz888.BLL.Info.InfoContact();
        model = dal.GetModel(Convert.ToInt64(InfoID));
        StringBuilder sbContact = new StringBuilder();

        sbContact.Append("<table width='98%' class='tabContact' border='0' cellpadding='0' cellspacing='0'>");
        sbContact.Append("<tr>");
        sbContact.Append("<td class='T' align='right'>投资机构:</td>");
        sbContact.Append("<td align='left'>" + model.OrganizationName.Trim() + "</td>");
        sbContact.Append("</tr>");
        sbContact.Append("<tr>");
        sbContact.Append("<td class='T' align='right'>联系人:</td>");
        sbContact.Append("<td align='left'>" + model.Name.Trim() + "</td>");
        sbContact.Append("</tr>");
        sbContact.Append("<tr>");
        sbContact.Append("<td class='T' align='right'>职位:</td>");
        sbContact.Append("<td align='left'>" + model.Career.Trim() + "</td>");
        sbContact.Append("</tr>");
        sbContact.Append("<tr>");
        sbContact.Append("<td class='T' align='right'>固定电话:</td>");
        sbContact.Append("<td align='left'>" + model.TelStateCode + "-" + model.TelNum.Trim() + "</td>");
        sbContact.Append("</tr>");
        sbContact.Append("<tr>");
        sbContact.Append("<td class='T' align='right'>手机:</td>");
        sbContact.Append("<td align='left'>" + model.Mobile.Trim() + "</td>");
        sbContact.Append("</tr>");
        sbContact.Append("<tr>");
        sbContact.Append("<td class='T' align='right'>电子邮箱:</td>");
        sbContact.Append("<td align='left'>" + model.Email + "</td>");
        sbContact.Append("</tr>");
        sbContact.Append("<tr>");
        sbContact.Append("<td class='T' align='right'>联系地址:</td>");
        sbContact.Append("<td align='left'>" + model.Address + "</td>");
        sbContact.Append("</tr>");
        sbContact.Append("<tr>");
        sbContact.Append("<td class='T' align='right'>公司网址:</td>");
        sbContact.Append("<td align='left'>" + model.WebSite + "</td>");
        sbContact.Append("</tr>");
        sbContact.Append(" </table>");
        return(sbContact.ToString().Trim());
    }
Beispiel #2
0
    //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'>&nbsp;</a>");
                sbContact.Append("项目建设单位:&nbsp;" + model.OrganizationName.Trim() + "<br />");
                sbContact.Append("联系人:&nbsp;" + model.Name.Trim() + "<br />");
                sbContact.Append("职位:&nbsp;" + model.Career.Trim() + "<br />");
                sbContact.Append("固定电话:&nbsp;" + model.TelStateCode + "-" + model.TelNum.Trim() + "<br />");
                sbContact.Append("手机:&nbsp;" + model.Mobile.Trim() + "<br />");
                sbContact.Append("电子邮箱:&nbsp;" + model.Email + "<br />");
                sbContact.Append("项目单位详细地址:&nbsp;" + model.Address + "<br />");
                sbContact.Append("项目单位网址:&nbsp;" + 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());
    }