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;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if ( !this.IsPostBack)
{
this.But_ok.Attributes.Add("onClick","return check()");
}
if (Request.QueryString.Count >=1)
{
string ErrorNum = Request.QueryString["PrintError"].ToString().Trim();
switch (ErrorNum)
{
case "1":
this.LabelError.Text="不明原因,造成错误!";
break;
case "2":
this.LabelError.Text="您过长的时间没有使用系统,请重新登录!";
break;
case "3":
this.LabelError.Text=Request.QueryString["ErrorMeg"].ToString();
break;
default :
this.LabelError.Text="你没有任何权限,所以你不能登录本系统!如想要登录请与管理员联系!";
break;
}
this.LabelError.Visible=true;
}
}
private int CheckLoginUser(string UserPWD,string UserLoginName)
{
int flag =1;
try
{
if(UserPWD.Length>0 && UserLoginName.Length>0)
{
MyInConn dbConn = new MyInConn();
dbConn.intInConn();
System.Data.SqlClient.SqlCommand UserLoginCheckCmd= new SqlCommand("sp_usercheck",dbConn.SqlConn);