好文档 - 专业文书写作范文服务资料分享网站

学生信息管理系统系统源代码

天下 分享 时间: 加入收藏 我要投稿 点赞

. . . . .

系统源代码

一、登录界面代码

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

public partial class login : System.Web.UI.Page {

protected void txtid_Click(object sender, EventArgs e) {

txtid.Text = \ txtpassword.Text = \ }

protected void Button1_Click(object sender, EventArgs e) {

string strconn = ConfigurationManager.AppSettings[\ SqlConnection conn = new SqlConnection(strconn); conn.Open();

DataSet ds=new DataSet () ;

SqlDataAdapter da = new SqlDataAdapter(\txtid.Text + \

. word . .

. . . . .

da.Fill(ds);

if (ds.Tables[0].Rows.Count==0) {

Label3 .Text =\账号或密码错误,请重新输入!\ } else {

Session [\ Session[\

Session[\ Session[\ if (Session[\ {

Response.Redirect(\ }

else if (Session[\ {

Response.Redirect(\ } else {

Label3.Text = \对不起,权限验证失败\ } }

conn.Close(); ds.Clear (); } }

. word . .

. . . . .

二、添加课程页面代码

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

public partial class addcourse : System.Web.UI.Page {

SqlCommand mycmd; SqlConnection conn;

protected void Page_Load(object sender, EventArgs e) {

courseid.Attributes.Add(\ string strconn = ConfigurationManager.AppSettings[\ conn = new SqlConnection(strconn); }

protected void Button1_Click(object sender, EventArgs e) {

if (courseid.Text.ToString() == \ {

Label7.Text = \课程号不能为空\ } else

. word . .

. . . . .

{

string sqlstr = \ sqlstr = \

course(courseid,coursename,coursetime,fen,type,teacher)values('\coursename.Text + \ + teacher.Text + \ conn.Open();

mycmd = new SqlCommand(sqlstr, conn); mycmd.Dispose(); try {

mycmd.ExecuteNonQuery();

Response.Write(\添加成功!!!');\ }

catch (SqlException) {

Response.Write(\添加失败!!!');\ } finally {

conn.Close(); sqlstr = \ } } }

protected void Button2_Click(object sender, EventArgs e) {

courseid.Text = \ coursename.Text = \ coursetime.Text = \

. word . .

. . . . .

fen.Text = \ type.Text = \ }

protected void Button3_Click(object sender, EventArgs e) {

Response.Redirect(\ } }

三、添加成绩程序代码

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

public partial class addscore : System.Web.UI.Page {

SqlCommand mycmd; SqlConnection conn;

protected void Page_Load(object sender, EventArgs e) {

string strconn = ConfigurationManager.AppSettings[\ conn = new SqlConnection(strconn);

. word . .

学生信息管理系统系统源代码

.....系统源代码一、登录界面代码usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collecti
推荐度:
点击下载文档文档为doc格式
8sxij9gzbp797950lpza3sk4u09qm100flp
领取福利

微信扫码领取福利

微信扫码分享