资源简介
用Csharp实现的学生管理系统,里面的txt文件有详细说明!请仔细阅读!很老的系统了,我建议还是去找其他php版本的,这个就是用来交作业的
代码片段和文件信息
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;
using System.Data.OleDb;
namespace WindowsFormsApplication1
{
public partial class add : Form
{
public add()
{
InitializeComponent();
}
private void button2_Click(object sender EventArgs e)
{
this.textBox1.Text = ““;
this.textBox2.Text = ““;
this.textBox3.Text = ““;
this.textBox4.Text = ““;
this.comboBox1.Text = ““;
}
private void add_Load(object sender EventArgs e)
{
}
private void add_FormClosed(object sender FormClosedEventArgs e)
{
}
private void button1_Click(object sender EventArgs e)
{
if (this.textBox1.Text == ““ || this.textBox2.Text == ““ || this.textBox3.Text == ““ || this.textBox4.Text == ““ ||
this.comboBox1.Text == ““)
{
MessageBox.Show(“修改数据记录信息不完整,重新输入!“ “信息提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
}
else
{
try
{
string str = “Persist Security Info=False;Provider=Microsoft.ACE.OLEDB.12.0;Data Source=..\\Chen.accdb“;
string cmd = “insert into student values (‘“ + this.textBox1.Text + “‘‘“ + this.textBox2.Text + “‘‘“ + comboBox1.Text + “‘‘“
+ this.textBox3.Text + “‘‘“ + this.textBox4.Text + “‘)“;
string cmd1 = “insert into simpleStu values (‘“ + this.textBox1.Text + “‘‘“ + this.textBox1.Text + “‘)“;
using (OleDbConnection con = new OleDbConnection(str))
{
con.Open();
OleDbCommand commond = new OleDbCommand(cmd con);
OleDbCommand commond1 = new OleDbCommand(cmd1 con);
int i = commond.ExecuteNonQuery();
int i1 = commond1.ExecuteNonQuery();
if (i != 0 && i1 != 0)
{
MessageBox.Show(“数据成功插入数据库.“);
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3145728 2011-06-03 19:59 WindowsFormsApplication1\Chen.mdf
文件 1048576 2011-06-03 19:59 WindowsFormsApplication1\Chen_log.ldf
文件 2637 2011-07-18 15:10 WindowsFormsApplication1\WindowsFormsApplication1\add.cs
文件 7894 2011-06-02 18:51 WindowsFormsApplication1\WindowsFormsApplication1\add.Designer.cs
文件 5817 2011-06-02 18:51 WindowsFormsApplication1\WindowsFormsApplication1\add.resx
文件 4244 2011-07-19 13:58 WindowsFormsApplication1\WindowsFormsApplication1\addClass.cs
文件 15874 2011-07-19 13:57 WindowsFormsApplication1\WindowsFormsApplication1\addClass.Designer.cs
文件 9398 2011-07-19 13:57 WindowsFormsApplication1\WindowsFormsApplication1\addClass.resx
文件 675840 2011-07-19 16:23 WindowsFormsApplication1\WindowsFormsApplication1\bin\Chen.accdb
文件 64000 2011-07-19 15:57 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 124416 2011-07-19 15:57 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 11600 2011-07-19 16:22 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2010-03-17 22:39 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 2813 2011-07-15 15:31 WindowsFormsApplication1\WindowsFormsApplication1\classSelcted.cs
文件 13008 2011-06-03 19:43 WindowsFormsApplication1\WindowsFormsApplication1\classSelcted.Designer.cs
文件 11397 2011-07-18 13:50 WindowsFormsApplication1\WindowsFormsApplication1\classSelcted.resx
文件 2876 2011-07-18 14:43 WindowsFormsApplication1\WindowsFormsApplication1\del.cs
文件 3212 2011-06-02 09:03 WindowsFormsApplication1\WindowsFormsApplication1\del.Designer.cs
文件 5817 2011-06-02 09:03 WindowsFormsApplication1\WindowsFormsApplication1\del.resx
文件 2261 2011-07-18 16:03 WindowsFormsApplication1\WindowsFormsApplication1\existStu.cs
文件 10770 2011-07-18 16:03 WindowsFormsApplication1\WindowsFormsApplication1\existStu.Designer.cs
文件 9493 2011-07-18 16:03 WindowsFormsApplication1\WindowsFormsApplication1\existStu.resx
文件 2789 2011-07-19 14:21 WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
文件 10914 2011-07-19 14:21 WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
文件 6015 2011-07-19 14:21 WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
文件 2415 2011-07-19 14:43 WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs
文件 8908 2011-07-19 14:43 WindowsFormsApplication1\WindowsFormsApplication1\Form2.Designer.cs
文件 6015 2011-07-19 14:43 WindowsFormsApplication1\WindowsFormsApplication1\Form2.resx
文件 3961 2011-07-19 15:43 WindowsFormsApplication1\WindowsFormsApplication1\login.cs
文件 9200 2011-07-17 18:23 WindowsFormsApplication1\WindowsFormsApplication1\login.Designer.cs
............此处省略59个文件信息
评论
共有 条评论