Exemple #1
0
    public void send_autoreg()
    {
        AdSystem.siteCookie bll = new AdSystem.siteCookie();
        AdSystem.Logic      loc = new AdSystem.Logic();
        bool   flag = false;
        string userLoginname, siteKey, infoID;
        int    isCheckLogin = Convert.ToInt32(Request.QueryString["checkLogin"]);

        userLoginname = Request.QueryString["loginname"];

        if (isCheckLogin == 0 || userLoginname.Trim() == "")
        {
            return;
        }
        else
        {
            DataTable dt = bll.getUserRegType(userLoginname);
            if (dt != null && dt.Rows.Count > 0 && dt.Rows[0]["autoReg"].ToString().Trim() == "1")//判断用户是否为自动注册用户
            {
                //设置网站的登陆
                siteKey = Request.QueryString["sitekey"].Trim();
                infoID  = Request.QueryString["infoid"].Trim();
                flag    = loc.setCookie(siteKey, infoID);

                ////写登陆cookie开始
                DoLogin(userLoginname);
            }
            else
            {
                Response.Redirect("Login.aspx");
                return;
            }
        }
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        des = new AdSystem._DES();
        loc = new AdSystem.Logic();

        infoURL   = "";
        infoTitle = "";
        manageurl = "";
        pwdurl    = "";

        if (!IsPostBack)
        {
            if (Request.QueryString["key"] != null && Request.QueryString["key"].ToString().Trim() != "")
            {
                keyStr = Request.QueryString["key"].ToString();
                string flag = getString(UnEscape(keyStr));
            }
            else
            {
                //string str = "sitekey=1eae257e44aa9d5b" + "&infoid=1054669" + "&validatanum=123456" + "&uid=mylove"
                //    + "&linkman=王伟" + "&[email protected]" + "&tel=122222" + "&addr=深圳";
                //string str1 = des.EncryptString(str);
                //string str2 = des.DecryptString(str1);

                //Response.Redirect("info.aspx?key=" + Escape(str1));
                return;
            }
        }
    }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ///------------------------------
     ///--design by AdSystem_20090620
     ///------------------------------
     if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "")
     {
         Response.Redirect("../Login.aspx");
     }
     else
     {
         AdSystem.Logic loc = new AdSystem.Logic();
         loc.AdLogin_Add(Page.User.Identity.Name.Trim());
     }
 }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ///------------------------------
        ///--design by AdSystem_20090620
        ///------------------------------
        bool   isBuy     = false;
        string viewid    = "0";
        string loginName = "";

        if (Request.QueryString["v"] != null && Request.QueryString["v"].ToString() != "")
        {
            viewid = Request.QueryString["v"].ToString().Trim();
        }
        if (Request.QueryString["LoginName"] != null && Request.QueryString["LoginName"].ToString() != "")
        {
            loginName = Request.QueryString["LoginName"].ToString().Trim();
        }
        AdSystem.Logic loc = new AdSystem.Logic();
        isBuy = loc.ViewInfo_IsBuy(Convert.ToInt64(viewid), loginName);
        if (!isBuy)
        {
            Response.Write("<script language=javascript>alert('您没有查看的权限,查询此信息需要花费1元,请先购买!');window.close();</script>");
            return;
        }



        //要传的值 ManageTypeID = 1001  LoginName
        if (Request.QueryString["LoginName"] != null)
        {
            // ManageTypeID=Request.QueryString["ManageTypeID"] ;
            LoginName = Request.QueryString["LoginName"].ToString().Trim();
            //注册信息
            Tz888.BLL.Login.LoginInfoBLL obj1 = new Tz888.BLL.Login.LoginInfoBLL();
            //登记联系人

            Tz888.BLL.Register.common            obj2   = new Tz888.BLL.Register.common();
            Tz888.Model.Register.OrgContactModel model2 = new Tz888.Model.Register.OrgContactModel();
            //会员信息表

            Tz888.Model.Register.MemberInfoModel model3 = new Tz888.Model.Register.MemberInfoModel();
            Tz888.BLL.Register.MemberInfoBLL     obj3   = new Tz888.BLL.Register.MemberInfoBLL();
            //会员登陆信息
            Tz888.SQLServerDAL.Conn obj4 = new Tz888.SQLServerDAL.Conn();
            // DataTable dt4 = obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 1, 1, 1, 1, "LoginName='"+LoginName+"'");
            //会员发布信息
            //  DataTable dt5 = obj4.GetList("MainInfoViw", "Title,PublishT,HtmlFile", "PublishT", 1000, 1, 0, 1, "LoginName='" + LoginName + "' ");

            DataTable dt1 = obj1.GetLoginInfoList("*", "LoginName='" + LoginName + "'", "LoginName");
            model2 = obj2.getContactModel(LoginName);

            model3 = obj3.GetModel("LoginName='" + LoginName + "'");

            if (dt1.Rows.Count > 0)
            {
                #region 信息绑定
                lbRealName.Text        = dt1.Rows[0]["RealName"].ToString() == "" ? dt1.Rows[0]["NickName"].ToString() : dt1.Rows[0]["RealName"].ToString();;
                lbLoginName.Text       = dt1.Rows[0]["LoginName"].ToString();
                lbNickName.Text        = dt1.Rows[0]["NickName"].ToString();
                lblNickName2.Text      = dt1.Rows[0]["NickName"].ToString();
                HyperLink1.NavigateUrl = "http://member.topfo.com/helper/FriendManager/FriendFore.aspx?name=" + lbLoginName.Text;
                HyperLink2.NavigateUrl = "http://member.topfo.com/InnerInfo/SendView.aspx?name=" + lbNickName.Text;
                switch (dt1.Rows[0]["ManageTypeID"].ToString().Trim())
                {
                case "1001":
                    lbManageType.Text = "个人会员";
                    break;

                case "1003":
                    lbManageType.Text = "企业会员";
                    break;

                case "1004":
                    lbManageType.Text = "政府会员";
                    break;

                default:
                    break;
                }
                switch (dt1.Rows[0]["MemberGradeID"].ToString().Trim())
                {
                case "1001":
                    GradeDiv.Visible = false;
                    break;

                case "1002":
                    GradeDiv.Visible = true;
                    break;

                default:
                    break;
                }

                string   req       = dt1.Rows[0]["RequirInfo"].ToString().Trim();
                string[] strReq    = req.Split(',');
                string   strRequar = "";
                for (int i = 0; i < strReq.Length; i++)
                {
                    switch (strReq[i].Trim())
                    {
                    case "1001":
                        strRequar += "政府招商 ";
                        break;

                    case "1002":
                        strRequar += "企业招商 ";
                        break;

                    case "1003":
                        strRequar += "项目融资 ";
                        break;

                    case "1004":
                        strRequar += "项目投资 ";
                        break;

                    case "1005":
                        strRequar += "创业合作 ";
                        break;

                    case "1006":
                        strRequar += "产品供求 ";
                        break;

                    default:
                        break;
                    }
                }

                lbRequar.Text = strRequar;//会员意向

                lbRegTime.Text = dt1.Rows[0]["RegisterTime"].ToString();
            }

            if (model2 != null)
            {
                lbCareer.Text           = model2.Career;
                lbOrganizationName.Text = model2.OrganizationName != "" ? model2.OrganizationName : "暂无";

                lbtAddress.Text = model2.address != "" ? model2.address : "暂无";

                lbSite.Text = model2.Website != "" ? model2.Website : "暂无";
            }

            int rowCount = Convert.ToInt32(obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 1, 1, 1, 1, "LoginName='" + LoginName + "'").Rows[0][0]);
            if (rowCount > 0)
            {
                DataTable dt4 = obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 1, 1, 0, 1, "LoginName='" + LoginName + "'");
                lbLoginCount.Text = rowCount.ToString();
                lbLoginB.Text     = dt4.Rows[0]["LoginTime"].ToString();
            }
            else
            {
                lbLoginCount.Text = "1";
                lbLoginB.Text     = DateTime.Now.ToShortDateString();
            }

            lbPublishCount.Text = obj4.GetList("MainInfoViw", "Title,PublishT,HtmlFile", "PublishT", 1, 1, 1, 1, "LoginName='" + LoginName + "' ").Rows[0][0].ToString();
            if (model3 != null)
            {
                lbSex.Text = model3.Sex ? "(女)" : "(男)";
                try
                {
                    imgHead.ImageUrl = model3.HeadPortrait.ToString() != "" ? ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + model3.HeadPortrait.ToString() : @"../images/publish/noneimg.gif";
                }
                catch { imgHead.ImageUrl = @"../images/publish/noneimg.gif"; }
                lbTel.Text   = model3.Tel;
                lbMoble.Text = model3.Mobile;
                lbFax.Text   = model3.FAX;
            }
            else
            {
                imgHead.ImageUrl = @"../images/publish/noneimg.gif";
            }
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "请求出错");
        }
        #endregion
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            infoID = Request.QueryString["InfoID"];
            string loginname          = Page.User.Identity.Name; //tzWeb.LoginInfo.GetLoginUserName(0);
            int    num                = bbl.CheckDate(Convert.ToInt64(infoID), "1");
            Tz888.BLL.GetDataList bll = new Tz888.BLL.GetDataList();
            dt = bll.GetList("MainInfoTab", "HtmlFile", "InfoID", 1, 1, 0, 1, "InfoId=" + infoID);
            if (num == 1)
            {
                string Money = bbl.OrderByMoney(Convert.ToInt64(infoID), loginname);
                if (Money == "")
                {
                    double userpoint = Convert.ToDouble(tzWeb.pay.comm.getUserPoint(loginname));  //用户余额
                    #region 生成订单号
                    if (infoID != "" && infoID != null)
                    {
                        //生成订单 返回订单号
                        Tz888.BLL.Pay1.PayOrder dal = new Tz888.BLL.Pay1.PayOrder();
                        try
                        {
                            int    ErrorID  = 0;
                            string ErrorMsg = "";

                            int orderno = dal.CreateInfoOrder(Convert.ToInt64(infoID), loginname, ref ErrorID, ref ErrorMsg);  //订单号

                            if (orderno != 0)
                            {
                                AdSystem.Logic loc = new AdSystem.Logic();
                                loc.AdOrder_Add(Convert.ToInt64(orderno));



                                double orderpoint = Convert.ToDouble(tzWeb.pay.comm.getOrderPoint(Convert.ToInt64(orderno)));   //订单金额

                                Response.Redirect("orderBuy_item.aspx?order_no=" + tzWeb.pay.comm.JiaMi(orderno.ToString()) + "&user_on?=" + userpoint.ToString(), false);
                            }
                            else
                            {
                                Tz888.Common.Common.ShowMessage(this.Page, "此信息已不需要付费!", "trade_info_wait.aspx");
                            }
                        }
                        catch
                        {
                            Tz888.Common.Common.ShowMessage(this.Page, "此信息已不需要付费!", "trade_info_wait.aspx");
                        }
                    }
                    #endregion
                }
                else
                {
                    Tz888.Common.Common.ShowMessage(this.Page, "此信息已经购买!", "trade_info_wait.aspx");
                }
            }
            else
            {
                Tz888.Common.Common.ShowMessage(this.Page, "此信息已经过期!", "trade_info_wait.aspx");
            }
        }
    }
