資源簡介
用c#和sqlserver編寫的學生信息管理系統

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
namespace?student
{
????public?partial?class?學生信息管理系統?:?Form
????{
????????public?學生信息管理系統()
????????{
????????????InitializeComponent();
????????}
????????private?void?取消_Click(object?sender?EventArgs?e)
????????{
????????????Environment.Exit(0);
????????}
????????private?void?登錄_Click(object?sender?EventArgs?e)
????????{
????????????DataTable?dt?=?SqlHelper.ExecuteDataTable(“select?*?from?user_Info“);
????????????int?choice?=?1;
????????????if?(管理員.Checked)
????????????{
????????????????choice?=?1;
????????????}
????????????else?if?(普通用戶.Checked)
????????????{
????????????????choice?=?0;
????????????}
????????????int?i?=?0;
????????????while?(i?????????????{
????????????????DataRow?row?=?dt.Rows[i];
????????????????string?name?=?Convert.ToString(row[“User_name“]);
????????????????string?password?=?Convert.ToString(row[“User_password“]);
????????????????int?type?=?Convert.ToInt32(row[“User_type“]);
????????????????if?((choice?==?type)?&&?(t_name.Text?==?name)?&&?(t_password.Text?==?password))
????????????????{
?????????????????//???MessageBox.Show(“歡迎進入系統“);
????????????????????SqlHelper.UserName=name;
????????????????????SqlHelper.PassWord?=?password;
????????????????????SqlHelper.UserType=choice;
????????????????????this.Hide();
????????????????????
????????????????????學生管理系統?stumagsys?=?new?學生管理系統();
????????????????????stumagsys.Show();
????????????????????break;
????????????????}
????????????????else
????????????????????i++;
????????????}
????????????if?(i?==?dt.Rows.Count)
????????????{
????????????????MessageBox.Show(“用戶名或密碼錯誤!“);
????????????}
????????}
????????private?void?t_password_KeyDown(object?sender?KeyEventArgs?e)
????????{
????????????if?(e.KeyCode?==?Keys.Enter)?登錄_Click(sender?e);
????????}
????????//判斷當鍵盤按下時候-
??
????????
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-04-25?20:51??student\
?????目錄???????????0??2012-04-25?20:51??student\student\
?????文件?????????863??2012-04-06?16:01??student\student.sln
?????文件???????25600??2012-04-14?17:58??student\student.suo
?????目錄???????????0??2012-04-25?20:51??student\student\bin\
?????目錄???????????0??2012-04-25?20:51??student\student\bin\Debug\
?????文件??????247296??2012-04-14?17:54??student\student\bin\Debug\student.exe
?????文件?????2359296??2012-04-13?19:34??student\student\bin\Debug\student.mdf
?????文件??????140800??2012-04-14?17:54??student\student\bin\Debug\student.pdb
?????文件???????11600??2012-04-14?17:56??student\student\bin\Debug\student.vshost.exe
?????文件?????????490??2010-03-17?22:39??student\student\bin\Debug\student.vshost.exe.manifest
?????文件??????589824??2012-04-13?19:34??student\student\bin\Debug\student_log.ldf
?????文件????????2199??2012-04-13?19:25??student\student\Form1.cs
?????文件????????7416??2012-04-13?19:25??student\student\Form1.Designer.cs
?????文件???????28121??2012-04-13?19:25??student\student\Form1.resx
?????目錄???????????0??2012-04-25?20:51??student\student\obj\
?????目錄???????????0??2012-04-25?20:51??student\student\obj\x86\
?????目錄???????????0??2012-04-25?20:51??student\student\obj\x86\Debug\
?????文件????????4440??2012-04-06?17:57??student\student\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件????????6275??2012-04-14?17:54??student\student\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????1028??2012-04-13?19:31??student\student\obj\x86\Debug\GenerateResource.read.1.tlog
?????文件????????7956??2012-04-13?19:31??student\student\obj\x86\Debug\GenerateResource.write.1.tlog
?????文件????????7897??2012-04-06?17:58??student\student\obj\x86\Debug\ResolveAssemblyReference.cache
?????文件????????1179??2012-04-14?17:56??student\student\obj\x86\Debug\student.csproj.FileListAbsolute.txt
?????文件??????247296??2012-04-14?17:54??student\student\obj\x86\Debug\student.exe
?????文件??????140800??2012-04-14?17:54??student\student\obj\x86\Debug\student.pdb
?????文件?????????180??2012-04-09?12:17??student\student\obj\x86\Debug\student.Properties.Resources.resources
?????文件?????????180??2012-04-13?16:33??student\student\obj\x86\Debug\student.學生信息管理.resources
?????文件???????15037??2012-04-13?19:31??student\student\obj\x86\Debug\student.學生信息管理系統.resources
?????文件???????45821??2012-04-09?22:21??student\student\obj\x86\Debug\student.學生管理系統.resources
?????文件?????????180??2012-04-13?10:29??student\student\obj\x86\Debug\student.成績信息管理.resources
............此處省略34個文件信息
評論
共有 條評論