資源簡介
C#版學生管理系統 C#版學生管理系統 C#版學生管理系統

代碼片段和文件信息
using?System;
using?System.Collections;
using?System.ComponentModel;
using?System.Data;
using?System.Data.SqlClient;
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.Configuration;
using?System.Data.OleDb;
namespace?sms
{
///?
///?_default?的摘要說明。
///?
public?partial?class?_default?:?System.Web.UI.Page
{
protected?void?Page_Load(object?sender?System.EventArgs?e)
{
//?在此處放置用戶代碼以初始化頁面
}
#region?Web?Form?Designer?generated?code
override?protected?void?OnInit(EventArgs?e)
{
//
//?CODEGEN:該調用是?ASP.NET?Web?窗體設計器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
///?
///?設計器支持所需的方法?-?不要使用代碼編輯器修改
///?此方法的內容。
///?
private?void?InitializeComponent()
{????
}
#endregion
protected?void?Btn_enter_Click(object?sender?System.EventArgs?e)
{
????????????sms.user?User?=?new?sms.user();
????????????bool?isOk?=?User.Login(Tbx_userid.Text.Trim()?Tbx_userpwd.Text.Trim());
if(isOk)
{
????????????????string?strconn?=?System.Configuration.ConfigurationManager.AppSettings[“conn“];
????????????????OleDbConnection??cn?=?new?OleDbConnection(strconn);
????????????????cn.Open();
????????????????string?strsql?=?“select?*?from?users?where?User_id=‘“?+?Tbx_userid.Text?+?“‘and?User_password=‘“?+?Tbx_userpwd.Text?+?“‘“;
????????????????OleDbCommand???cm?=?new?OleDbCommand(strsql?cn);
????????????????OleDbDataReader?dr?=?cm.ExecuteReader();
????????????????if?(dr.Read())
????????????????{
????????????????????Session[“User_id“]?=?dr[“User_id“];
????????????????????Session[“User_power“]?=?dr[“User_power“];
????????????????}
if((int)Session[“User_power“]==0)
{
Response.Redirect(“~/studentquery/query.aspx“);
}
else?if((int)Session[“User_power“]==1)?
?????????????????????{
?????Response.Redirect(“~/studentmanage/student.aspx“);
?????}
?????????????????????else
?????????????????????{
?????????????????????????Response.Redirect(“~/teacherquery/tquery.aspx“);
?????????????????????}
????????????????cn.Close();
}
else
{
Lbl_note.Text=“對不起,登陸失敗!“;
????}
???????????
}
????????protected?void?Tbx_userid_TextChanged(object?sender?EventArgs?e)
????????{
????????}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????711??2006-07-22?22:56??chp06\Databa
?????文件????????693??2006-07-22?22:53??chp06\Databa
?????文件????????753??2006-07-04?22:49??chp06\Databa
?????文件????????703??2006-07-04?22:50??chp06\Databa
?????文件????????588??2006-07-04?22:48??chp06\Databa
?????文件????????590??2006-07-04?22:51??chp06\Databa
?????文件????????668??2006-07-22?23:03??chp06\Databa
?????文件????2264576??2006-07-31?11:08??chp06\Databa
?????文件???????1647??2006-09-28?21:21??chp06\TMS\Default.aspx
?????文件???????2495??2006-07-28?12:51??chp06\TMS\Default.aspx.cs
?????文件????????723??2006-09-06?15:24??chp06\TMS\TMS.sln
????..A..H.?????33792??2006-09-06?15:24??chp06\TMS\TMS.suo
?????文件???????2903??2006-09-06?15:20??chp06\TMS\web.config
?????文件???????2405??2006-07-21?16:16??chp06\TMS\App_Code\DataAccess.cs
?????文件????????767??2006-07-28?12:39??chp06\TMS\App_Code\studentinfo.cs
?????文件????????755??2006-07-28?12:47??chp06\TMS\App_Code\teacherinfo.cs
?????文件???????1634??2006-07-21?16:16??chp06\TMS\App_Code\user.cs
?????文件???????3180??2006-07-13?21:40??chp06\TMS\studentmanage\addclass.aspx
?????文件???????2370??2006-09-28?16:01??chp06\TMS\studentmanage\addclass.aspx.cs
?????文件???????3439??2006-07-23?23:40??chp06\TMS\studentmanage\addcourse.aspx
?????文件???????2348??2006-07-23?15:38??chp06\TMS\studentmanage\addcourse.aspx.cs
?????文件???????2699??2006-07-24?10:59??chp06\TMS\studentmanage\addgrade.aspx
?????文件???????2899??2006-07-24?11:03??chp06\TMS\studentmanage\addgrade.aspx.cs
?????文件???????5422??2006-07-02?06:11??chp06\TMS\studentmanage\addstudent.aspx
?????文件???????3410??2006-09-28?15:26??chp06\TMS\studentmanage\addstudent.aspx.cs
?????文件???????2948??2006-07-23?21:30??chp06\TMS\studentmanage\addteacher.aspx
?????文件???????2642??2006-07-28?12:56??chp06\TMS\studentmanage\addteacher.aspx.cs
?????文件???????3533??2006-07-24?20:37??chp06\TMS\studentmanage\assigncourse.aspx
?????文件???????2923??2006-07-24?20:47??chp06\TMS\studentmanage\assigncourse.aspx.cs
?????文件???????3767??2006-09-28?16:02??chp06\TMS\studentmanage\classes.aspx
............此處省略44個文件信息
評論
共有 條評論