Exemple #6
0
    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());
    }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ///------------------------------
        ///--design by AdSystem_20090620
        ///------------------------------
        bool   isBuy     = false;
        string viewid    = "0";
        string loginName = "";

        if (Request.QueryString["v"] != null && Request.QueryString["v"].ToString() != "")
        {
            viewid = Request.QueryString["v"].ToString().Trim();
        }
        if (Request.QueryString["LoginName"] != null && Request.QueryString["LoginName"].ToString() != "")
        {
            loginName = Request.QueryString["LoginName"].ToString().Trim();
        }
        AdSystem.Logic loc = new AdSystem.Logic();
        isBuy = loc.ViewInfo_IsBuy(Convert.ToInt64(viewid), loginName);
        if (!isBuy)
        {
            Response.Write("<script language=javascript>alert('您没有查看的权限,查询此信息需要花费1元,请先购买!');window.close();</script>");
            return;
        }


        //要传的值 ManageTypeID = 1003  LoginName
        if (Request.QueryString["LoginName"] != null)
        {
            LoginName = Request.QueryString["LoginName"].ToString();
            //注册信息
            Tz888.BLL.Login.LoginInfoBLL obj1 = new Tz888.BLL.Login.LoginInfoBLL();
            DataTable dt1 = obj1.GetLoginInfoList("*", "LoginName='" + LoginName + "'", "LoginName");
            //登记联系人

            Tz888.BLL.Register.common            obj2   = new Tz888.BLL.Register.common();
            Tz888.Model.Register.OrgContactModel model2 = new Tz888.Model.Register.OrgContactModel();
            model2 = obj2.getContactModel(LoginName);
            //会员信息表

            Tz888.Model.Register.MemberInfoModel model3 = new Tz888.Model.Register.MemberInfoModel();
            Tz888.BLL.Register.MemberInfoBLL     obj3   = new Tz888.BLL.Register.MemberInfoBLL();
            model3 = obj3.GetModel("LoginName='" + LoginName + "'");
            //会员登陆信息
            Tz888.SQLServerDAL.Conn obj4 = new Tz888.SQLServerDAL.Conn();
            // DataTable dt4 = obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 10000, 1, 0, 1, "LoginName='" + LoginName + "'");
            //会员发布信息
            // DataTable dt5 = obj4.GetList("MainInfoViw", "Title,PublishT,HtmlFile", "PublishT", 1000, 1, 0, 1, "LoginName='" + LoginName + "'");
            //公司登记信息
            Tz888.BLL.Register.EnterpriseRegisterBLL obj6 = new Tz888.BLL.Register.EnterpriseRegisterBLL();
            DataTable dt6 = obj6.getEnterpriseModel(LoginName);
            //公司附加信息
            // DataTable dt7 = obj4.GetList("MemberResourceTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='kittycat'");

            if (dt1 != null)
            {
                #region 信息绑定
                lbRealName.Text        = dt1.Rows[0]["RealName"].ToString() == "" ? dt1.Rows[0]["NickName"].ToString() : dt1.Rows[0]["RealName"].ToString();
                lbLoginName.Text       = dt1.Rows[0]["LoginName"].ToString();
                lbNickName.Text        = dt1.Rows[0]["NickName"].ToString();
                lblNickName2.Text      = dt1.Rows[0]["NickName"].ToString();
                HyperLink1.NavigateUrl = "http://member.topfo.com/helper/FriendManager/FriendFore.aspx?name=" + lbLoginName.Text;
                HyperLink2.NavigateUrl = "http://member.topfo.com/InnerInfo/SendView.aspx?name=" + lbNickName.Text;

                switch (dt1.Rows[0]["ManageTypeID"].ToString().Trim())
                {
                case "1001":
                    lbManageType.Text = "个人会员";
                    break;

                case "1003":
                    lbManageType.Text = "企业会员";
                    break;

                case "1004":
                    lbManageType.Text = "政府会员";
                    break;

                default:
                    break;
                }
                switch (dt1.Rows[0]["MemberGradeID"].ToString().Trim())
                {
                case "1001":
                    GradeDiv.Visible = false;
                    break;

                case "1002":
                    GradeDiv.Visible = true;
                    break;

                default:
                    GradeDiv.Visible = false;
                    break;
                }
                string   req       = dt1.Rows[0]["RequirInfo"].ToString();
                string[] strReq    = req.Split(',');
                string   strRequar = "";
                for (int i = 0; i < strReq.Length; i++)
                {
                    switch (strReq[i].Trim())
                    {
                    case "1001":
                        strRequar += "政府招商 ";
                        break;

                    case "1002":
                        strRequar += "企业招商 ";
                        break;

                    case "1003":
                        strRequar += "项目融资 ";
                        break;

                    case "1004":
                        strRequar += "项目投资 ";
                        break;

                    case "1005":
                        strRequar += "创业合作 ";
                        break;

                    case "1006":
                        strRequar += "产品供求 ";
                        break;

                    default:
                        break;
                    }
                }

                lbRequar.Text = strRequar;//会员意向

                lbRegTime.Text = dt1.Rows[0]["RegisterTime"].ToString();


                if (model3 != null)
                {
                    lbSex.Text       = model3.Sex ? "(女)" : "(男)";
                    imgHead.ImageUrl = model3.HeadPortrait.ToString() != "" ? ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + model3.HeadPortrait.ToString() : "../images/MemberData/nopic.gif";
                }

                if (model2 != null)
                {
                    lbCareer.Text           = model2.Career;
                    lbOrganizationName.Text = model2.OrganizationName != "" ? model2.OrganizationName : "暂无";

                    lbtAddress.Text = model2.address != "" ? model2.address : "暂无";

                    string tel = model2.TelCountryCode + model2.TelStateCode + model2.TelNum;
                    lbTel.Text = tel != "" ? tel : "暂无";

                    lbMoble.Text = model2.Mobile != "" ? model2.Mobile : "暂无";

                    string fax = model2.FaxCountryCode + model2.FaxStateCode + model2.FaxNum;
                    lbFax.Text = fax != "" ? fax : "暂无";

                    lbSite.Text = model2.Website != "" ? model2.Website : "暂无";
                }

                int rowCount = Convert.ToInt32(obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 1, 1, 1, 1, "LoginName='" + LoginName + "'").Rows[0][0]);

                if (rowCount > 0)
                {
                    DataTable dt4 = obj4.GetList("LoginLogTab", "LoginTime", "LoginTime", 1, 1, 0, 1, "LoginName='" + LoginName + "'");
                    lbLoginCount.Text = rowCount.ToString();
                    lbLoginB.Text     = dt4.Rows[0]["LoginTime"].ToString();
                }
                else
                {
                    lbLoginCount.Text = "1";
                    lbLoginB.Text     = DateTime.Now.ToShortDateString();
                }

                lbPublishCount.Text = obj4.GetList("MainInfoViw", "Title,PublishT,HtmlFile", "PublishT", 1, 1, 1, 1, "LoginName='" + LoginName + "' ").Rows[0][0].ToString();

                if (dt6 != null)
                {
                    string strMP       = dt6.Rows[0]["MainProduct"].ToString();
                    string MainProduct = "";
                    if (strMP.Trim() != "")
                    {
                        MainProduct = strMP.Remove(strMP.Length - 1);
                    }
                    lbMainProduct.Text = MainProduct != "" ? MainProduct : "暂无";
                    string   str     = dt6.Rows[0]["Industrylist"].ToString();
                    string[] strList = str.Split(',');
                    Tz888.BLL.Common.IndustryBLL obj7 = new Tz888.BLL.Common.IndustryBLL();
                    string strIndustry = "";
                    for (int i = 0; i < strList.Length; i++)
                    {
                        if (strList[i] != "")
                        {
                            strIndustry += obj7.GetNameByID(strList[i]) + " ";
                        }
                    }
                    lbIndustryModels.Text = strIndustry != "" ? strIndustry : "暂无";

                    //  2已审核(已审基本信息),0未审核、1审核通过、3审核不通过、4退款
                    if (dt6.Rows[0]["AuditingStatus"].ToString() == "1")
                    {
                        //查询认证信息
                        DataTable ddt6 = obj4.GetList("OrgAuditTab", "*", "AuditingDate", 1, 1, 0, 1, "LoginName='" + LoginName + "'");

                        lbAuditingStatus.Text = ddt6.Rows[0]["AuditingDate"].ToString() + "通过认证";
                    }
                    else
                    {
                        lbAuditingStatus.Text = "暂未通过认证";
                    }

                    lbExhibitionHall.Text = dt6.Rows[0]["ExhibitionHall"].ToString() != "" ? "http://www." + dt6.Rows[0]["ExhibitionHall"].ToString() + ".co.tz888.cn " : "暂无";
                }
                /// 资源类型
                /// 0 -其他文档
                /// 1 -图片
                /// 2 -视频
                /// <summary>
                /// 资源性质
                /// 0 --其他
                /// 1--立项批文
                ///2--商业计划书

                ///3 --项目视频展播
                /// 附:(公司登记附件 4-8)

                ///4营业执照
                ///5税务登记证(国税)
                ///6税务登记证(地税)
                ///7荣誉和证书

                ///8其它
                if (Page.User.IsInRole("GT1001"))   //普通会员

                {
                    spanRM.Visible = false;
                }
                else
                {
                    DataTable dtmr4 = obj4.GetList("MemberResourceTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='" + LoginName + "' AND ResourceType=4");
                    if (dtmr4 != null)
                    {
                        lbResourceType4.Text = dtmr4.Rows.Count == 0 ? "暂无" : dtmr4.Rows.Count + "张己上传";
                    }
                    else
                    {
                        lbResourceType4.Text = "暂无";
                    }
                    DataTable dtmr56 = obj4.GetList("MemberResourceTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='" + LoginName + "' AND ResourceType=5 OR ResourceType=6");
                    if (dtmr56 != null)
                    {
                        lbResourceType56.Text = dtmr56.Rows.Count == 0 ? "暂无" : dtmr4.Rows.Count + "张己上传";
                    }
                    else
                    {
                        lbResourceType56.Text = "暂无";
                    }

                    DataTable dtmr7 = obj4.GetList("MemberResourceTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='" + LoginName + "' AND ResourceType=7");
                    if (dtmr7 != null)
                    {
                        lbResourceType7.Text = dtmr7.Rows.Count == 0 ? "暂无" : dtmr4.Rows.Count + "张己上传";
                    }
                    else
                    {
                        lbResourceType7.Text = "暂无";
                    }
                }
            }

            #endregion
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "请求出错");
        }
    }
Exemple #8
0
    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>&nbsp;&nbsp;" + 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>&nbsp;&nbsp;" + 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>&nbsp;<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());
    }