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>");
            }
        }
    }
Exemplo n.º 2
0
 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>");
     }
 }