/// <summary>
        /// 获取一个完整的招商信息实体
        /// </summary>
        /// <param name="InfoID"></param>
        /// <returns></returns>
        public Tz888.Model.Info.MerchantSetModel GetIntegrityModel(long InfoID)
        {
            Tz888.Model.Info.MerchantSetModel model = new MerchantSetModel();

            //获取主要信息
            MainInfoDAL obj1 = new MainInfoDAL();

            model.MainInfoModel = obj1.GetModel(InfoID);

            //获取投资资源个性信息
            model.MerchantInfoModel = this.GetModel(InfoID);

            //获取信息联系方式
            InfoContactDAL obj3 = new InfoContactDAL();

            model.InfoContactModel = obj3.GetModel(InfoID);

            //获取招商信息联系人
            //InfoContactManDAL obj4 = new InfoContactManDAL();
            //model.InfoContactManModels = obj4.GetModelList(InfoID);

            //获取招商信息相关资源
            InfoResourceDAL obj5 = new InfoResourceDAL();

            model.InfoResourceModels = obj5.GetModelList(InfoID);

            //短信息
            ShortInfoDAL obj6 = new ShortInfoDAL();

            model.ShortInfoModel = obj6.GetModel(InfoID);

            return(model);
        }
    /// <summary>
    /// 绑定行页信息
    /// </summary>
    private void BindXinYe()
    {
        Tz888.SQLServerDAL.Info.MainInfoDAL objtp = new Tz888.SQLServerDAL.Info.MainInfoDAL();
        DataSet dv = objtp.IndustryList();

        this.ddlIndustry.DataSource     = dv;
        this.ddlIndustry.DataTextField  = "IndustryCarveOutName";
        this.ddlIndustry.DataValueField = "IndustryCarveOutID";
        this.ddlIndustry.DataBind();
    }
        /// <summary>
        /// 获取一个完整的投资资源信息实体
        /// </summary>
        /// <param name="InfoID"></param>
        /// <returns></returns>
        public Tz888.Model.Info.CapitalSetModel GetIntegrityModel(long InfoID)
        {
            Tz888.Model.Info.CapitalSetModel model = new CapitalSetModel();

            //获取主要信息
            MainInfoDAL obj1 = new MainInfoDAL();

            model.MainInfoModel = obj1.GetModel(InfoID);

            //获取投资资源个性信息
            model.CapitalInfoModel = this.GetModel(InfoID);

            //获取信息联系方式
            InfoContactDAL obj3 = new InfoContactDAL();

            model.InfoContactModel = obj3.GetModel(InfoID);

            //获取投资信息联系人
            InfoContactManDAL obj4 = new InfoContactManDAL();

            model.InfoContactManModels = obj4.GetModelList(InfoID);

            //获取信息相关资源
            InfoResourceDAL obj5 = new InfoResourceDAL();

            model.InfoResourceModels = obj5.GetModelList(InfoID);

            //获取信息投资区域
            CapitalInfoAreaDAL obj6 = new CapitalInfoAreaDAL();

            model.CapitalInfoAreaModels = obj6.GetModelList(InfoID);

            //短信息
            ShortInfoDAL obj7 = new ShortInfoDAL();

            model.ShortInfoModel = obj7.GetModel(InfoID);

            return(model);
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (Page.User.Identity.Name == "")
        //{
        //    Response.Redirect("../Login.aspx");
        //}
        if (!IsPostBack)
        {
            BindXinYe();
            SetValid();
            BindCurrency();
            BindSetCapital();
            ViewState["strSavePath"] = "";


            try
            {
                Tz888.SQLServerDAL.Info.MainInfoDAL objtp = new Tz888.SQLServerDAL.Info.MainInfoDAL();
                string infoid = Request.QueryString["id"].ToString();
                //string infoid = "2396982";
                DataSet ds = objtp.GetOneList(infoid);
                this.txtTitle.Text            = ds.Tables[0].Rows[0]["Title"].ToString();
                this.txtKeyWord.Text          = ds.Tables[0].Rows[0]["KeyWord"].ToString();
                this.txtDescript.Text         = ds.Tables[0].Rows[0]["Descript"].ToString();
                this.txtDisplayTitle.Text     = ds.Tables[0].Rows[0]["DisplayTitle"].ToString();
                this.txtShortTitle.Text       = ds.Tables[0].Rows[0]["ShortTitle"].ToString();
                this.txtShortContent.Text     = ds.Tables[0].Rows[0]["ShortContent"].ToString();
                this.txtAdTitle.Text          = ds.Tables[0].Rows[0]["AdTitle"].ToString();
                ZoneSelectControl2.CountryID  = ds.Tables[0].Rows[0]["CountryCode"].ToString().Trim();
                ZoneSelectControl2.ProvinceID = ds.Tables[0].Rows[0]["ProvinceID"].ToString().Trim();
                ZoneSelectControl2.CountyID   = ds.Tables[0].Rows[0]["CountyID"].ToString().Trim();
                ZoneSelectControl2.CityID     = ds.Tables[0].Rows[0]["CityID"].ToString().Trim();
                string dusty = ds.Tables[0].Rows[0]["IndustryCarveOutID"].ToString().Trim();
                ddlIndustry.SelectedIndex = Convert.ToInt32(dusty.ToString()) - 1;
                //SelectIndustryControl1.IndustryModels = ds.Tables[0].Rows[0]["IndustryCarveOutID"].ToString();
                ddlMerchantTotal.SelectedValue = ds.Tables[0].Rows[0]["CapitalID"].ToString();
                int cc = Convert.ToInt32(ds.Tables[0].Rows[0]["InvestObject"].ToString());
                rblInvestObject.SelectedIndex = cc;
                txtRemark.Text       = ds.Tables[0].Rows[0]["Remark"].ToString();
                txtContent.Text      = ds.Tables[0].Rows[0]["Content"].ToString();
                txtInvestReturn.Text = ds.Tables[0].Rows[0]["InvestReturn"].ToString();
                ddlTemplate.Text     = ds.Tables[0].Rows[0]["TemplateID"].ToString();
                txtComName.Text      = ds.Tables[0].Rows[0]["ComName"].ToString();
                txtLinkMan.Text      = ds.Tables[0].Rows[0]["LinkMan"].ToString();
                string country = ds.Tables[0].Rows[0]["Tel"].ToString();
                //string a = country.Replace("+","");
                string[] b = country.Split('-');
                country.Length.ToString();
                country.Substring(1, 4);
                //  txtTelCountry.Text = country.ToString().Trim();
                txtTelZoneCode.Text = b[1];
                txtTelCountry.Text  = b[0];
                txtTelNumber.Text   = b[2];
                txtMobile.Text      = ds.Tables[0].Rows[0]["Mobile"].ToString();
                txtWebSite.Text     = ds.Tables[0].Rows[0]["WebSite"].ToString();
                txtPostCode.Text    = ds.Tables[0].Rows[0]["PostCode"].ToString();
                txtAddress.Text     = ds.Tables[0].Rows[0]["Address"].ToString();
                int XM = Convert.ToInt32(ds.Tables[0].Rows[0]["ValidateID"].ToString());
                this.rdbtXM.SelectedValue = XM.ToString();
                txtEmail.Text             = ds.Tables[0].Rows[0]["Email"].ToString();
            }
            catch (Exception ex)
            {
                Response.Write("<script>alert('请重新选择要修改的数据!');window.close();</script>");
            }
        }
    }
 private void CarveDataBind()
 {
     try
     {
         Tz888.SQLServerDAL.Info.MainInfoDAL objtp = new Tz888.SQLServerDAL.Info.MainInfoDAL();
         string infoid = Request["infoID"].ToString();                                          //获取ID
         //string infoid = Request.QueryString["infoID"].ToString();
         DataSet ds = objtp.GetOneList(infoid);                                                 //根据ID查询方法
         this.txtTitle.Text            = ds.Tables[0].Rows[0]["Title"].ToString();              //标题
         this.txtKeyWord.Text          = ds.Tables[0].Rows[0]["KeyWord"].ToString();            //关键字
         this.txtDescript.Text         = ds.Tables[0].Rows[0]["Descript"].ToString();           //网页描述
         this.txtDisplayTitle.Text     = ds.Tables[0].Rows[0]["DisplayTitle"].ToString();       //网页标题
         this.txtShortTitle.Text       = ds.Tables[0].Rows[0]["ShortTitle"].ToString();         //短标题
         this.txtShortContent.Text     = ds.Tables[0].Rows[0]["ShortContent"].ToString();       //短内容
         this.txtAdTitle.Text          = ds.Tables[0].Rows[0]["AdTitle"].ToString();            //广告语
         ZoneSelectControl2.CountryID  = ds.Tables[0].Rows[0]["CountryCode"].ToString().Trim(); //国
         ZoneSelectControl2.ProvinceID = ds.Tables[0].Rows[0]["ProvinceID"].ToString().Trim();  //省
         ZoneSelectControl2.CountyID   = ds.Tables[0].Rows[0]["CountyID"].ToString().Trim();    //市
         ZoneSelectControl2.CityID     = ds.Tables[0].Rows[0]["CityID"].ToString().Trim();      //县
         //ddlIndustry.SelectedValue = ds.Tables[0].Rows[0]["IndustryCarveOutID"].ToString().Trim();//行页
         string dusty = ds.Tables[0].Rows[0]["IndustryCarveOutID"].ToString().Trim();
         ddlIndustry.SelectedIndex      = Convert.ToInt32(dusty.ToString()) - 1;
         ddlMerchantTotal.SelectedValue = ds.Tables[0].Rows[0]["CapitalID"].ToString(); //所需资金
         int cc = Convert.ToInt32(ds.Tables[0].Rows[0]["InvestObject"].ToString());     //合作对象
         rblInvestObject.SelectedIndex = cc;
         txtRemark.Text       = ds.Tables[0].Rows[0]["Remark"].ToString();              //备注
         txtContent.Text      = ds.Tables[0].Rows[0]["Content"].ToString();             //内容
         txtInvestReturn.Text = ds.Tables[0].Rows[0]["InvestReturn"].ToString();        //回报形式
         ddlTemplate.Text     = ds.Tables[0].Rows[0]["TemplateID"].ToString();          //模版号
         txtComName.Text      = ds.Tables[0].Rows[0]["ComName"].ToString();             //公司名称
         txtLinkMan.Text      = ds.Tables[0].Rows[0]["LinkMan"].ToString();             //联系人
         string country = ds.Tables[0].Rows[0]["Tel"].ToString();                       //电话
         //string a = country.Replace("+","");
         string[] b = country.Split('-');
         country.Length.ToString();
         country.Substring(1, 4);
         //  txtTelCountry.Text = country.ToString().Trim();
         txtTelZoneCode.Text = b[1];
         txtTelCountry.Text  = b[0];
         txtTelNumber.Text   = b[2];
         txtMobile.Text      = ds.Tables[0].Rows[0]["Mobile"].ToString();                      //手机号码
         txtWebSite.Text     = ds.Tables[0].Rows[0]["WebSite"].ToString();                     //网站
         txtPostCode.Text    = ds.Tables[0].Rows[0]["PostCode"].ToString();                    //邮编
         txtAddress.Text     = ds.Tables[0].Rows[0]["Address"].ToString();
         int XM = Convert.ToInt32(ds.Tables[0].Rows[0]["ValidateID"].ToString());              //有效期
         this.rdbtXM.SelectedValue = XM.ToString();
         txtEmail.Text             = ds.Tables[0].Rows[0]["Email"].ToString();                 //邮箱
         rblAuditing.SelectedValue = ds.Tables[0].Rows[0]["AuditingStatus"].ToString().Trim(); //审核状态
         ddlSetGrade.SelectedValue = ds.Tables[0].Rows[0]["GradeID"].ToString();               //评分
         txtHit.Text           = ds.Tables[0].Rows[0]["Hit"].ToString();                       //人气
         txtLoginName.Text     = ds.Tables[0].Rows[0]["LoginName"].ToString();                 //登录名
         rdoType.SelectedValue = ds.Tables[0].Rows[0]["CarveOutInfoType"].ToString().Trim();   //1代表资金找项目,0代表项目找资金
         ViewState["pic1"]     = ds.Tables[0].Rows[0]["pic1"].ToString().Trim();
         if (ViewState["pic1"] == null || ViewState["pic1"].ToString() == "")
         {
             this.LbLook.Visible  = false;
             this.lblMessage.Text = "用户没有上传图片";
         }
     }
     catch (Exception ex)
     {
         Response.Write("<script>alert('请重新选择要修改的数据!');window.close();</script>");
     }
 }