Пример #1
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        string Criteria = "LoginName ='" + Page.User.Identity.Name.Trim() + "'";

        Tz888.SQLServerDAL.Conn obj = new Tz888.SQLServerDAL.Conn();
        DataTable dt = obj.GetList("CustomInfoTab", "*", "LoginName", 1, 1, 0, 1, Criteria);

        Response.Redirect("MyMatching.aspx?tag=Add");
    }
    private void SearchInfoSelect()
    {
        //判断是否为直接搜索
        if (Request.QueryString["type"] != null && Session["strWhere"] != null)
        {
            this.Pager1.TableViewName = "NewsTab_Viw2";
            this.Pager1.StrWhere      = Session["strWhere"].ToString();
            this.Pager1.DataBind();
        }
        else
        {
            DataView  dv;
            DataTable dt;

            DataTable dt1           = (DataTable)this.ViewState["dt"];
            DataRow   dr            = dt1.Rows[0];
            string    strCustomType = dr["CustomType"].ToString(); //this.ViewState[ "CustomType" ].ToString();
            string    strCriteria   = "";
            //对已经取得的查询条件不在取

            if (strCustomType.Trim() != "")
            {
                //#endregion-- 取条件并组织 ----------------

                #region -- 取条件并组织 ----------------
                Tz888.Model.CustomInfoModel CustomInfo = new Tz888.Model.CustomInfoModel();

                if (dr["Calling"] != null)
                {
                    CustomInfo.Calling = dr["Calling"].ToString();
                }
                if (dr["CustomType"] != null)
                {
                    CustomInfo.CustomType = Convert.ToInt32(dr["CustomType"].ToString());
                }
                if (dr["Genre"] != null)
                {
                    CustomInfo.Genre = dr["Genre"].ToString();
                }
                if (dr["Keyword"] != null)
                {
                    CustomInfo.Keyword = dr["Keyword"].ToString();
                }

                if (dr["LoginName"] != null)
                {
                    CustomInfo.LoginName = dr["LoginName"].ToString();
                }
                if (dr["Money"] != null)
                {
                    CustomInfo.Money = dr["Money"].ToString();
                }
                if (dr["SmallCalling"] != null)
                {
                    CustomInfo.SmallCalling = dr["SmallCalling"].ToString();
                }
                if (dr["Type"] != null)
                {
                    CustomInfo.Type = dr["Type"].ToString();
                }
                if (dr["City"] != null)
                {
                    CustomInfo.City = dr["City"].ToString();
                }
                //if (dr["currency"] != null)
                //{
                //    CustomInfo.currency = dr["currency"].ToString().Trim();
                //}
                if (dr["CooperationDemandTypeID"] != null)
                {
                    CustomInfo.CooperationDemandTypeID = dr["CooperationDemandTypeID"].ToString();
                }
                else
                {
                    CustomInfo.CooperationDemandTypeID = "";
                }

                #region 政府招商
                //招商  政府招商
                if (strCustomType == "0")
                {
                    if (CustomInfo.Type.Trim() != "")   //招商类别
                    {
                        strCriteria = "MerchantTypeID IN(";
                        string[] arrType = CustomInfo.Type.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            strCriteria = strCriteria + "'" + arrType[i] + "',";
                        }
                        strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                    }

                    if (CustomInfo.Calling != "") //所属行业
                    {
                        if (strCriteria != "")
                        {
                            strCriteria = strCriteria + " AND (";
                        }
                        else
                        {
                            strCriteria = " (";
                        }
                        string[] arrType = CustomInfo.Calling.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            strCriteria = strCriteria + "IndustryClassList like '%" + arrType[i] + "%' OR ";
                        }
                        strCriteria = strCriteria.Substring(0, strCriteria.Length - 4) + ")";
                    }

                    if (CustomInfo.City != "") //投资区域
                    {
                        string[] arrType = CustomInfo.City.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " AND ProvinceID like '%" + arrType[i].Trim() + "%'";
                            }
                            else if (arrType[i].Trim() != "" && i != 0)
                            {
                                strCriteria = strCriteria + " or ProvinceID like '%" + arrType[i].Trim() + "%',";
                            }
                        }
                    }
                    if (CustomInfo.CooperationDemandTypeID != "") //合作方式
                    {
                        string[] arrType = CustomInfo.CooperationDemandTypeID.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " AND CooperationDemandType like '%" + arrType[i] + "%'";
                            }
                            else if (arrType[i].Trim() != "" && i != 0)
                            {
                                strCriteria = strCriteria + " or CooperationDemandType like '%" + arrType[i] + "%'";
                            }
                        }
                    }
                    if (CustomInfo.Keyword != "")
                    {
                        if (strCriteria != "")
                        {
                            strCriteria = strCriteria + " AND Remark like '%" + CustomInfo.Keyword + "%'";
                        }
                        else
                        {
                            strCriteria = "Remark like '%" + CustomInfo.Keyword + "%'";
                        }
                    }
                    strCriteria = strCriteria + " and AuditStatus =1";
                }
                #endregion
                #region 投资   企业项目
                else if (strCustomType == "2")
                {
                    //if (CustomInfo.Genre.Trim() != "")
                    //{
                    //    strCriteria = "CapitalTypeID IN(";
                    //    string[] arrType = CustomInfo.Genre.Split('|');
                    //    for (int i = 0; i < arrType.Length; i++)
                    //    {
                    //        strCriteria = strCriteria + "'" + arrType[i] + "',";
                    //    }
                    //    strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                    //}

                    if (CustomInfo.Money.Trim() != "")//投资金额
                    {
                        if (strCriteria != "")
                        {
                            strCriteria = strCriteria + " AND CapitalID IN (";
                        }
                        else
                        {
                            strCriteria = " CapitalID IN (";
                        }

                        // strCriteria = "CapitalID IN(";
                        string[] arrType = CustomInfo.Money.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            strCriteria = strCriteria + "'" + arrType[i] + "',";
                        }
                        strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                    }

                    if (CustomInfo.Calling.Trim() != "") //投资行业
                    {
                        string[] arrType = CustomInfo.Calling.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " AND IndustryBID like '%" + arrType[i].Trim() + "%'";
                            }
                            else if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " or IndustryBID like '%" + arrType[i].Trim() + "%'";
                            }
                        }
                    }

                    if (CustomInfo.SmallCalling.Trim() != "")
                    {
                        if (strCriteria != "")
                        {
                            strCriteria = strCriteria + " AND IndustryMID IN (";
                        }
                        else
                        {
                            strCriteria = " IndustryMID IN (";
                        }

                        string[] arrType = CustomInfo.SmallCalling.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            strCriteria = strCriteria + "'" + arrType[i] + "',";
                        }
                        strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                    }

                    //if (CustomInfo.currency != "")
                    //{
                    //    if (strCriteria != "")
                    //    {
                    //        strCriteria = strCriteria + " AND currency='" + CustomInfo.currency+"'";
                    //    }
                    //    else
                    //    {
                    //        strCriteria = " currency='" + CustomInfo.currency + "'";
                    //    }
                    //}
                    if (CustomInfo.CooperationDemandTypeID != "") //合作方式
                    {
                        string[] arrType = CustomInfo.CooperationDemandTypeID.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " AND CooperationDemandType like '%" + arrType[i] + "%'";
                            }
                            else if (arrType[i].Trim() != "" && i != 0)
                            {
                                strCriteria = strCriteria + " or CooperationDemandType like '%" + arrType[i] + "%'";
                            }
                        }
                    }

                    if (CustomInfo.Keyword != "")
                    {
                        //if (strCriteria != "")
                        //{
                        //    strCriteria = strCriteria + " AND Strategy like '%" + CustomInfo.Keyword + "%'";
                        //}
                        //else
                        //{
                        //    strCriteria = "Strategy like '%" + CustomInfo.Keyword + "%'";
                        //}
                    }
                    strCriteria = strCriteria + " and AuditStatus =1";
                }
                #endregion

                #region 融资 资本资源
                else if (strCustomType == "1")
                {
                    if (CustomInfo.Money.Trim() != "")  //投资金额
                    {
                        strCriteria = "CapitalID IN(";
                        string[] arrType = CustomInfo.Money.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            strCriteria = strCriteria + "'" + arrType[i] + "',";
                        }
                        strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                    }

                    if (CustomInfo.Calling.Trim() != "") //投资行业
                    {
                        string[] arrType = CustomInfo.Calling.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " AND IndustryBID like '%" + arrType[i].Trim() + "%'";
                            }
                            else if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " or IndustryBID like '%" + arrType[i].Trim() + "%'";
                            }
                        }
                    }

                    if (CustomInfo.SmallCalling.Trim() != "")
                    {
                        if (strCriteria != "")
                        {
                            strCriteria = strCriteria + " AND IndustryMID IN (";
                        }
                        else
                        {
                            strCriteria = " IndustryMID IN (";
                        }

                        string[] arrType = CustomInfo.SmallCalling.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            strCriteria = strCriteria + "'" + arrType[i] + "',";
                        }
                        strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                    }

                    if (CustomInfo.City != "") //投资区域
                    {
                        string[] arrType = CustomInfo.City.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " AND ProvinceID like '%" + arrType[i].Trim() + "%'";
                            }
                            else if (arrType[i].Trim() != "" && i != 0)
                            {
                                strCriteria = strCriteria + " or ProvinceID like '%" + arrType[i].Trim() + "%',";
                            }
                        }
                    }
                    if (CustomInfo.CooperationDemandTypeID != "") //合作方式
                    {
                        string[] arrType = CustomInfo.CooperationDemandTypeID.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            if (strCriteria.Trim() != "")
                            {
                                if (arrType[i].Trim() != "" && i == 0)
                                {
                                    strCriteria = strCriteria + " AND CooperationDemandType like '%" + arrType[i] + "%'";
                                }
                                else if (arrType[i].Trim() != "" && i != 0)
                                {
                                    strCriteria = strCriteria + " or CooperationDemandType like '%" + arrType[i] + "%'";
                                }
                            }
                            else
                            {
                                if (arrType[i].Trim() != "" && i == 0)
                                {
                                    strCriteria = strCriteria + " CooperationDemandType like '%" + arrType[i] + "%'";
                                }
                                else if (arrType[i].Trim() != "" && i != 0)
                                {
                                    strCriteria = strCriteria + " or CooperationDemandType like '%" + arrType[i] + "%'";
                                }
                            }
                        }
                    }


                    if (CustomInfo.Keyword != "")
                    {
                        if (strCriteria != "")
                        {
                            strCriteria = strCriteria + " AND ProjectAbout like '%" + CustomInfo.Keyword + "%' and AuditStatus =1";
                        }
                        else
                        {
                            strCriteria = "ProjectAbout like '%" + CustomInfo.Keyword + "%' and AuditStatus =1";
                        }
                    }
                }
                #endregion

                //创业  资讯
                else if (strCustomType == "3")
                {
                    if (CustomInfo.Type.Trim() != "")  //资讯类型
                    {
                        strCriteria = "NewsTypeID IN(";
                        string[] arrType = CustomInfo.Type.Split('|');
                        for (int i = 0; i < arrType.Length; i++)
                        {
                            strCriteria = strCriteria + "'" + arrType[i] + "',";
                        }
                        strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                    }

                    if (CustomInfo.Keyword != "")
                    {
                        if (strCriteria != "")
                        {
                            strCriteria = strCriteria + " AND Title like '%" + CustomInfo.Keyword + "%' AND NewsTab.NewsLblStatus=1";
                        }
                        else
                        {
                            strCriteria = "Title like '%" + CustomInfo.Keyword + "%' AND NewsLblStatus=1";
                        }
                    }
                }



                #endregion -- 取条件并组织 ----------------

                this.ViewState["Criteria"] = strCriteria;
            }

            // Label1.Text = this.ViewState["Criteria"].ToString();

            try
            {
                Tz888.SQLServerDAL.Conn obj = new Tz888.SQLServerDAL.Conn();

                if (strCustomType == "0")
                {
                    this.Pager1.TableViewName = "MerchantInfo_Viw2"; //政府招商
                    this.Pager1.StrWhere      = this.ViewState["Criteria"].ToString();
                }
                else if (strCustomType == "1")
                {
                    this.Pager1.TableViewName = "CapitalInfo_Viw2"; //资本资源
                    this.Pager1.StrWhere      = this.ViewState["Criteria"].ToString();
                }
                else if (strCustomType == "2")
                {
                    this.Pager1.TableViewName = "ProjectInfoTab_Viw2"; //企业项目
                    this.Pager1.StrWhere      = this.ViewState["Criteria"].ToString();
                }

                else if (strCustomType == "3")
                {
                    this.Pager1.TableViewName = "NewsTab_Viw2";
                    this.Pager1.StrWhere      = this.ViewState["Criteria"].ToString();
                }
                else
                {
                }
                this.Pager1.DataBind();
            }
            catch { }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "")
        {
            Response.Redirect("../Login.aspx?ReturnUrl=" + Server.UrlEncode(Request.RawUrl));
        }

        //根据会员类型转向不同的登记页面

        if (Page.User.IsInRole("MT1004"))
        {
            Response.Redirect("GovernmentRegisterResult.aspx"); //机构
        }
        else if (Page.User.IsInRole("MT1001"))                  //个人
        {
            Tz888.Common.MessageBox.Show(this.Page, "对不起,个人会员不能进行登记!");
            if (Page.User.IsInRole("GT1001"))
            {
                Response.Write("index.aspx");
            }
            else
            {
                Response.Write("indexTop.aspx");
            }
        }

        Tz888.BLL.Register.EnterpriseRegisterBLL obj = new EnterpriseRegisterBLL();
        this.ViewState["MemberLoginName"] = Page.User.Identity.Name;

        /*登记审核状态(待审核0 已发布上网1 未通过审核2 己删除3 )
         *  FeedbackStatus  反馈状态(0 可修改 1 将删除)*/

        if (Page.User.IsInRole("GT1001"))
        {
            divReg.InnerHtml = " <strong>重要提示:</strong>请确保您发布的公司资料真实有效,由于发布虚假信息产生的任何责任," +
                               "由发布者自行承担! 想让您的公司介绍排在普通会员的前面被更多用户关注吗?点此<a href='VIPMemberRegister_In.aspx'>申请拓富通</a>" +
                               " 0755-82210116 82212980 在线客服";
        }

        if (Page.User.IsInRole("GT1002"))
        {
            divReg.InnerHtml = "";
        }

        DataTable dt = obj.getEnterpriseModel(this.ViewState["MemberLoginName"].ToString());

        if (dt == null)
        {
            Response.Redirect("EnterpriseRegister.aspx");
            return;
        }
        else if (dt.Rows.Count > 0)
        {
            //判断登记信息是的审核状态(AuditingStatus)1:审核状态:   2已审核(已审基本信息),0未审核、1审核通过、

            //3审核不通过、4退款(注意:审核为拓富通会员后不出现在此列表),付费状态和审核状态无关。

            switch (Convert.ToInt32(dt.Rows[0]["AuditingStatus"]))
            {
            case 0:
                lbMessage.Text = "您的公司资料还在审核过程中...";
                break;

            case 1:
                //基本信息
                lbMessage.Text = "您的公司资料己审核通过!";
                break;

            case 2:
                //审核信息
                lbMessage.Text = "您的公司资料审核没有通过!";
                Tz888.SQLServerDAL.Conn objStatus = new Tz888.SQLServerDAL.Conn();
                DataTable dtStatus = objStatus.GetList("OrgAuditTab", "*", "AuditingDate", 1, 1, 0, 1, "LoginName='" + this.ViewState["MemberLoginName"].ToString() + "'");
                if (dtStatus.Rows.Count > 0)
                {
                    switch (dtStatus.Rows[0]["FeedbackStatus"].ToString())    //0即将删除 1可修改 2己发布

                    {
                    case "2":
                        lbFeedbackStatus.Text = "状态:即将删除";
                        lbResult.Text         = "原因:" + dtStatus.Rows[0]["AuditingRemark"].ToString();
                        break;

                    case "1":
                        lbFeedbackStatus.Text = "状态:可修改";
                        lbResult.Text         = "原因:" + dtStatus.Rows[0]["AuditingRemark"] + "<a href='EnterpriseRegister.aspx'>马上去修改</a>";
                        break;

                    default:
                        break;
                    }
                }
                break;

            default:
                break;
            }


            lbOrgName.Text       = dt.Rows[0]["EnterpriseName"].ToString();
            lbComAboutBrief.Text = dt.Rows[0]["ComAbout"].ToString();



            string   str     = dt.Rows[0]["Industrylist"].ToString().Trim();
            string[] strList = str.Split(',');
            Tz888.BLL.Common.IndustryBLL obj7 = new Tz888.BLL.Common.IndustryBLL();
            string strIndustry = "";
            // Response.Write(str);
            for (int i = 0; i < strList.Length; i++)
            {
                if (strList[i] != "")
                {
                    strIndustry += obj7.GetNameByID(strList[i].Trim());
                }
            }
            lbindustry.Text = strIndustry != "" ? strIndustry : "暂无";

            lbMainProduct.Text  = dt.Rows[0]["MainProduct"].ToString();
            lbManageType.Text   = dt.Rows[0]["SetComTypeName"].ToString();
            lbRegisterDate.Text = Convert.ToDateTime(dt.Rows[0]["RegisterDate"]).ToShortDateString();

            string CountryName = ""; string ProvinceName = ""; string CountyName = ""; string CityName = "";
            try
            {
                Tz888.BLL.Common.ZoneSelectBLL objZone = new Tz888.BLL.Common.ZoneSelectBLL();
                CountryName  = objZone.GetCountyNameByCode(dt.Rows[0]["CountryCode"].ToString());
                ProvinceName = objZone.GetProvinceNameByCode(dt.Rows[0]["ProvinceID"].ToString());
                CountyName   = objZone.GetCountyNameByCode(dt.Rows[0]["CountyID"].ToString());
                CityName     = objZone.GetCityNameByCode(dt.Rows[0]["CityID"].ToString());
            }
            catch { }
            lbZone.Text       = (CountryName != "" ? CountryName : "") + "" + (ProvinceName != "" ? ProvinceName : "") + "" + (CountyName != "" ? CountyName : "") + "" + (CityName != "" ? CityName : "");
            lbRegCapital.Text = dt.Rows[0]["RegCapital"].ToString() + "(万)" + dt.Rows[0]["currency"].ToString();

            //联系信息
            lbLinkMan.Text = dt.Rows[0]["Name"].ToString() != "" ? dt.Rows[0]["Name"].ToString() : "没有提供";
            lbMail.Text    = dt.Rows[0]["Email"].ToString() != "" ? dt.Rows[0]["Email"].ToString() : "没有提供";
            lbSite.Text    = dt.Rows[0]["Website"].ToString() != "" ? dt.Rows[0]["Website"].ToString() : "没有提供";
            lbTel.Text     = dt.Rows[0]["TelCountryCode"].ToString() + "-" + dt.Rows[0]["TelStateCode"].ToString() + "-" + dt.Rows[0]["TelNum"].ToString();
            lbFax.Text     = dt.Rows[0]["FaxCountryCode"].ToString() + "-" + dt.Rows[0]["FaxStateCode"].ToString() + "-" + dt.Rows[0]["FaxNum"].ToString();
            lbMobile.Text  = dt.Rows[0]["Mobile"].ToString() != "" ? dt.Rows[0]["Mobile"].ToString() : "没有提供";
            lbAddress.Text = dt.Rows[0]["address"].ToString() != "" ? dt.Rows[0]["address"].ToString() : "没有提供";

            //图片信息
            Tz888.SQLServerDAL.Conn objResource = new Tz888.SQLServerDAL.Conn();
            DataTable dtResource = objResource.GetList("MemberResourceTab", "*", "ResourceID", 1, 1, 0, 1, "LoginName='" + this.ViewState["MemberLoginName"].ToString() + "' AND ResourceProperty=0");
            if (dtResource != null && dtResource.Rows.Count > 0)
            {
                FileUploader1.Img        = Tz888.Common.Common.GetImageDomain() + "/" + dtResource.Rows[0]["ResourceAddr"].ToString();//ConfigurationManager.AppSettings["ImageDomain"].ToString()
                FileUploader1.ButtonName = "";
            }
            else
            {
                FileUploader1.Img        = @"../images/publish/noneimg.gif";
                FileUploader1.ButtonName = "添加";
                FileUploader1.IsUp       = "1";//是否通过控件上传
                FileUploader1.InfoType   = "EnterpriseRegister";
                //Response.Write("<Script>document.all('ButAdd').onclick();</script>");
            }
        }
        else //没有进行公司登记
        {
            Response.Redirect("EnterpriseRegister.aspx");
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.User.Identity.Name.Trim() == null || Page.User.Identity.Name.Trim().Trim() == "")
        {
            Response.Redirect("../Login.aspx?ReturnUrl=" + Server.UrlEncode(Request.RawUrl));
        }

        //会员类型
        if (Page.User.IsInRole("GT1001"))
        {
            pt.Visible  = true;
            tft.Visible = false;
        }
        if (Page.User.IsInRole("GT1002") || Page.User.IsInRole("GT1003"))
        {
            tft.Visible = true;
            pt.Visible  = false;
        }

        //页面跳转
        if (Request.QueryString["Type"] != null)
        {
            if (Request.QueryString["Type"].ToString() == "3")
            {
                Response.Redirect("MachingMessageNews.aspx?type=3");
            }
        }
        if (!Page.IsPostBack)
        {
            this.ViewState["CustomType"] = "";
            try
            {
                ID = Convert.ToInt32(Request.QueryString["ID"]);

                //if (ID == 0)//查询进来
                //{
                //    //Session[""]建立dr
                //    ds = (DataSet)Session["CustomInfo"];

                //    ViewState["dt"] = ds.Tables[0];
                //}
                //else//链接进来
                //{
                string SelectCol            = "*";
                string Criteria             = " id=" + ID;
                Tz888.SQLServerDAL.Conn obj = new Tz888.SQLServerDAL.Conn();
                DataTable dt = obj.GetList("CustomInfoTab", "*", "ID", 1, 1, 0, 1, Criteria);

                if (dt.Rows.Count > 0)
                {
                    ViewState["dt"] = dt;
                }
                //}

                //显示信息
                PagerBase    = Pager1;
                RepeaterBase = dgMatching;
                if (Session["customInfo"] != null)
                {
                    Tz888.Model.CustomInfoModel customInfo = (Tz888.Model.CustomInfoModel)Session["customInfo"];

                    this.Pager1.StrWhere = getStrWhere(customInfo);
                    this.Pager1.DataBind();
                }
                else
                {
                    SearchInfoSelect();
                }
            }
            catch
            {
                //Tz888.Common.MessageBox.Show(this.Page, "操作超时!");
            }
        }
    }
