TemplateList.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.Template
- {
- /// <summary>
- /// TemplateList 的摘要说明。
- /// </summary>
- public class TemplateList : System.Web.UI.Page
- {
- iDBManage2000 DBAobj;
- private void Page_Load(object sender, System.EventArgs e)
- {
- DBAobj=(iDBManage2000)Session["DBDemo"];
- }
- public string GetTemplateList()
- {
- string mTemplateList="";
- string strSelectCmd="Select RecordID,FileType,FileName,Descript From Template_File order by TemplateID desc";
- SqlCommand mCommand = new SqlCommand(strSelectCmd,DBAobj.Connection);
- SqlDataReader mReader = mCommand.ExecuteReader();
-
- while (mReader.Read())
- {
- mTemplateList+="<tr>";
- mTemplateList+="<td class=TDStyle>" + mReader["RecordID"].ToString()+" </td>";
- mTemplateList+="<td class=TDStyle>" + mReader["FileName"].ToString()+" </td>";
- mTemplateList+="<td class=TDStyle>" + mReader["FileType"].ToString()+" </td>";
- mTemplateList+="<td class=TDStyle>" + mReader["Descript"].ToString()+" </td>";
- mTemplateList+="<td class=TDStyle width=148 nowrap>";
- mTemplateList+="<input type=button onclick=javascript:location.href='TemplateEdit.aspx?RecordID=" + mReader["RecordID"].ToString()+"&FileType=" + mReader["FileType"].ToString() +"'; name='Edit' value=' 修 改 '>";
- mTemplateList+="<input type=button onclick=javascript:ConfirmDel('TemplateDel.aspx?RecordID=" + mReader["RecordID"].ToString()+"'); name='Del' value=' 删 除 '>";
- mTemplateList+="</td>";
- mTemplateList+="</tr>n";
- }
- mReader.Close();
- return (mTemplateList);
- }
- #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
- }
- }