資源簡介
學生信息管理系統源代碼 內含C#編寫源代碼

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.OleDb;
namespace?學生信息管理系統
{
????public?partial?class?AddClass?:?Form
????{
????????public?AddClass()
????????{
????????????InitializeComponent();
????????}
????????OleDbConnection?connection1?=?new?OleDbConnection(“Provider=Microsoft.Jet.OLEDB.4.0;“?+?“Data?Source=C:\\db1.mdb“);
????????private?void?AddClass_Load(object?sender?EventArgs?e)
????????{
????????????//connection1.Open();
????????????string?sql?=?“select?specialtyidspecialtyname?from?specialtyinfo“;
????????????OleDbDataAdapter?adp?=?new?OleDbDataAdapter(sql?connection1);
????????????DataSet?ds?=?new?DataSet();
????????????adp.Fill(ds?“specialtyinfo“);
????????????comboBox1.DataSource?=?ds.Tables[“specialtyinfo“].DefaultView;
????????????comboBox1.DisplayMember?=?“specialtyname“;
????????????comboBox1.ValueMember?=?“specialtyid“;
????????}
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????if?(textBox1.Text.Trim()?==?““?||?textBox2.Text.Trim()?==?““?||?textBox3.Text.Trim()?==?““)
????????????????MessageBox.Show(“請輸入完整的專業信息“?“提示“);
????????????else?if?(numericUpDown1.Value.ToString()?==?““)
????????????????MessageBox.Show(“年制應為數字或可接受的范圍“?“提示“);
????????????else
????????????{
????????????????connection1.Open();
????????????????OleDbCommand?cmd?=?new?OleDbCommand(“select?*?from?classinfo?where?classname=‘“?+?textBox1.Text.Trim()?+?“‘“?connection1);
????????????????if?(null?!=?cmd.ExecuteScalar())
????????????????????MessageBox.Show(“專業名稱發生重復“?“提示“);
????????????????else
????????????????{
????????????????????string?sql?sql1?sql2;
????????????????????sql1?=?“insert?into?classinfo?(classnamespecialtynameclassnumberlengthteacherenrolmenttime“;
????????????????????sql2?=?“values(‘“?+?textBox1.Text.ToString()?+?“‘‘“?+?comboBox1.Text.ToString()?+?“‘‘“?+?textBox3.Text.ToString()?+?“‘“?+?numericUpDown1.Value.ToString()?+?“‘“?+?textBox2.Text.ToString()?+?“‘‘“?+?dateTimePicker1.Text?+?“‘“;
????????????????????if?(richTextBox1.Text?!=?““)
????????????????????{
????????????????????????sql1?=?sql1?+?“remark“;
????????????????????????sql2?=?sql2?+?“‘“?+?richTextBox1.Text.ToString()?+?“‘“;
????????????????????}
????????????????????sql?=?sql1?+?“)?“?+?sql2?+?“)?“;
????????????????????cmd.CommandText?=?sql;
????????????????????cmd.ExecuteNonQuery();
????????????????????MessageBox.Show(“班級信息添加成功“?“提示“);
????????????????}
????????????????connection1.Close();
????????????}
????????}
????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????this.Close();
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2908??2007-05-22?10:39??學生信息管理系統2\學生信息管理系統\AddClass.cs
?????文件???????6714??2007-05-29?13:37??學生信息管理系統2\學生信息管理系統\BrowseCourse.Designer.cs
?????文件??????20614??2007-05-29?13:37??學生信息管理系統2\學生信息管理系統\BrowseCourse.resx
?????文件??????20614??2007-05-29?14:22??學生信息管理系統2\學生信息管理系統\AddScore.resx
?????文件???????2275??2007-05-28?12:02??學生信息管理系統2\學生信息管理系統\ModifyCourse.cs
?????文件???????7770??2007-05-28?12:00??學生信息管理系統2\學生信息管理系統\ModifyCourse.Designer.cs
?????文件??????20614??2007-05-28?12:00??學生信息管理系統2\學生信息管理系統\ModifyCourse.resx
?????文件??????15092??2007-05-29?14:22??學生信息管理系統2\學生信息管理系統\AddScore.Designer.cs
?????文件??????11938??2007-05-29?16:53??學生信息管理系統2\學生信息管理系統\BrowseScore.Designer.cs
?????文件???????9628??2007-05-29?16:54??學生信息管理系統2\學生信息管理系統\BrowseScore.cs
?????文件???????2608??2007-05-31?10:26??學生信息管理系統2\學生信息管理系統\AddUser.cs
?????文件??????20614??2007-05-29?16:53??學生信息管理系統2\學生信息管理系統\BrowseScore.resx
?????文件???????1329??2007-06-07?14:08??學生信息管理系統2\學生信息管理系統\ModifyScore.cs
?????文件???????4605??2007-06-07?14:08??學生信息管理系統2\學生信息管理系統\ModifyScore.Designer.cs
?????文件??????20614??2007-06-07?14:08??學生信息管理系統2\學生信息管理系統\ModifyScore.resx
?????文件???????3228??2007-05-30?16:23??學生信息管理系統2\學生信息管理系統\ScoreQuery.cs
?????文件???????9609??2007-05-29?17:52??學生信息管理系統2\學生信息管理系統\ScoreQuery.Designer.cs
?????文件??????20614??2007-05-29?17:52??學生信息管理系統2\學生信息管理系統\ScoreQuery.resx
?????文件???????9379??2007-05-30?16:20??學生信息管理系統2\學生信息管理系統\ClassScoreQuery.Designer.cs
?????文件??????20614??2007-05-30?16:20??學生信息管理系統2\學生信息管理系統\ClassScoreQuery.resx
?????文件???????2242??2007-05-31?11:49??學生信息管理系統2\學生信息管理系統\CreateRole.cs
?????文件???????9425??2007-05-30?18:21??學生信息管理系統2\學生信息管理系統\CreateRole.Designer.cs
?????文件??????20614??2007-05-30?18:21??學生信息管理系統2\學生信息管理系統\CreateRole.resx
?????文件??????20614??2007-05-30?18:43??學生信息管理系統2\學生信息管理系統\AddUser.resx
?????文件???????7244??2007-05-30?18:43??學生信息管理系統2\學生信息管理系統\AddUser.Designer.cs
?????文件???????5362??2007-06-07?09:27??學生信息管理系統2\學生信息管理系統\AddStudent.cs
?????文件???????4876??2007-06-07?09:29??學生信息管理系統2\學生信息管理系統\ModifyStudent.cs
?????文件??????16559??2007-06-06?17:05??學生信息管理系統2\學生信息管理系統\ModifyStudent.Designer.cs
?????文件??????20614??2007-06-06?17:05??學生信息管理系統2\學生信息管理系統\ModifyStudent.resx
?????文件???????3202??2007-06-07?14:40??學生信息管理系統2\學生信息管理系統\ClassScoreQuery.cs
............此處省略87個文件信息
- 上一篇:C# socket通信的服務器和客戶端
- 下一篇:c#實戰:利用c#開掃雷游戲代碼
評論
共有 條評論