private void DataPlay() { if (this.Request.QueryString["op"] != null) { this.txtop.Value = this.Request.QueryString["op"].ToString(); //新增还是修改 } if (this.Request.QueryString["id"] != null) { this.txtcid.Text = this.Request.QueryString["id"].ToString(); //部门ID } if (this.Request.QueryString["lastid"] != null) { this.txtlastcid.Value = this.Request.QueryString["lastid"].ToString(); //上级部门ID } TPortalClass.JpColumns JpColumns = new TPortalClass.JpColumns(); //新文档 if (this.txtop.Value == "add") { this.txtcid.Text = JpColumns.GetMaxCid(txtlastcid.Value); this.txtcid.Enabled = false; } //旧文档 if (this.txtop.Value == "modify") { DataTable dt = JpColumns.GetColumnBycid(this.txtcid.Text); if (dt.Rows.Count > 0) { this.txtcname.Text = dt.Rows[0]["cname"].ToString(); this.txtcsort.Text = dt.Rows[0]["csort"].ToString(); this.ddltmp_col.SelectedValue = dt.Rows[0]["tmp_col"].ToString(); this.ddltmp_art.SelectedValue = dt.Rows[0]["tmp_art"].ToString(); this.txtpubhtmlpath.Text = dt.Rows[0]["pubhtmlpath"].ToString(); this.txtrss.Text = dt.Rows[0]["rss"].ToString(); this.txtnewday.Text = dt.Rows[0]["newday"].ToString(); // this.txtnewpic.Text = dt.Rows[0]["newpic"].ToString(); if (dt.Rows[0]["newpic"].ToString() != "") { this.txtpicurl.Value = dt.Rows[0]["newpic"].ToString(); this.lblpic.Text = "<img src='" + dt.Rows[0]["newpic"].ToString() + "' onError=\"this.src='/images/index/images/nophoto.jpg';\" width=60px height=55px />"; } this.txtseotitle.Text = dt.Rows[0]["seotitle"].ToString(); this.txtseokeywords.Text = dt.Rows[0]["seokeywords"].ToString(); this.txtseodescription.Text = dt.Rows[0]["seodescription"].ToString(); if (dt.Rows[0]["online"].ToString() == "1") { cblsx.Items[0].Selected = true; } else { cblsx.Items[0].Selected = false; } if (dt.Rows[0]["hotpublish"].ToString() == "1") { cblsx.Items[1].Selected = true; } else { cblsx.Items[1].Selected = false; } if (dt.Rows[0]["shtml"].ToString() == "1") { cblsx.Items[2].Selected = true; } else { cblsx.Items[2].Selected = false; } if (dt.Rows[0]["pubtime"].ToString() == "1") { cblsx.Items[3].Selected = true; } else { cblsx.Items[3].Selected = false; } } } }