BookMarkList.aspx.cs
上传用户:hbbfjy2008
上传日期:2015-02-05
资源大小:5616k
文件大小:2k
- using System;
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Web;
- using System.Web.SessionState;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.HtmlControls;
- using System.Data.SqlClient;
- namespace iWebOffice.ocx.c.net.BookMark
- {
- /// <summary>
- /// BookMarkList 的摘要说明。
- /// </summary>
- public class BookMarkList : System.Web.UI.Page
- {
- iDBManage2000 DBAobj;
- private void Page_Load(object sender, System.EventArgs e)
- {
- // 在此处放置用户代码以初始化页面
- DBAobj=(iDBManage2000)Session["DBDemo"];
- }
- public string GetBookMarkList()
- {
- string mBookMarkList="";
- string strSelectCmd="select * from BookMarks order by BookMarkID desc";
- SqlCommand mCommand = new SqlCommand(strSelectCmd,DBAobj.Connection);
- SqlDataReader mReader = mCommand.ExecuteReader();
-
- while (mReader.Read())
- {
- mBookMarkList+="<tr>";
- mBookMarkList+="<td class=TDStyle>" + mReader["BookMarkID"].ToString()+" </td>";
- mBookMarkList+="<td class=TDStyle>" + mReader["BookMarkName"].ToString()+" </td>";
- mBookMarkList+="<td class=TDStyle>" + mReader["BookMarkDesc"].ToString()+" </td>";
- mBookMarkList+="<td class=TDStyle>" + mReader["BookMarkText"].ToString()+" </td>";
- mBookMarkList+="<td class=TDStyle width=148 nowrap>";
- mBookMarkList+="<input type=button onclick=javascript:location.href='BookMarkEdit.aspx?BookMarkID=" + mReader["BookMarkID"].ToString()+"'; name='Edit' value=' 修 改 '>";
- mBookMarkList+="<input type=button onclick=javascript:ConfirmDel('BookMarkDel.aspx?BookMarkID=" + mReader["BookMarkID"].ToString()+"'); name='Del' value=' 删 除 '>";
- mBookMarkList+="</td>";
- mBookMarkList+="</tr>";
- }
- mReader.Close();
- return (mBookMarkList);
- }
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
- //
- InitializeComponent();
- base.OnInit(e);
- }
-
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- this.Load += new System.EventHandler(this.Page_Load);
- }
- #endregion
- }
- }