Exemple #1
0
 //根据ID查询信息并加载到界面
 public void Interface(string id)
 {
     DataTable dt = newshelper.getMang(id);
     if (dt.Rows.Count > 0)
     {
         //DropGroup.SelectedValue = dt.Rows[0]["tClassID"].ToString();                        //所属分类
         txtTlitle.Text = dt.Rows[0]["tTitle"].ToString();                                   //标题内容
         txtFromWhere.Text = dt.Rows[0]["tFromWhere"].ToString();                            //来至何处
         content1.InnerText = dt.Rows[0]["tMemo"].ToString();
         //ftb.Text = dt.Rows[0]["tMemo"].ToString();                                          //内容
         // txtPubtime.Value = dt.Rows[0]["dtPubTime"].ToString();                               //发布时间
         if (dt.Rows[0]["oTop"].ToString() == "True")                                        //是否置顶
         {
             RadioState.SelectedValue = "1";
         }
         else
         {
             RadioState.SelectedValue = "0";
         }
     }
     else
     {
         ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('获取数据失败!')</script>");
     }
 }