Пример #5
0
    public void imgLoad()
    {
        #region

        /*/// <summary>
         * /// 资源类型
         *      /// 0 -其他文档
         * /// 1 -图片
         * /// 2 -视频
         * /// <summary>
         *
         * /// 资源性质
         * ///0 公司介绍(多图片)登记介绍
         *
         * ///1营业执照
         * ///2税务登记证(国税)
         * ///3税务登记证(地税)
         * ///4荣誉和证书
         *
         * ///5其它*/

        #endregion
        #region 图片信息加载
        Tz888.SQLServerDAL.Conn objResource = new Tz888.SQLServerDAL.Conn();

        DataTable dtResource1 = objResource.GetList("MemberResourceTab", "*", "ResourceID", 1, 1, 0, 1, "LoginName='" + Page.User.Identity.Name.Trim() + "' AND ResourceProperty=1");
        if (dtResource1 != null && dtResource1.Rows.Count > 0)
        {
            fuYYZZ.Img        = ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + dtResource1.Rows[0]["ResourceAddr"].ToString();
            fuYYZZ.ButtonName = "修改";
            fuYYZZ.IsUp       = "0";
        }
        else
        {
            fuYYZZ.Img        = @"../images/publish/noneimg.gif";
            fuYYZZ.ButtonName = "添加上传";
            fuYYZZ.IsUp       = "0";
        }

        DataTable dtResource2 = objResource.GetList("MemberResourceTab", "*", "ResourceID", 1, 1, 0, 1, "LoginName='" + Page.User.Identity.Name.Trim() + "' AND ResourceProperty=2");
        if (dtResource2 != null && dtResource2.Rows.Count > 0)
        {
            fuGS.Img        = ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + dtResource2.Rows[0]["ResourceAddr"].ToString();
            fuGS.ButtonName = "修改";
            fuGS.IsUp       = "0";
        }
        else
        {
            fuGS.Img        = @"../images/publish/noneimg.gif";
            fuGS.ButtonName = "添加上传";
            fuGS.IsUp       = "0";
        }

        DataTable dtResource3 = objResource.GetList("MemberResourceTab", "*", "ResourceID", 1, 1, 0, 1, "LoginName='" + Page.User.Identity.Name.Trim() + "' AND ResourceProperty=3");
        if (dtResource3 != null && dtResource3.Rows.Count > 0)
        {
            fuDS.Img        = ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + dtResource3.Rows[0]["ResourceAddr"].ToString();
            fuDS.ButtonName = "修改";
            fuDS.IsUp       = "0";
        }
        else
        {
            fuDS.Img        = @"../images/publish/noneimg.gif";
            fuDS.ButtonName = "添加上传";
            fuDS.IsUp       = "0";
        }
        DataTable dtResource4 = objResource.GetList("MemberResourceTab", "*", "ResourceID", 1, 1, 0, 1, "LoginName='" + Page.User.Identity.Name.Trim() + "' AND ResourceProperty=4");
        if (dtResource4 != null && dtResource4.Rows.Count > 0)
        {
            fuRYZS.Img        = ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + dtResource4.Rows[0]["ResourceAddr"].ToString();
            fuRYZS.ButtonName = "修改";
            fuRYZS.IsUp       = "0";
        }
        else
        {
            fuRYZS.Img        = @"../images/publish/noneimg.gif";
            fuRYZS.ButtonName = "添加上传";
            fuRYZS.IsUp       = "0";
        }
        #endregion
    }
