排课程表的asp源码(asp排程软件)
本文目录一览:
- 1、例如这样的课程表如何制作呢?是否有现成的源码(asp)
- 2、在ASP.NET 中,一个班级的课程表该如何实现?
- 3、帮我排个初三课表,有难度,谢谢。
- 4、asp如何制作大学课程表。选择不同的班级,就会有不同的课表。有课的时候显示课程名,上课地点和教师。
- 5、asp.net,用table做一个课程表。
例如这样的课程表如何制作呢?是否有现成的源码(asp)
帮你写一个,自己加入到网站中去:
1,建立库,在原来的库上加一个表也可以,现在假设新建一个名叫book的库,ACCSEE型,表名叫Test_book
库名=book
表(Test_book):id(自动编号),bookdate(日期,文本50),booktime(时间,文本50),bookname(课程名,文本50),BookClass(数字,课程分期)
2,conn.asp//库链接及通用函数页
将下面的代码保存为conn.asp
%
dim conn,connstr,db,BookClassName
BookClassName = "执业医师" '课程类名称,请修改
db="book.mdb"
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " Server.MapPath(db)
On Error Resume Next
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ConnStr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "DATABASE IS ERR!"
Response.End
End If
Function Showpage(totalnumber,maxperpage,filename,cpage)
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
Response.Write "总课程"totalnumber",每页"maxperpage"/第"cpage"页/共"n"页" VbCrLf
if cpage2 then
Response.Write " 首页 上页 " VbCrLf
else
Response.Write " a href="filename"?page=1首页/a " VbCrLf
Response.Write "a href="filename"?page="cpage-1"上页/a " VbCrLf
end if
if n-cpage1 then
Response.Write "下页 末页" VbCrLf
else
Response.Write "a href="filename"?page="cpage+1"下页/a " VbCrLf
Response.Write "a href="filename"?page="n"末页/a" VbCrLf
end if
End function
Sub BookCss()
Response.Write "style type=""text/css""" VbCrLf
Response.Write "BODY {margin:0;Padding:0;COLOR:#444;font-family:宋体;font-size: 9pt }" VbCrLf
Response.Write "TD { COLOR: #444; font-family:Verdana;font-size:9pt}" VbCrLf
Response.Write "form{margin:5,0,0,0}" VbCrLf
Response.Write "input {border-width: 1; border-color: #000000; background-color: #efefef; font-family: 宋体; font-size: 9pt; COLOR:#333;line-height:14px}" VbCrLf
Response.Write "textarea {border-width: 1; border-color: #000000; background-color: #efefef; font-family: 宋体; font-size: 9pt;}" VbCrLf
Response.Write "select {border-width: 1; border-color: #000; background-color: #eee; font-family: 宋体; font-size: 9pt;}" VbCrLf
Response.Write "A {COLOR: #444;font-family:Verdana}" VbCrLf
Response.Write "A:link {color:0000aa;TEXT-DECORATION: none }" VbCrLf
Response.Write "A:visited {color:0000aa;TEXT-DECORATION: none }" VbCrLf
Response.Write "A:hover {COLOR: #ff2200;TEXT-DECORATION: none }" VbCrLf
Response.Write ".headdiv{height:105px;width:100%;margin:0;padding:10;background:#f8f8f8}" VbCrLf
Response.Write ".Linediv1{border-bottom: #ccc 2px solid;width:100%;margin:0;padding:0;line-heignt:1px;;height:1px}" VbCrLf
Response.Write ".Linediv{border-top: #999 1px solid;width:100%;margin:0;padding:0;line-heignt:1px;height:1px}" VbCrLf
Response.Write ".Listdiv{width:550px;padding:10;background:#eee}" VbCrLf
Response.Write ".cpagediv{margin-top:5px;padding-left:10px;color:#999}" VbCrLf
Response.Write ".adddiv{width:100%;margin-bottom:5px;padding-left:60px}" VbCrLf
Response.Write ".li1{width:250px;line-height:16px;font-size:12px;list-style:none;color:069}" VbCrLf
Response.Write "/style" VbCrLf
End Sub
%
3.BookMain.asp//课程管理,仅提供添加和删除,若要修改功能请联系。
将下面的代码保存为BookMain.asp,和conn.asp在同一目录
!--#include file="Conn.asp"--
%
Dim FileName
FileName = "BookMain.asp"
Call Main()
Conn.Close:Set Conn = Nothing
Sub Main()
Call BookCss()
Select Case Request("action")
Case "DelBook"
Call DelBook(Trim(Request("Id")),Trim(Request("page")))
Case "AddBook"
Call BookSave()
Call BookList()
Case Else
Call UpdateMain()
Call BookList()
End Select
Conn.Close:Set Conn = Nothing
End Sub
Sub UpdateMain()
Dim ClassNum
ClassNum = 1
Set Rs = Conn.execute("Select Top 1 Bookclass From Test_Book Order By Id Desc")
If Not(rs.bof and rs.eof) Then ClassNum = Rs(0)+1
Rs.Close:Set Rs = Nothing
Response.Write "DIV class=headdiv" VbCrLf
Response.Write "divb添加新课程/b/div" VbCrLf
Response.Write "form method=POST action=""?action=AddBook"" name=form1" VbCrLf
Response.Write "div" VbCrLf
Response.Write "课程名称:input type=""text"" name=""bookname"" value="""" size=20" VbCrLf
Response.Write "课程期数:input type=""text"" name=""BookClass"" value="""ClassNum""" size=5填写数字/div" VbCrLf
Response.Write "div" VbCrLf
Response.Write "开课日期:input type=""text"" name=""Bookdate"" value="""" size=20" VbCrLf
Response.Write "开课时间:input type=""text"" name=""booktime"" value="""" size=20/div" VbCrLf
Response.Write "div class=adddivinput type=""submit"" value="" 确定添加 "" name=""button1""/div" VbCrLf
Response.Write "/form" VbCrLf
Response.Write "/DIV" VbCrLf
Response.Write "DIV class=linediv/DIV" VbCrLf
End Sub
Sub BookSave()
Dim BookName,BookClass,BookDate,BookTime,BMark
BookClass = Trim(Request("BookClass"))
If Isnumeric(BookClass) = False Then Exit Sub
BookClass = Cint(BookClass)
BookName = Trim(Request("BookName"))
BookDate = Trim(Request("BookDate"))
BookTime = Trim(Request("BookTime"))
Conn.Execute("insert Into Test_Book(BookName,BookClass,BookDate,BookTime)Values('"BookName"','"BookClass"','"BookDate"','"BookTime"')")
Response.Write "DIV class=headdiv" VbCrLf
Response.Write "divb课程添加成功!/b/div" VbCrLf
Response.Write "form method=POST action= name=form2" VbCrLf
Response.Write "div第"BookClass"期课程,"BookName","BookDateBooktime"开课。a href=""?action=Main""继续添加/a" VbCrLf
Response.Write "/div" VbCrLf
Response.Write "/form" VbCrLf
Response.Write "/DIV" VbCrLf
Response.Write "DIV class=linedivnbsp;/DIV" VbCrLf
End Sub
Sub BookList()
Dim MaxPage,totalPut,cpage,Infonum,k,i
cpage = 1
If Request("page")"" then
If Isnumeric(Request("page")) = False Then
cpage = 1
Else
cpage=Cint(Request("page"))
End If
End If
Infonum = 1
MaxPage = 15
Response.Write "DIV Style=""width=:100%;margin:0;""" VbCrLf
Response.Write "div b课程管理/b/div" VbCrLf
Response.Write "div class=Listdiv" VbCrLf
Set Rs = Server.CreateObject("ADODB.RecordSet")
Sql = "Select * From Test_book Order By Id Desc"
Rs.Open Sql,Conn,1,1
If Rs.eof and rs.bof then
Response.write "p暂时没有任何课程。/p" VbCrLf
Else
i=0
totalPut=Rs.Recordcount
If cpage1 then cpage=1
If (cpage-1)*MaxPagetotalput then
If (totalPut mod MaxPage)=0 then
cpage= totalPut \ MaxPage
Else
cpage= totalPut \ MaxPage + 1
End If
End if
If cpage1 then
If (cpage-1)*MaxPagetotalPut then
Rs.move (cpage-1)*MaxPage
BMark = Rs.bookmark
Else
cpage = 1
End If
End If
InfoNum = totalPut-(cpage-1)*MaxPage
k = 4 - len(InfoNum)
Do while k0
k = k - 1
InfoNum = "0" InfoNum
loop
Response.Write "div class=cpagediv" VbCrLf
showpage totalput,MaxPage,filename,cpage
Response.Write "/div" VbCrLf
Response.Write "table width=540 border=0 cellspacing=2 cellpadding=0" VbCrLf
Response.Write "tr align=center bgcolor=""#C2CCE2""" VbCrLf
Response.Write "td width=""10%"" height=24序号/td" VbCrLf
Response.Write "td width=""20%""日期/td" VbCrLf
Response.Write "td width=""20%""时间/td" VbCrLf
Response.Write "td width=""30%""课程名称/td" VbCrLf
Response.Write "td width=""10%""期数/td" VbCrLf
Response.Write "td width=""10%""操作/td" VbCrLf
Response.Write "/tr" VbCrLf
Do while not Rs.eof and maxpage0
i = i+1
Response.Write "tr align=center bgcolor=""DFE8EE""" VbCrLf
Response.Write "td height=24"InfoNum"/td" VbCrLf
Response.Write "td"rs(1)"/td" VbCrLf
Response.Write "td"rs(2)"/td" VbCrLf
Response.Write "td"rs(3)"/td" VbCrLf
Response.Write "td"rs(4)"期/td" VbCrLf
Response.Write "tda href=0.asp?Id="rs(0)"action=DelBook onClick=""return confirm('警告:您的操作不可恢复,确定删除选定的程序记录? ')""删除/a/td" VbCrLf
Response.Write "/tr" VbCrLf
If i = MaxPage Then Exit Do
Rs.movenext
InfoNum = InfoNum-1
k = 4 - len(InfoNum)
Do while k0
k = k - 1
InfoNum = "0" InfoNum
loop
Loop
Response.Write "/table" VbCrLf
End If
Rs.Close:Set Rs = Nothing
Response.Write "div" VbCrLf
Response.Write "/DIV" VbCrLf
End Sub
Sub DelBook(Id,page)
Conn.Execute("Delete * From Test_Book where Id="Id)
Response.redirect "0.asp?page="page
End Sub
%
4.课程显示页面:Showbook.asp
将下面的代码存为Showbook.asp,如果不和conn.asp不在同一目录,注意修改conn.asp路径:
我晕,好象是字数超限了,几次贴不上来,就贴到这里,还有一页HI我,给张图片看看。
在ASP.NET 中,一个班级的课程表该如何实现?
其实实现起来有满多种的:
你也可以用DEATLIST控件还有一个REP什么也是数据绑定控件的,
也可以用其它架构的列表控件的,就像我现在刚做完的一个项目就是用
COOLITE的!很好看有好用,还有分页什么的;你可以试一下
你还可以用动态生成表格的方式
帮我排个初三课表,有难度,谢谢。
欢迎您使用“Web智能排课系统[WebKCB]”!
Web智能排课系统[WebKCB]是一个适合中小学校进行课程编排的ASP网站系统,通过比较目前市面上的十几套排课软件,精心设计,有着与众不同的特点:
一、操作简单:系统应用B/S结构,会上网,就会操作,排成的课表,可通过网络,方便教师查询;
二、设置简单:只要稍加熟悉,参照系统在线数据,五分钟完成排课数据输入;
三、功能实用:排课结果合理,固定课、无课、共用公共场地、教师活动(会议)安排等等均可设置;
四、排课灵活:手功排,自动排可交替实施,课表调整自动判断是否满足已设条件等;
五、排课条件:分人员限制条件和场地限制条件,任意设置,灵活方便;
六、适应广泛:每周排课天数可在5--14天,每天最大课程节次数15节,适合各类学校要求;
七、调课方便:在管理员的允许下,教师之间可以实现相互调课,优化排课结果;
八、输出合理:通过IE直接预览、打印输出班级课表、教师课表和总课程表。
欢迎使用提供的在线排课。点击下载系统ASP代码。
asp如何制作大学课程表。选择不同的班级,就会有不同的课表。有课的时候显示课程名,上课地点和教师。
使用数据库。首先利用电子表格制作一个课程表,将对应的星期、课程、老师及地点输入,在APP中调用系统日期中的星期数,对数据库中的星期这一栏进行搜索,取出对应栏的数据在界面上显示出来就可以了。
asp.net,用table做一个课程表。
No1:你绑定dropdownlist,也是把课程表这个表的字段学期绑定在dropdownlist。
代码例如:
string ConnString = ConfigurationSettings.AppSettings["ConnectionString"];
//创建一个SqlConnection
SqlConnection Conn = new SqlConnection( ConnString );
string SQL_Select = "select × from 课程表";
//构造一个SqlDataAdapter
SqlDataAdapter myAdapter = new SqlDataAdapter( SQL_Select, Conn);
//开始读取数据
Conn.Open();
DataSet dataSet = new DataSet();
myAdapter.Fill( dataSet,"Table1" );
Conn.Close();
//开始绑定DropDownList
//指定DropDownList使用的数据源
DropDownList1.DataSource = dataSet.Tables["Table1"].DefaultView;
//指定DropDownList使用的表里的那些字段
DropDownList1.DataTextField = "学期"; //dropdownlist的Text的字段
DropDownList1.DataValueField = "id";//dropdownlist的Value的字段
DropDownList1.DataBind();
No2:拉一个绑定表的控件。。。
把dropdownlist的Text的字段 作为参数,读取这个表,,显示,ok