云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 汽车调度系统论文

汽车调度系统论文

  • 62 次阅读
  • 3 次下载
  • 2025/5/2 15:13:03

5.2 用户登录页面

图5-1 用户登录页面

系统首页即为用户登录页面index.aspx,用户登录在本系统当中用一个共同的页面,如图5-1所示。用户在登录页面点击确定登录时,用户名称和密码不能为空。其中执行用户登录的主要代码如下:

using System;

using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web;

using System.Web.SessionState; using System.Web.UI;

using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Data.SqlClient; namespace car1 {

///

25

protected void login_Click(object sender, System.EventArgs e) {

//检查帐号和密码

if(this.username.Text==\&this.password.Text==\) { } string

SqlConnection Conn=new SqlConnection(SqlConn);

Session[\]=\; Response.Redirect(\);

}

#endregion

#region Web 窗体设计器生成的代码

override protected void OnInit(EventArgs e) { }

///

/// 设计器支持所需的方法- 不要使用代码编辑器修改 /// 此方法的内容。 ///

private void InitializeComponent() {

//

// CODEGEN: 该调用是ASP.NET Web 窗体设计器所必需的。 //

InitializeComponent(); base.OnInit(e);

///

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

protected void Page_Load(object sender, System.EventArgs e) { }

// 在此处放置用户代码以初始化页面

SqlConn=System.Configuration.ConfigurationSettings.AppSettings[\];

26

Conn.Open();

string SqlStr0=\

username='\+this.username.Text+\+this.password.Text+\普通用户' and part='车队'\; '\; '\;

SqlCommand Comm2=new SqlCommand(SqlStr2,Conn); SqlDataReader read2=Comm2.ExecuteReader();

SqlCommand Comm1=new SqlCommand(SqlStr1,Conn); SqlDataReader read1=Comm1.ExecuteReader(); if(read1.Read()) { } else {

read1.Close();

string SqlStr2=\Response.Redirect(\); read1.Close(); Conn.Close();

this.Label1.Text=read1[\].ToString(); Session[\]=this.username.Text; Session[\]=this.password.Text; Session[\]=this.Label1.Text;

SqlCommand Comm0=new SqlCommand(SqlStr0,Conn); SqlDataReader read0=Comm0.ExecuteReader(); if(read0.Read()) { } else {

read0.Close();

string SqlStr1=\Session[\]=this.username.Text; Session[\]=this.password.Text; //Session[\Session[\]=\; Response.Redirect(\); read0.Close(); Conn.Close();

username='\+this.username.Text+\+this.password.Text+\超级用户

username='\+this.username.Text+\+this.password.Text+\普通用户

27

}

}

}

} else { }

read3.Close(); Conn.Close();

this.err.Text=\您输入的用户名或密码错误\; this.username.Text=\; this.password.Text=\;

if(read2.Read()) { } else {

read2.Close();

string SqlStr3=\SqlCommand Comm3=new SqlCommand(SqlStr3,Conn); SqlDataReader read3=Comm3.ExecuteReader(); if(read3.Read()) {

this.err.Text=\对不起,您还没有通过审核!\; read3.Close(); Conn.Close();

this.username.Text=\; this.password.Text=\;

Session[\]=this.username.Text; Session[\]=this.password.Text; Session[\]=read2[\].ToString(); Session[\]=\; Response.Redirect(\); read2.Close(); Conn.Close();

username='\+this.username.Text+\+this.password.Text+\;

28

搜索更多关于: 汽车调度系统论文 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

5.2 用户登录页面 图5-1 用户登录页面 系统首页即为用户登录页面index.aspx,用户登录在本系统当中用一个共同的页面,如图5-1所示。用户在登录页面点击确定登录时,用户名称和密码不能为空。其中执行用户登录的主要代码如下: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using Sy

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com