Пример #6
0
    private string SearchInfoSelect(int id)
    {
        DataTable dt;
        string    TableViewName = "";
        string    strCriteria   = "";

        string Criteria = "LoginName = '" + Page.User.Identity.Name.Trim() + "'";

        Tz888.SQLServerDAL.Conn obj = new Conn();
        DataTable dt1           = obj.GetList("CustomInfoTab", "*", "ID", 1, 1, 0, 1, "ID=" + id);
        DataRow   dr            = dt1.Rows[0];
        string    strCustomType = dr["CustomType"].ToString();

        if (strCustomType.Trim() != "")
        {
            #region -- 取条件并组织 ----------------
            Tz888.Model.CustomInfoModel CustomInfo = new Tz888.Model.CustomInfoModel();

            if (dr["Calling"] != null)
            {
                CustomInfo.Calling = dr["Calling"].ToString();
            }
            if (dr["CustomType"] != null)
            {
                CustomInfo.CustomType = Convert.ToInt32(dr["CustomType"].ToString());
            }
            if (dr["Genre"] != null)
            {
                CustomInfo.Genre = dr["Genre"].ToString();
            }
            if (dr["Keyword"] != null)
            {
                CustomInfo.Keyword = dr["Keyword"].ToString();
            }

            if (dr["LoginName"] != null)
            {
                CustomInfo.LoginName = dr["LoginName"].ToString();
            }
            if (dr["Money"] != null)
            {
                CustomInfo.Money = dr["Money"].ToString();
            }
            if (dr["SmallCalling"] != null)
            {
                CustomInfo.SmallCalling = dr["SmallCalling"].ToString();
            }
            if (dr["Type"] != null)
            {
                CustomInfo.Type = dr["Type"].ToString();
            }
            if (dr["City"] != null)
            {
                CustomInfo.City = dr["City"].ToString();
            }
            //if (dr["currency"] != null)
            //{
            //    CustomInfo.currency = dr["currency"].ToString().Trim();
            //}
            if (dr["CooperationDemandTypeID"] != null)
            {
                CustomInfo.CooperationDemandTypeID = dr["CooperationDemandTypeID"].ToString();
            }
            else
            {
                CustomInfo.CooperationDemandTypeID = "";
            }

            #region 政府招商
            //招商  政府招商
            if (strCustomType == "0")
            {
                if (CustomInfo.Type.Trim() != "")   //招商类别
                {
                    strCriteria = "MerchantTypeID IN(";
                    string[] arrType = CustomInfo.Type.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        strCriteria = strCriteria + "'" + arrType[i] + "',";
                    }
                    strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                }

                if (CustomInfo.Calling != "") //所属行业
                {
                    if (strCriteria != "")
                    {
                        strCriteria = strCriteria + " AND (";
                    }
                    else
                    {
                        strCriteria = " (";
                    }
                    string[] arrType = CustomInfo.Calling.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        strCriteria = strCriteria + "IndustryClassList like '%" + arrType[i] + "%' OR ";
                    }
                    strCriteria = strCriteria.Substring(0, strCriteria.Length - 4) + ")";
                }

                if (CustomInfo.City != "") //投资区域
                {
                    string[] arrType = CustomInfo.City.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        if (arrType[i].Trim() != "" && i == 0)
                        {
                            strCriteria = strCriteria + " AND ProvinceID like '%" + arrType[i].Trim() + "%'";
                        }
                        else if (arrType[i].Trim() != "" && i != 0)
                        {
                            strCriteria = strCriteria + " or ProvinceID like '%" + arrType[i].Trim() + "%',";
                        }
                    }
                }

                //if (CustomInfo.currency.Trim() != "")
                //{
                //    if (strCriteria != "")
                //    {
                //        strCriteria = strCriteria + " AND CapitalCurrency='" + CustomInfo.currency+"'";
                //    }
                //    else
                //    {
                //        strCriteria = " CapitalCurrency ='" + CustomInfo.currency + "'";
                //    }
                //}
                if (CustomInfo.CooperationDemandTypeID != "") //合作方式
                {
                    string[] arrType = CustomInfo.CooperationDemandTypeID.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        if (arrType[i].Trim() != "" && i == 0)
                        {
                            strCriteria = strCriteria + " AND CooperationDemandType like '%" + arrType[i] + "%'";
                        }
                        else if (arrType[i].Trim() != "" && i != 0)
                        {
                            strCriteria = strCriteria + " or CooperationDemandType like '%" + arrType[i] + "%'";
                        }
                    }
                }

                if (CustomInfo.Keyword != "")
                {
                    if (strCriteria != "")
                    {
                        strCriteria = strCriteria + " AND KeyWord like '%" + CustomInfo.Keyword + "%'";
                    }
                    else
                    {
                        strCriteria = "KeyWord like '%" + CustomInfo.Keyword + "%'";
                    }
                }

                if (strCriteria.Trim() != "")
                {
                    strCriteria = strCriteria + " and AuditStatus =1";
                }
                else
                {
                    strCriteria = strCriteria + " AuditStatus =1";
                }
            }
            #endregion

            #region 投资   企业项目
            else if (strCustomType == "2")
            {
                //if (CustomInfo.Genre.Trim() != "")
                //{
                //    strCriteria = "CapitalTypeID IN(";
                //    string[] arrType = CustomInfo.Genre.Split('|');
                //    for (int i = 0; i < arrType.Length; i++)
                //    {
                //        strCriteria = strCriteria + "'" + arrType[i] + "',";
                //    }
                //    strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                //}

                if (CustomInfo.Money.Trim() != "")//投资金额
                {
                    if (strCriteria != "")
                    {
                        strCriteria = strCriteria + " AND CapitalID IN (";
                    }
                    else
                    {
                        strCriteria = " CapitalID IN (";
                    }

                    // strCriteria = "CapitalID IN(";
                    string[] arrType = CustomInfo.Money.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        strCriteria = strCriteria + "'" + arrType[i] + "',";
                    }
                    strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                }

                if (CustomInfo.Calling.Trim() != "") //投资行业
                {
                    string[] arrType = CustomInfo.Calling.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        if (arrType[i].Trim() != "" && i == 0)
                        {
                            strCriteria = strCriteria + " AND IndustryBID like '%" + arrType[i].Trim() + "%'";
                        }
                        else if (arrType[i].Trim() != "" && i == 0)
                        {
                            strCriteria = strCriteria + " or IndustryBID like '%" + arrType[i].Trim() + "%'";
                        }
                    }
                }

                if (CustomInfo.SmallCalling.Trim() != "")
                {
                    if (strCriteria != "")
                    {
                        strCriteria = strCriteria + " AND IndustryMID IN (";
                    }
                    else
                    {
                        strCriteria = " IndustryMID IN (";
                    }

                    string[] arrType = CustomInfo.SmallCalling.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        strCriteria = strCriteria + "'" + arrType[i] + "',";
                    }
                    strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                }

                //if (CustomInfo.currency != "")
                //{
                //    if (strCriteria != "")
                //    {
                //        strCriteria = strCriteria + " AND currency='" + CustomInfo.currency+"'";
                //    }
                //    else
                //    {
                //        strCriteria = " currency='" + CustomInfo.currency + "'";
                //    }
                //}
                if (CustomInfo.CooperationDemandTypeID != "") //合作方式
                {
                    string[] arrType = CustomInfo.CooperationDemandTypeID.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        if (arrType[i].Trim() != "" && i == 0)
                        {
                            strCriteria = strCriteria + " AND CooperationDemandType like '%" + arrType[i] + "%'";
                        }
                        else if (arrType[i].Trim() != "" && i != 0)
                        {
                            strCriteria = strCriteria + " or CooperationDemandType like '%" + arrType[i] + "%'";
                        }
                    }
                }

                if (CustomInfo.Keyword != "")
                {
                    if (strCriteria != "")
                    {
                        strCriteria = strCriteria + " AND KeyWord like '%" + CustomInfo.Keyword + "%'";
                    }
                    else
                    {
                        strCriteria = " title KeyWord '%" + CustomInfo.Keyword + "%'";
                    }
                }
                if (strCriteria.Trim() != "")
                {
                    strCriteria = strCriteria + " and AuditStatus =1";
                }
                else
                {
                    strCriteria = strCriteria + " AuditStatus =1";
                }
            }
            #endregion

            #region 融资 资本资源
            else if (strCustomType == "1")
            {
                if (CustomInfo.Money.Trim() != "")  //投资金额
                {
                    strCriteria = "CapitalID IN(";
                    string[] arrType = CustomInfo.Money.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        strCriteria = strCriteria + "'" + arrType[i] + "',";
                    }
                    strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                }

                if (CustomInfo.Calling.Trim() != "") //投资行业
                {
                    string[] arrType = CustomInfo.Calling.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        if (arrType[i].Trim() != "" && i == 0)
                        {
                            strCriteria = strCriteria + " AND IndustryBID like '%" + arrType[i].Trim() + "%'";
                        }
                        else if (arrType[i].Trim() != "" && i == 0)
                        {
                            strCriteria = strCriteria + " or IndustryBID like '%" + arrType[i].Trim() + "%'";
                        }
                    }
                }

                if (CustomInfo.SmallCalling.Trim() != "")
                {
                    if (strCriteria != "")
                    {
                        strCriteria = strCriteria + " AND IndustryMID IN (";
                    }
                    else
                    {
                        strCriteria = " IndustryMID IN (";
                    }

                    string[] arrType = CustomInfo.SmallCalling.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        strCriteria = strCriteria + "'" + arrType[i] + "',";
                    }
                    strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                }

                if (CustomInfo.City != "") //投资区域
                {
                    string[] arrType = CustomInfo.City.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        if (arrType[i].Trim() != "" && i == 0)
                        {
                            strCriteria = strCriteria + " AND ProvinceID like '%" + arrType[i].Trim() + "%'";
                        }
                        else if (arrType[i].Trim() != "" && i != 0)
                        {
                            strCriteria = strCriteria + " or ProvinceID like '%" + arrType[i].Trim() + "%',";
                        }
                    }
                }
                if (CustomInfo.CooperationDemandTypeID != "") //合作方式
                {
                    string[] arrType = CustomInfo.CooperationDemandTypeID.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        if (strCriteria.Trim() != "")
                        {
                            if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " AND CooperationDemandType like '%" + arrType[i] + "%'";
                            }
                            else if (arrType[i].Trim() != "" && i != 0)
                            {
                                strCriteria = strCriteria + " or CooperationDemandType like '%" + arrType[i] + "%'";
                            }
                        }
                        else
                        {
                            if (arrType[i].Trim() != "" && i == 0)
                            {
                                strCriteria = strCriteria + " CooperationDemandType like '%" + arrType[i] + "%'";
                            }
                            else if (arrType[i].Trim() != "" && i != 0)
                            {
                                strCriteria = strCriteria + " or CooperationDemandType like '%" + arrType[i] + "%'";
                            }
                        }
                    }
                }


                if (CustomInfo.Keyword != "")
                {
                    if (strCriteria != "")
                    {
                        strCriteria = strCriteria + " AND KeyWord like '%" + CustomInfo.Keyword + "%'";
                    }
                    else
                    {
                        strCriteria = " KeyWord like '%" + CustomInfo.Keyword + "%'";
                    }
                }
                if (strCriteria.Trim() != "")
                {
                    strCriteria = strCriteria + " and AuditStatus =1";
                }
                else
                {
                    strCriteria = strCriteria + " AuditStatus =1";
                }
            }
            #endregion

            //创业  资讯
            #region 资讯
            else if (strCustomType == "3")
            {
                if (CustomInfo.Type.Trim() != "")  //资讯类型
                {
                    strCriteria = "NewsTypeID IN(";
                    string[] arrType = CustomInfo.Type.Split('|');
                    for (int i = 0; i < arrType.Length; i++)
                    {
                        strCriteria = strCriteria + "'" + arrType[i] + "',";
                    }
                    strCriteria = strCriteria.Substring(0, strCriteria.Length - 1) + ")";
                }

                if (CustomInfo.Keyword != "")
                {
                    if (strCriteria != "")
                    {
                        strCriteria = strCriteria + " AND Title like '%" + CustomInfo.Keyword + "%'";
                    }
                    else
                    {
                        strCriteria = "Title like '%" + CustomInfo.Keyword + "%'";
                    }
                }
                if (strCriteria.Trim() != "")
                {
                    strCriteria = strCriteria + "and NewsLblStatus=1";
                }
                else
                {
                    strCriteria = strCriteria + " NewsLblStatus=1";
                }
            }
            #endregion



            #endregion -- 取条件并组织 ----------------

            this.ViewState["Criteria"] = strCriteria;
        }

        try
        {
            if (strCustomType == "0")
            {
                TableViewName = "MerchantInfo_Viw2"; //政府招商
            }
            else if (strCustomType == "1")
            {
                TableViewName = "CapitalInfo_Viw2"; //资本资源
            }
            else if (strCustomType == "2")
            {
                TableViewName = "ProjectInfoTab_Viw2"; //企业项目
            }

            else if (strCustomType == "3")
            {
                TableViewName = "NewsTab_Viw2";
            }
            else
            {
                return("");
            }
            Tz888.SQLServerDAL.Conn objCount = new Tz888.SQLServerDAL.Conn();

            return(Convert.ToInt32(objCount.GetList(TableViewName, "LoginTime", "InfoID", 1, 1, 1, 1, this.ViewState["Criteria"].ToString()).Rows[0][0]).ToString());
        }
        catch
        {
            return("0");
        }
    }
Пример #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");//**********getLoginName
            //登记联系人

            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", 1, 1, 0, 1, "LoginName='" + LoginName + "'");
            //会员发布信息
            //   DataTable dt5 = obj4.GetList("MainInfoViw", "Title,PublishT,HtmlFile", "PublishT", 1000, 1, 0, 1, "LoginName='" + LoginName + "'");
            //公司登记信息
            Tz888.BLL.Register.GovernmentRegisterBLL obj6 = new Tz888.BLL.Register.GovernmentRegisterBLL();
            DataTable dt6 = obj6.getGovernmentModel(LoginName);
            //公司附加信息
            // DataTable dt7 = obj4.GetList("MemberResourceTab", "*", "LoginName", 1, 1, 0, 1, "LoginName='kittycat'");

            if (dt1 != null || 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();
                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 : "../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();
                //RepeaterPublish.DataSource = dt5;
                if (dt6 != null)
                {
                    //  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, "请求出错");
        }
    }
Пример #8
0
    /// <summary>
    /// 获取查询结果
    /// </summary>
    /// <param name="LoginName"></param>
    /// <returns></returns>
    private string GetDingYueCondition(string LoginName)
    {
        string SelectCol = "*";
        string Criteria  = " LoginName='" + LoginName + "'";

        Tz888.SQLServerDAL.Conn obj = new Tz888.SQLServerDAL.Conn();
        DataTable     dt            = obj.GetList("CustomInfoTab", "*", "ID", 1, 1, 0, 1, Criteria);
        StringBuilder sb            = new StringBuilder();
        StringBuilder sbTemp        = new StringBuilder();
        long          iAllCount     = 0;
        string        str           = "";

        if (dt.Rows.Count > 0)//已设置订阅
        {
            sbTemp.Append("<table width=100% border=0 cellpadding=0 cellspacing=0 >");
            sbTemp.Append("<tr><td >资源名称</td><td>发布时间</td></tr>");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                //查询条件
                string sCondtion = SetDingYueCondition(dt.Rows[i]);
                //数据源名称
                string sViewName = GetViewNameByCustomType(dt.Rows[i]["CustomType"].ToString().Trim());

                Tz888.BLL.Common.CommonFunction bllComm = new Tz888.BLL.Common.CommonFunction();
                DataTable dtResult = new DataTable();
                long      CurrPage = 1;
                long      AllCount = 0;
                dtResult = bllComm.GetDTFromTableOrView(sViewName, "InfoID", "*", sCondtion, "InfoID", ref CurrPage, 10, ref AllCount);

                if (dtResult.Rows.Count > 0)
                {
                    for (int m = 0; m < 3; m++)
                    {
                        string title = dtResult.Rows[m]["title"].ToString();
                        if (title.Length > 16)
                        {
                            title = title.Substring(0, 16) + "...";
                        }
                        DateTime date = Convert.ToDateTime(dtResult.Rows[m]["publishT"].ToString());

                        sbTemp.Append("<tr>");
                        sbTemp.Append("<td><a href='http://www.topfo.com/" + dtResult.Rows[m]["HtmlFile"].ToString() + "' target='_blank'>" + title + "</a></td>");
                        sbTemp.Append("<td>" + date.ToShortDateString() + "</td>");
                        sbTemp.Append("</tr>");
                    }
                }
                iAllCount = iAllCount + AllCount;
            }


            sbTemp.Append("</table>");

            sb.Append("<div class='notemsg1'>您共有<a href='helper/MachingMessage.aspx?ID=" + dt.Rows[0]["id"] + "' class='blue'><span id='diyueCount'>" + iAllCount.ToString() + "</span></a>条订阅信息</div>");
            sb.Append(sbTemp.ToString().Trim());
            sb.Append("<div class='entermail'><a href='helper/MachingMessage.aspx?ID=" + dt.Rows[0]["id"].ToString() + "' class='blue'>&gt;&gt;查看更多订阅资源</a></div></div>");
            str = sb.ToString();
        }
        else
        {
            sb.Append("<div>您没有新的订阅资源</div>");
            sb.Append("<table><tr><td>您还没有设置任何订阅条件,<a href='helper/MatchingInfo.aspx'>点此立即设置</a></td></tr></table>");
            str = sb.ToString().Trim();
        }
        return(str);
    }
