| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 414 人关注过本帖
标题:紧急求助
只看楼主 加入收藏
纵横四海
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-7-13
收藏
 问题点数:0 回复次数:0 
紧急求助
一个学生预约的网站,按时间段预约,预约成功后,会在另一个页面显示学生姓名,学号,预约时间等个人信息

现在想实现这样的功能,DropDownList1里邦定的时间段,每个时间段只能预约两个人,超过两个人会给出一个提示

另外 DataView能按周分页吗

本人刚学.net没多久,请大家多多帮忙,先谢了

using System;
using System.Data;
using System.Configuration;
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;
using System.Data.OleDb;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void btntj_Click(object sender, EventArgs e)
{
string text = string.Empty;
if (rb1.Checked)
{
text = "就业政策、流程";
}
else if (rb2.Checked)
{
text = "职业生涯规划";
}

else if (rb3.Checked)
{
text = "简历制作、面试技巧";
}
else if (rb4.Checked)
{
text = "权益保障";
}
else if (rb5.Checked)
{
text = "就业心理障碍";
}
else if (rb6.Checked)
{
text = other.Text;
}
DateTime d1 = System.DateTime.Now;
string strconnection = "provider=microsoft.jet.oledb.4.0;Data Source=C:\\Documents and Settings\\User\\My Documents\\Visual Studio 2005\\work\\App_Data\\cauwork.mdb";

OleDbConnection cusconnection = new OleDbConnection(strconnection);

cusconnection.Open();
string strcmd = "insert into job([name], xuehao,collage,tel,banji,mail,zxnr,zxsj,[time]) values('" + name.Text + "','" + xuehao.Text + "','" + collage.Text + "','" + tel.Text + "','" + banji.Text + "','" + mail.Text + "','" + text + "','" + DropDownList1.SelectedItem.Text + "',#" + d1 + "#)";
OleDbCommand cmd = new OleDbCommand(strcmd, cusconnection);
cmd.ExecuteNonQuery();
cusconnection.Close();
Response.Write("<script>alert('预约成功')</script>");
name.Text = "";
collage.Text = "";
tel.Text = "";
xuehao.Text = "";
banji.Text = "";
mail.Text = "";

other.Text="";
}
protected void btncz_Click(object sender, EventArgs e)
{
name.Text = "";
collage.Text = "";
tel.Text = "";
xuehao.Text = "";
banji.Text = "";
mail.Text = "";
}
}

搜索更多相关主题的帖子: border 个人信息 时间段 
2007-09-16 00:25
快速回复:紧急求助
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015804 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved