资源简介
asp.net在线作业提交管理系统,实现了学生在线作业的提交功能,主要提供了作业的在线提交,数据库是sqlsever
。
代码片段和文件信息
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
public string sql ncontent;
public string npicsnlinksntexts;
protected void Page_Load(object sender EventArgs e)
{
if (!IsPostBack)
{
sql = “select top 5 idtitleshouyetupian from allgonggao where shouyetupian<>‘‘ order by id desc“;
getsyt(sql);
sql = “select top 7 idtitleaddtimeleibie from allgonggao where leibie=‘站内新闻‘ order by id desc“;
getdata(sql);
sql = “select top 5 * from jiaoshixinxi where zhaopian<>‘‘ order by id desc“;
getdata2(sql);
sql = “select content from dx where leibie=‘系统简介‘“;
getdatadx(sql);
//sql = “select top 5 * from allgonggao where leibie=‘签证告知‘ order by id desc“;
//getdata2(sql);
//sql = “select top 5 * from kaoshizhidao order by id desc“;
//getdata3(sql);
//sql = “select top 5 * from shangpinxinxi where tupian<>‘‘ order by id desc“;
//getdata4(sql);
}
}
private void getdata(string sql)
{
DataSet result = new DataSet();
result = new Class1().hsggetdata(sql);
if (result != null)
{
if (result.Tables[0].Rows.Count > 0)
{
DataGrid1.DataSource = result.Tables[0];
DataGrid1.DataBind();
}
else
{
DataGrid1.DataSource = null;
DataGrid1.DataBind();
}
}
}
private void getdata2(string sql)
{
DataSet result = new DataSet();
result = new Class1().hsggetdata(sql);
if (result != null)
{
if (result.Tables[0].Rows.Count > 0)
{
DataList1.DataSource = result.Tables[0];
DataList1.DataBind();
}
else
{
DataList1.DataSource = null;
DataList1.DataBind();
}
}
}
private void getsyt(string sql)
{
DataSet result = new DataSet();
result = new Class1().hsggetdata(sql);
if (result != null)
{
if (result.Tables[0].Rows.Count > 0)
{
int i=0;
for(i=0;i {
npics = npics + result.Tables[0].Rows[i][“shouyetupian“].ToString().Trim()+“|“;
nlinks = nlinks + “ggdetail.aspx?id=“+result.Tables[0].Rows[i][“id“].ToString().Trim()+“|“;
ntexts = ntexts + result.Tables[0].Rows[i][“title“
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2647829 2012-03-19 00:17 net网上作业管理bflk2录像.exe
----------- --------- ---------- ----- ----
2647829 1
- 上一篇:商品销售管理系统C#源码
- 下一篇:asp.net在线新闻发布系统
评论
共有 条评论