//初始化 private void ShowInfo() { if (Request.QueryString["id"] != null) { SP.BLL.selection bll = new SP.BLL.selection(); SP.Model.selection model = bll.GetModel(int.Parse(Request.QueryString["id"])); this.lblid.Text = model.id.ToString(); this.lbltitle.Text = model.title; this.lblmemo.Text = model.memo; this.lblatime.Text = model.atime.ToString(); } }
//初始化 private void ShowInfo() { if (Request.QueryString["id"] != null) { SP.BLL.selection bll = new SP.BLL.selection(); //根据编号得到相应的记录 DataSet ds = bll.GetList(" id=" + Request.QueryString["id"]); if (ds.Tables[0].Rows.Count > 0) { DataRow sdr = ds.Tables[0].Rows[0]; lbltitle.Text = sdr["title"].ToString(); lblmemo.Text = sdr["memo"].ToString(); lblatime.Text = sdr["atime"].ToString(); } } }