string str2 = "select onedhid,onedhname from main where twodhid=23";
SqlDataAdapter rst2 = new SqlDataAdapter(str2, cn);
DataSet rdt2 = new DataSet();
rst2.Fill(rdt2);
repeater4.DataSource = rdt2;
repeater4.DataBind();
string str3 = "select onedhid,onedhname from main where twodhid=9";
SqlDataAdapter rst3 = new SqlDataAdapter(str3, cn);
DataSet rdt3 = new DataSet();
rst3.Fill(rdt3);
repeater5.DataSource = rdt3;
repeater5.DataBind();
cn.Close();
string h = DateTime.Now.Hour.ToString();//获取系统时间小时
string m = DateTime.Now.Minute.ToString();//获取系统时间分钟论文网http://www.751com.cn/
string s = DateTime.Now.Second.ToString();//获取系统时间秒
Label1.Text = "当前时间是:" + h + "时" + m + "分" + s + "秒";
repeater控件代码:
protected void repeater1_ItemCommand1(object source, RepeaterCommandEventArgs e)
{
}
protected void repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
}
protected void repeater4_ItemCommand(object source, RepeaterCommandEventArgs e)
{
}
protected void repeater5_ItemCommand(object source, RepeaterCommandEventArgs e)
{
}
4.2前台模块功能实现及代码:
1. 课程设置
如下图4.2所示:
图4.2 课程设置图
其主要代码如下:
protected void Page_Load(object sender, EventArgs e)
{ if (!IsPostBack)
{
string id = Request.QueryString["id"] + "";
if (id== "")
{
Response.Redirect("index.aspx");