这是大二自己C#的设计,都是原创,请多多指教。
摘自部分代码
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.OleDb; namespace WindowsFormsApplication1 { public partial class 进货 : Form { private OleDbConnection oleConnection1; private DataSet sp; string myConStr = "Provider=Microsoft.ACE.OLEDB.12.0;DataSource=食品数据库.accdb"; public 进货() { InitializeComponent(); oleConnection1 = new OleDbConnection(myConStr); }
private void Form3_Load(object sender, EventArgs e) { oleConnection1.Open(); string sql = "select * from 食品数据库"; OleDbDataAdapter adp = new OleDbDataAdapter(sql, oleConnection1); sp = new DataSet(); sp.Clear(); adp.Fill(sp, "sp"); dataGridView1.DataSource =sp.Tables[0]; oleConnection1.Close(); }
全部资料51hei下载地址:
某食品企业进销货管理系统.7z
(9.83 MB, 下载次数: 38)
|