Пример #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (Page.User.Identity.Name == null || Page.User.Identity.Name.Trim() == "")
        //{
        //    Response.Redirect("../Login.aspx?ReturnUrl=" + Server.UrlEncode(Request.RawUrl));

        //}
        if (Page.User.IsInRole("GT1001"))
        {
            Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "对不起,普通会员不能进行此项服务!", "http://member.topfo.com/helper/MatchingInfo.aspx");
            return;
        }

        this.ViewState["MemberLoginName"] = Page.User.Identity.Name;

        if (!Page.IsPostBack)
        {
            this.ViewState["CustomType"]   = "";
            this.ViewState["Type"]         = "";
            this.ViewState["Genre"]        = "";
            this.ViewState["Money"]        = "";
            this.ViewState["Calling"]      = "";
            this.ViewState["SmallCalling"] = "";
            this.ViewState["City"]         = "";
            this.ViewState["Keyword"]      = "";

            if (Request.QueryString["CustomType"] != null)
            {
                this.ViewState["CustomType"] = Request.QueryString["CustomType"].ToString();
                this.Hidden1.Value           = Request.QueryString["CustomType"].ToString();
            }
            else
            {
                this.ViewState["CustomType"] = this.Hidden1.Value;
            }
            if (Request.QueryString["ID"] != null)
            {
                this.ViewState["ID"] = Request.QueryString["ID"].ToString();
            }
            if (Request.QueryString["tag"] != null)
            {
                this.ViewState["tag"] = Request.QueryString["tag"].ToString();
            }
            else
            {
                this.ViewState["tag"] = "Add";
            }

            //页面绑定
            forPageload();

            if (this.ViewState["tag"].ToString() == "update")
            {
                //查询
                string Criteria = "LoginName = '" + this.ViewState["MemberLoginName"].ToString() + "' and id=" + this.ViewState["ID"].ToString();

                Tz888.SQLServerDAL.Conn obj = new Tz888.SQLServerDAL.Conn();
                DataTable dt1 = obj.GetList("CustomInfoTab", "*", "ID", 1, 1, 0, 1, Criteria);
                DataRow   dr  = dt1.Rows[0];
                FillData(dr);
            }
        }

        //注册JS
        this.lstIndustryBLeft.Attributes.Add("ondblclick", "moveOver(document.getElementById('ctl00_ContentPlaceHolder1_lstIndustryBLeft'),document.getElementById('ctl00_ContentPlaceHolder1_lstIndustryBRight'));");
        this.lstIndustryBRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('ctl00_ContentPlaceHolder1_lstIndustryBRight'));");

        this.lstProvinceLeft.Attributes.Add("ondblclick", "moveOver(document.getElementById('ctl00_ContentPlaceHolder1_lstProvinceLeft'),document.getElementById('ctl00_ContentPlaceHolder1_lstProvinceRight'));");
        this.lstProvinceRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('ctl00_ContentPlaceHolder1_lstProvinceRight'));");

        this.lstCarveoutInd.Attributes.Add("ondblclick", "moveOver(document.getElementById('ctl00_ContentPlaceHolder1_lstCarveoutInd'),document.getElementById('ctl00_ContentPlaceHolder1_lstCarveoutIndRight'));");
        this.lstCarveoutIndRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('ctl00_ContentPlaceHolder1_lstCarveoutIndRight'));");

        this.lstOpporIndleft.Attributes.Add("ondblclick", "moveOver(document.getElementById('ctl00_ContentPlaceHolder1_lstOpporIndleft'),document.getElementById('ctl00_ContentPlaceHolder1_lstOpporIndRight'));");
        this.lstOpporIndRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('ctl00_ContentPlaceHolder1_lstOpporIndRight'));");

        this.lstExhibitonIndleft.Attributes.Add("ondblclick", "moveOver(document.getElementById('ctl00_ContentPlaceHolder1_lstExhibitonIndleft'),document.getElementById('ctl00_ContentPlaceHolder1_lstExhibitonIndRight'));");
        this.lstExhibitonIndRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('ctl00_ContentPlaceHolder1_lstExhibitonIndRight'));");

        string onClickValue = "FillToTxtFeild(document.getElementById('ctl00_ContentPlaceHolder1_lstIndustryBRight'), document.getElementById('ctl00_ContentPlaceHolder1_hideIndustryB'),document.getElementById('ctl00_ContentPlaceHolder1_hideIndustryBtxt'), '|');";

        //   onClickValue += "FillToTxtFeild(document.getElementById('lstIndustryMRight'), document.getElementById('hideIndustryM'), document.getElementById('hideIndustryMtxt'),'|');";
        onClickValue += "FillToTxtFeild(document.getElementById('ctl00_ContentPlaceHolder1_lstProvinceRight'), document.getElementById('ctl00_ContentPlaceHolder1_hideProvince'), document.getElementById('ctl00_ContentPlaceHolder1_hideProvincetxt'),'|');";
        onClickValue += "FillToTxtFeild(document.getElementById('ctl00_ContentPlaceHolder1_lstCarveoutIndRight'), document.getElementById('ctl00_ContentPlaceHolder1_hideIndustryCarveout'), document.getElementById('ctl00_ContentPlaceHolder1_hideIndustryCarveouttxt'),'|');";
        onClickValue += "FillToTxtFeild(document.getElementById('ctl00_ContentPlaceHolder1_lstOpporIndRight'), document.getElementById('ctl00_ContentPlaceHolder1_hideIndustryOppor'), document.getElementById('ctl00_ContentPlaceHolder1_hideIndustryOpportxt'),'|');";
        onClickValue += "FillToTxtFeild(document.getElementById('ctl00_ContentPlaceHolder1_lstExhibitonIndRight'), document.getElementById('ctl00_ContentPlaceHolder1_hideIndustryExhibition'), document.getElementById('ctl00_ContentPlaceHolder1_hideIndustryExhibitiontxt'),'|');";

        btnAdd.Attributes.Add("onClick", onClickValue);
    }
    protected void ibOK_Click(object sender, ImageClickEventArgs e)
    {
        //获取ManageTypeID
        Tz888.SQLServerDAL.Conn getOpWorker = new Tz888.SQLServerDAL.Conn();
        DataTable dt = getOpWorker.GetList("logininfotab", "*", "ManageTypeID", 1, 1, 0, 1, "loginname='" + Page.User.Identity.Name + "'");

        if (dt != null && dt.Rows.Count > 0)
        {
            this.ViewState["ManageType"] = dt.Rows[0]["ManageTypeID"].ToString();
        }

        Tz888.Model.Register.VIPMemberRegister modelInfo = new Tz888.Model.Register.VIPMemberRegister();
        Tz888.BLL.Register.VIPMemberRegister   obj       = new Tz888.BLL.Register.VIPMemberRegister();
        modelInfo.LoginName = Page.User.Identity.Name;
        if (dt != null && dt.Rows.Count > 0)
        {
            modelInfo.ManageTypeID = this.ViewState["ManageType"].ToString();
        }
        modelInfo.BuyTerm          = Convert.ToInt16(rblBuyTerm.SelectedValue);
        modelInfo.OrgName          = tbOrgName.Text;
        modelInfo.RealName         = tbRealName.Text;
        modelInfo.Position         = tbPosition.Text;//职务
        modelInfo.Sex              = Convert.ToBoolean(rblSex.SelectedValue);
        modelInfo.TelCountryCode   = txtTelCountry.Text;
        modelInfo.TelStateCode     = txtTelZoneCode.Text;
        modelInfo.TelNum           = txtTelNumber.Text;
        modelInfo.Mobile           = txtMobile.Text;
        modelInfo.Email            = txtEmail.Text;
        modelInfo.ApplyDate        = DateTime.Now;
        modelInfo.IsPay            = 0; //是否付费
        modelInfo.OprStatus        = 0; // 审核状态:0未审核、1审核为拓富通会员、2已审核(已审基本信息)、3审核不通过、4退款、
        modelInfo.OprDescript      = "";
        modelInfo.OprMan           = "";
        modelInfo.OprDate          = DateTime.Now;
        modelInfo.Memo             = "";
        modelInfo.MarketPersonName = "";
        modelInfo.VIPValidateDate  = DateTime.Now;//生效时间

        if (modelInfo.OrgName == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "公司名称不能为空");

            return;
        }
        if (modelInfo.RealName == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "真实姓名不能为空");

            return;
        }
        if (modelInfo.Email == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "Email");
            return;
        }

        bool bl = true;

        try
        {
            if (this.ViewState["tag"].ToString() == "add")
            {
                modelInfo.ApplyID         = 0;
                this.ViewState["ApplyID"] = obj.AddVIPMember(modelInfo);
            }
            else if (this.ViewState["tag"].ToString() == "update")
            {
                modelInfo.ApplyID = Convert.ToInt32(this.ViewState["ApplyID"]);
                bl = obj.UpdateVIPMember(modelInfo);
            }
        }
        catch
        {
            Tz888.Common.MessageBox.Show(this.Page, "信息输入有错。。。");
        }

        if (Convert.ToInt32(this.ViewState["ApplyID"]) > 0 && bl == true)
        {
            Response.Redirect("VIPMemberSubmint_In.aspx?ApplyID=" + this.ViewState["ApplyID"]);
        }
    }
