• 大小: 839KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-03-25
  • 语言: 其他
  • 标签: 校园新闻  

资源简介

校园新闻管理系统源码。功能包括:前台新闻首页,基本浏览,前台搜索。后台管理界面,新闻管理,新闻审核,评论管理,管理员资料管理。

资源截图

代码片段和文件信息

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.OleDb;

//该源码下载自www.51aspx.com(51aspx.com)

namespace Lb_news
{
/// 
/// admin_article 的摘要说明。
/// 

public class admin_article : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid LbNews_Article;

protected Conn ds2=new Conn();

protected  OleDbDataReader rd;
protected System.Web.UI.WebControls.TextBox keyword;
protected System.Web.UI.WebControls.RequiredFieldValidator required1;
protected System.Web.UI.WebControls.Button Submit;
protected  DataSet ds;
protected string strSql;

private void Page_Load(object sender System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
ds2.CheckCookies(2);

if(!Page.IsPostBack)
{

LbNews(“def“);
}
}


private void LbNews(string ShowType)
{
if (ShowType==“def“)
{
strSql=“select * from Lb_News where n_check=1 order by n_id desc“;
}

else
{
string Seatitle=Request[“keyword“];  

strSql=“select * from Lb_News where n_title like ‘%“+Seatitle+“%‘ and n_check=1 order by n_date desc“;

}

try

{

ds2.DBopen();
ds=ds2.CreateDataSet(strSql“Lb_News“);

LbNews_Article.DataSource = ds;
LbNews_Article.DataBind();


}
catch(System.Data.OleDb.OleDbException e)
{
Response.Write (e.ToString());

}

finally
{
ds2.DBclose();
}

}





public string LbNews_Edit(object aobject b)
{
string title=a.ToString();

int newid=ds2.ChangeToInt(b.ToString());


string LbNews_title=““+title+““;
return LbNews_title;

      

}




public string LbNews_Class(object a)
{

ds2.DBopen();
int classid=ds2.ChangeToInt(a.ToString());

     
rd=ds2.ExecuteOleDbDataReader(“select * from Lb_Class where C_Id=“+classid+““);

rd.Read();
string classname=rd[“C_Name“].ToString();
rd.Close();
            
ds2.DBclose();

return classname;


}





#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}

/// 
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// 

private void InitializeComponent()
{    
this.Submit.Click += new System.EventHandler(this.Submit_Click);
this.LbNews_Article.PageIndexChanged += new System.Web.UI.WebControls.DataGridPageChangedEventHandler(this.LbNews_Article_PageIndexChanged);
this.LbNews_Article.DeleteCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.LbNews_Article_DeleteCommand);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void LbNews_Article_PageIndexChanged(object source

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3661  2005-11-19 01:52  SchoolNews\admin_article.aspx

     文件       4244  2008-06-25 10:32  SchoolNews\admin_article.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_article.aspx.resx

     文件       7856  2005-11-19 01:52  SchoolNews\admin_articleadd.aspx

     文件       5437  2008-06-25 10:49  SchoolNews\admin_articleadd.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_articleadd.aspx.resx

     文件       8035  2005-11-19 01:52  SchoolNews\admin_articledit.aspx

     文件       5449  2005-11-19 01:52  SchoolNews\admin_articledit.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_articledit.aspx.resx

     文件       3839  2005-11-19 01:52  SchoolNews\admin_checknews.aspx

     文件       5110  2005-11-19 01:52  SchoolNews\admin_checknews.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_checknews.aspx.resx

     文件       2522  2005-11-19 01:52  SchoolNews\admin_class.aspx

     文件       5673  2005-11-19 01:52  SchoolNews\admin_class.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_class.aspx.resx

     文件       1514  2005-11-19 01:52  SchoolNews\admin_classadd.aspx

     文件       2364  2005-11-19 01:52  SchoolNews\admin_classadd.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_classadd.aspx.resx

     文件       5626  2005-11-19 01:52  SchoolNews\admin_left.aspx

     文件       1110  2005-11-19 01:52  SchoolNews\admin_left.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_left.aspx.resx

     文件       3802  2005-11-19 01:52  SchoolNews\admin_link.aspx

     文件       6085  2005-11-19 01:52  SchoolNews\admin_link.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_link.aspx.resx

     文件       2345  2005-11-19 01:52  SchoolNews\admin_login.aspx

     文件       2737  2005-11-19 01:52  SchoolNews\admin_login.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_login.aspx.resx

     文件        677  2008-06-22 12:32  SchoolNews\admin_loginout.aspx

     文件       1227  2005-11-19 01:52  SchoolNews\admin_loginout.aspx.cs

     文件       1733  2005-11-19 01:52  SchoolNews\admin_loginout.aspx.resx

............此处省略286个文件信息

评论

共有 条评论