資源簡介
c#編寫的winform應用程序,里面包括了界面,后臺代碼和數據庫文件,本人測試過,各種功能全部齊全。并且還包括了學生管理系統的需求說明書,是學習軟件項目開發的經典例子

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Data;
using?System.Data.OleDb;
using?System.IO;
using?System.Windows.Forms;
namespace?StudentManagerSys
{
????class?Classinfo
????{
???????public?String?strCon;
???????public?OleDbConnection?conn;
???????public?OleDbCommand?cmd;
????????public?Classinfo()
????????{
????????????strCon?=?“?Provider?=?Microsoft.Jet.OLEDB.4.0?;?Data?Source?=“?+?System.Windows.Forms.Application.StartupPath?+?@“\student.mdb“;
????????????conn?=?new?OleDbConnection(strCon);
????????????cmd?=?new?OleDbCommand();
????????}
????????public?void?insert(string?classno?string?classdepart?string?special?string?studyyears?string?entertime)
????????{
????????????cmd.CommandText?=?“insert?into?classinfo?values(“?+?“‘“?+?classno?+?“‘‘“?+?classdepart?+?“‘‘“?+?special?+?“‘‘“?+?studyyears?+?“‘‘“?+?entertime?+?“‘)“;
????????????cmd.Connection?=?conn;
????????????try
????????????{
????????????????conn.Open();
????????????????cmd.ExecuteNonQuery();
????????????????MessageBox.Show(“添加成功“);
????????????}
????????????catch
????????????{
????????????????MessageBox.Show(“添加失敗!“);
????????????}
????????}
????????public?void?delete(string?classno)
????????{
????????????cmd.CommandText?=?“delete?*?from?classinfo?where?classno=“?+?“‘“?+?classno?+?“‘“;
????????????cmd.Connection?=?conn;
????????????try
????????????{
????????????????conn.Open();
????????????????cmd.ExecuteNonQuery();
????????????????MessageBox.Show(“刪除成功!“);
????????????????conn.Close();
????????????}
????????????catch
????????????{
????????????????conn.Close();
????????????????MessageBox.Show(“刪除失敗!“);
????????????}
????????}
????????public?DataSet?select(string?selectypestring?item)
????????{
????????????try
????????????{
????????????????cmd.CommandText?=?“select?*?from?classinfo?where?“?+?selectype?+?“=“?+?“‘“?+?item?+?“‘“;
????????????????cmd.Connection?=?conn;
????????????????OleDbDataAdapter?dr?=?new?OleDbDataAdapter(cmd.CommandText?conn.ConnectionString);
????????????????DataSet?ds?=?new?DataSet();
????????????????dr.Fill(ds?“infom“);
????????????????conn.Close();
????????????????return?ds;
????????????}
????????????catch
????????????{
????????????????conn.Close();
????????????????MessageBox.Show(“查詢失敗!“);
????????????}
????????????return?null;
????????}
????????public?DataSet?selectAll()
????????{
????????????try
????????????{
????????????????cmd.CommandText?=?“select?*?from?classinfo?“;
????????????????cmd.Connection?=?conn;
????????????????OleDbDataAdapter?dr?=?new?OleDbDataAdapter(cmd.CommandText?conn.ConnectionString);
????????????????DataSet?ds?=?new?DataSet();
????????????????dr.Fill(ds?“infom“);
????????????????conn.Close();
????????????????return?ds;
????????????}
????????????catch
????????????{
????????????????conn.Close();
????????????????MessageBox.Show(“查詢失敗!“);
????????????}
????????????return?null;
????????}
??????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????364544??2009-04-22?21:31??StudentManagerSys\StudentManagerSys\bin\Debug\student.mdb
?????文件??????65536??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\bin\Debug\StudentManagerSys.exe
?????文件??????89600??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\bin\Debug\StudentManagerSys.pdb
?????文件???????5632??2005-12-08?14:51??StudentManagerSys\StudentManagerSys\bin\Debug\StudentManagerSys.vshost.exe
?????文件???????3731??2008-12-02?19:00??StudentManagerSys\StudentManagerSys\Classinfo.cs
?????文件???????4502??2008-12-05?22:50??StudentManagerSys\StudentManagerSys\Course.cs
?????文件???????6086??2008-12-05?20:23??StudentManagerSys\StudentManagerSys\DeleteForm.cs
?????文件??????11803??2008-12-05?20:18??StudentManagerSys\StudentManagerSys\DeleteForm.Designer.cs
?????文件???????5814??2008-12-05?20:17??StudentManagerSys\StudentManagerSys\DeleteForm.resx
?????文件???????5366??2008-12-06?17:09??StudentManagerSys\StudentManagerSys\Form1.cs
?????文件???????8899??2008-12-06?14:40??StudentManagerSys\StudentManagerSys\Form1.Designer.cs
?????文件???????6012??2008-12-06?14:40??StudentManagerSys\StudentManagerSys\Form1.resx
?????文件???????4384??2008-12-04?16:57??StudentManagerSys\StudentManagerSys\InsertFrom.cs
?????文件??????30822??2008-12-03?10:28??StudentManagerSys\StudentManagerSys\InsertFrom.Designer.cs
?????文件???????5814??2008-12-03?10:28??StudentManagerSys\StudentManagerSys\InsertFrom.resx
?????文件???????7411??2008-12-05?20:27??StudentManagerSys\StudentManagerSys\ModifyForm.cs
?????文件??????15413??2008-12-05?16:40??StudentManagerSys\StudentManagerSys\ModifyForm.Designer.cs
?????文件???????5814??2008-12-05?16:40??StudentManagerSys\StudentManagerSys\ModifyForm.resx
?????文件???????1094??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\obj\Debug\StudentManagerSys.csproj.GenerateResource.Cache
?????文件????????180??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\obj\Debug\StudentManagerSys.DeleteForm.resources
?????文件??????65536??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\obj\Debug\StudentManagerSys.exe
?????文件????????180??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\obj\Debug\StudentManagerSys.Form1.resources
?????文件????????180??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\obj\Debug\StudentManagerSys.InsertFrom.resources
?????文件????????180??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\obj\Debug\StudentManagerSys.ModifyForm.resources
?????文件??????89600??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\obj\Debug\StudentManagerSys.pdb
?????文件????????180??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\obj\Debug\StudentManagerSys.Properties.Resources.resources
?????文件????????180??2008-12-06?17:10??StudentManagerSys\StudentManagerSys\obj\Debug\StudentManagerSys.SearchForm.resources
?????文件???????4608??2009-04-22?21:24??StudentManagerSys\StudentManagerSys\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件????????538??2009-04-22?21:31??StudentManagerSys\StudentManagerSys\obj\StudentManagerSys.csproj.FileList.txt
?????文件????????476??2008-12-03?20:59??StudentManagerSys\StudentManagerSys\Program.cs
............此處省略26個文件信息
- 上一篇:C#實現USB設備通信
- 下一篇:c# rgb565 轉 rgb24
評論
共有 條評論