Пример #1
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Tz888.Model.Common.DictionaryInfoModel GetModel(string DictionaryCode)
        {
            SqlParameter[] parameters =
            {
                new SqlParameter("@DictionaryInfoId", SqlDbType.Int, 4),
            };
            parameters[0].Value = DictionaryCode;
            Tz888.Model.Common.DictionaryInfoModel model = new Tz888.Model.Common.DictionaryInfoModel();

            DataSet ds = DbHelperSQL.RunProcedure("DictionaryInfoTab_GetModel", parameters, "ds");

            model.DictionaryCode = DictionaryCode;
            if (ds.Tables[0].Rows.Count > 0)
            {
                model.DictionaryInfoName   = ds.Tables[0].Rows[0]["DictionaryInfoName"].ToString();
                model.DictionaryTypeCode   = ds.Tables[0].Rows[0]["DictionaryTypeCode"].ToString();
                model.DictionaryInfoParam  = ds.Tables[0].Rows[0]["DictionaryInfoParam"].ToString();
                model.DictionaryInfoRemark = ds.Tables[0].Rows[0]["DictionaryInfoRemark"].ToString();
                return(model);
            }
            else
            {
                return(null);
            }
        }
Пример #2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(Tz888.Model.Common.DictionaryInfoModel model)
        {
            int rowsAffected;

            SqlParameter[] parameters =
            {
                new SqlParameter("@DictionaryInfoId",     SqlDbType.Int,        4),
                new SqlParameter("@DictionaryCode",       SqlDbType.Char,      25),
                new SqlParameter("@DictionaryInfoName",   SqlDbType.NVarChar),
                new SqlParameter("@DictionaryTypeCode",   SqlDbType.Char,      10),
                new SqlParameter("@DictionaryInfoParam",  SqlDbType.Char,      12),
                new SqlParameter("@DictionaryInfoRemark", SqlDbType.NVarChar)
            };
            parameters[0].Value = model.DictionaryInfoId;
            parameters[1].Value = model.DictionaryCode;
            parameters[2].Value = model.DictionaryInfoName;
            parameters[3].Value = model.DictionaryTypeCode;
            parameters[4].Value = model.DictionaryInfoParam;
            parameters[5].Value = model.DictionaryInfoRemark;

            DbHelperSQL.RunProcedure("UP_DictionaryInfoTab_Update", parameters, out rowsAffected);
        }
Пример #3
0
    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>&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;<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());
    }