ASP.NET宿舍管理系统(6)

来源:xiaoniu168.com 作者:本站原创 添加时间:2011-11-16 点击数:26061

计算机毕业设计功能介绍:

1、公告维护列表页面
在左侧菜单中点击公告维护,显示公告维护列表页面,包括发布时间、主题以及添加、修改和删除按钮。如图:

计算机毕业论文

以下是引用片段:

其代码实现如下:
private void Page_Load(object sender, System.EventArgs e)
  {
   // 在此处放置用户代码以初始化页面
   if(!Page.IsPostBack)
   {
    //绑定宿舍公告列表
    this.dg.DataSource=Sql2000DB.Get_Table("select * from 宿舍公告 order by 发布时间 DESC");
    this.dg.DataBind();
   }
  }
private void dg_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
  {
   if(e.CommandName=="Delete")
   {
    //删除当前的宿舍公告信息
    Sql2000DB.ExecSql("delete from 宿舍公告 where 公告编号=" +e.Item.Cells[0].Text);
    this.dg.DataSource=Sql2000DB.Get_Table("select * from 宿舍公告 order by 发布时间 DESC");
    this.dg.DataBind();
   }
   else if (e.CommandName=="Edit")
   {
    //跳转页面
    Response.t("GGEdit.aspx?id="+ e.Item.Cells[0].Text  +"");
   }
  }


〖资料来源:计算机毕业论文 www.xiaoniu168.com

第7页为计算机毕业论文功能介绍2.....

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网