Пример #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.ViewState["MemberLoginName"] = "topfo001";
        if (!IsPostBack)
        {
            this.ViewState["CustomType"]   = "";
            this.ViewState["Type"]         = "";
            this.ViewState["Genre"]        = "";
            this.ViewState["Money"]        = "";
            this.ViewState["Calling"]      = "";
            this.ViewState["SmallCalling"] = "";
            this.ViewState["City"]         = "";
            this.ViewState["Keyword"]      = "";
            this.ViewState["ID"]           = "";

            BindCooperationDemandType();
            BindSetCapital();
            forPageload();
            SetBindSetCapital();
            if (Convert.ToString(Request.QueryString["ID"]) != null)
            {
                this.ViewState["ID"] = Request.QueryString["ID"].ToString();
            }
            else
            {
                this.ViewState["ID"] = "";
            }

            if (Request.QueryString["tag"] != null)
            {
                this.ViewState["tag"] = Request.QueryString["tag"].ToString();
            }
            else
            {
                this.ViewState["tag"] = "Add";
            }
            hidType.Value = ViewState["tag"].ToString();
            if (this.ViewState["tag"].ToString() == "update")
            {
                Hidden1.Value = Request["CustomType"].ToString();
                //查询
                string Criteria = "LoginName = '" + Page.User.Identity.Name + "' and id=" + this.ViewState["ID"].ToString();
                //string Criteria = "LoginName = '" + "hellocindy" + "' and id=" + this.ViewState["ID"].ToString();
                Tz888.SQLServerDAL.Conn obj = new Tz888.SQLServerDAL.Conn();
                DataTable dt1 = obj.GetList("CustomInfoTab", "*", "ID", 1, 1, 0, 1, Criteria);
                DataRow   dr  = dt1.Rows[0];
                FillData(dr);
            }
        }
        //注册JS
        this.lstIndustryBLeft.Attributes.Add("ondblclick", "moveOver(document.getElementById('lstIndustryBLeft'),document.getElementById('lstIndustryBRight'));");
        this.lstIndustryBRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('lstIndustryBRight'));");

        this.lstProvinceLeft.Attributes.Add("ondblclick", "moveOver(document.getElementById('lstProvinceLeft'),document.getElementById('lstProvinceRight'));");
        this.lstProvinceRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('lstProvinceRight'));");
        //政府招商
        this.lisTzhy.Attributes.Add("ondblclick", "moveOver(document.getElementById('lisTzhy'),document.getElementById('lisTzhyRight'));");
        this.lisTzhyRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('lisTzhyRight'));");

        this.lisTzQy.Attributes.Add("ondblclick", "moveOver(document.getElementById('lisTzQy'),document.getElementById('lisTzQyRight'));");
        this.lisTzQyRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('lisTzQyRight'));");

        this.lisTzhyQy.Attributes.Add("ondblclick", "moveOver(document.getElementById('lisTzhyQy'),document.getElementById('lisTzhyQyRight'));");
        this.lisTzhyQyRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('lisTzhyQyRight'));");

        this.lisTzqyQy.Attributes.Add("ondblclick", "moveOver(document.getElementById('lisTzqyQy'),document.getElementById('lisTzqyQyRight'));");
        this.lisTzqyQyRight.Attributes.Add("ondblclick", "removeMe(document.getElementById('lisTzqyQyRight'));");

        //资本资源
        //投资行业 calling
        string onClickValue = "FillToTxtFeild(document.getElementById('lstIndustryBRight'), document.getElementById('hidZyCalling'),document.getElementById('hidZyCallingTxt'), '|');";

        //投资省市 city
        onClickValue += "FillToTxtFeild(document.getElementById('lstProvinceRight'), document.getElementById('hidZyCity'),document.getElementById('hidZyCityTxt'), '|');";

        //政府招商
        onClickValue += "FillToTxtFeild(document.getElementById('lisTzhyRight'), document.getElementById('hidZfCalling'), document.getElementById('hidZfCallingTxt'),'|');";
        onClickValue += "FillToTxtFeild(document.getElementById('lisTzQyRight'), document.getElementById('hidZfCity'), document.getElementById('hidZfCityTxt'),'|');";
        //企业项目
        onClickValue += "FillToTxtFeild(document.getElementById('lisTzhyQyRight'), document.getElementById('hidQyCalling'), document.getElementById('hidQyCallingTxt'),'|');";
        onClickValue += "FillToTxtFeild(document.getElementById('lisTzqyQyRight'), document.getElementById('hidQyCity'), document.getElementById('hidQyCityTxt'),'|');";

        btnAdd.Attributes.Add("onClick", onClickValue);
    }