11信计2013-2014(一)《数据库原理及应用》课程设计设计题目仓储物资管理系统徐州工程学院数学与物理科学学院目录1 可行性研究 (3)2 需求分析 (3)2.1任务概述 (3)2.1.1 目标 (3)2.1.2 运行环境 (3)2.2数据需求 (3)2.2.1 数据流条目 (3)2.2.2 数据库描述 (4)2.3 功能需求 (4)2.3.1 功能划分 (4)2.3.2 功能描述 (4)3 概要设计 (4)4 逻辑设计 (5)5 界面设计和代码 (7)5.1登陆界面设计 (7)5.2注册界面与代码 (9)5.3修改密码 (10)5.4系统主界面设计和代码 (11)5.5查询信息管理界面设计 (13)5.6添加信息查询界面设计 (14)5.7出入库信息表设计 (17)5.8删改信息设计 (23)6总结 (25)参考文献 (25)1 可行性研究仓库管理系统是为了实现企业产品管理的系统化、规范化和自动化,从而提高企业管理效率而设计的。
它完全取代了原来一直用人工管理的工作方式,避免了由于管理人员的工作疏忽以及管理质量问题所造成的各种错误,为及时、准确、高效的完成仓库管理提供了强有力的工具和管理手段。
仓库管理系统是一个中小型数据库管理系统,它界面美观、操作简单、安全性高,基本满足了仓库管理的要求。
本系统的开发语言采用的是C#,开发环境采用的是Visual studio 2008,数据库采用SQL Server 2005,具有一般系统的数据功能,如数据查询,修改和删除等。
仓库管理系统在运行阶段,效果好,数据准确性高,提高了工作效率,同时也实现了仓库管理计算机化。
2 需求分析2.1任务概述经过调查,对仓库管理的业务流程进行分析。
库存的变化通常是通过入库、出库操作来进行。
系统对每个入库操作均要求用户填写入库单,对每个出库操作均要求用户填写出库单。
在出入库操作同时可以进行增加、删除和修改等操作。
用户可以随时进行各种查询、统计、报表打印、账目核对等工作。
另外,也可以用图表形式来反映查询结果。
2.1.1 目标(1)界面设计要求尽量友好、美观,应提供登录界面,并考虑用户权限问题;(2)对各种信息应提供录入、修改、删除和查询功能;(3)具有对商品的基本信息和流动信息进行统计的功能;(4)具有数据备份与恢复、帮助等功能;(5)能够新增、修改和删除用户信息;2.1.2 运行环境Windows 98/2000/XP/2003操作系统下,安装并配置软件Microsoft SQL Server 2000数据库管理系统。
2.2数据需求2.2.1 数据流条目根据我们的进行的调查和分析,系统中各种功能所需的数据项和数据结构如下:①商品信息:商品编号,商品名,商品单价;②职工信息:职工号,职工姓名,性别,电话,住址;③供货商信息:供应商姓名,地址,电话,单位等;④入库信息:入库编号,商品编号,商品名称,单价,数量,总价,供应商;⑧出库信息:出库编号,商品编号,商品名称,单价,数量,总价,经手人;2.2.2 数据库描述使用SQL SERVER2000作为后台数据库,就可以行使基于网络连接的用户认证。
从而给不同的子系统分配不同的数据库使用角色,让他们彼此之间使用的数据库隔离开来,以达到较高的安全性。
2.3 功能需求根据对各大超市进行的调查和分析,仓库管理系统应该具有以下功能:①仓库中的货物信息的录入、修改、删除和查询。
②仓库的信息的的录入、修改、删除、查询和统计。
③管理者的信息的录入、修改、删除和查询。
④供货商的信息的录入、修改、删除、查询和统计。
⑤货物流动信息的录入、修改、删除和查询。
2.3.1 功能划分仓库管理系统主要实现以下四方面的功能:A. 登陆b. 注册c. 查询d. 修改2.3.2 功能描述仓库管理包括登陆、注册、查询、修改四方面功能。
登陆,分为普通管理员登陆和超级管理员登陆。
查询,分为员工查询,仓库查询和物品查询。
修改,主要实现添加,修改和删除。
3 概要设计对系统功能分析中的各项功能进行集中、分块,按照结构化程序设计的要求,得到如下图所示的系统功能模块图。
4 逻辑设计根据数据库需求分析,本系统的数据库逻辑结构设计如下。
①商品信息设计②入库单信息设计员工查询仓库查询商品查询注册仓库管理系统登录普通管理员 超级管理员查询修改添加修改删除③出库单信息设计④职工信息设计⑤仓库信息设计⑥供货商信息表5 界面设计和代码5.1登陆界面设计public partial class Fmlogin:Form{ public Fmlogin(){ InitializeComponent(); }private voidBUT_Y_Click(object sender,EventArgs e){ string username = tbuser.Text;string password = tbpw.Text;string connstring = @"Data Source=.zhaojuan-PC\SQLEXPRESS;AttachDbFilename=F:\仓库管理系统\仓库管理系统\WMS_DB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";SqlConnection conn = new SqlConnection(connstring);//获取用户名和密码匹配的行的数量的sql语句string sql = string.Format("select count(*) from [usertable] where username='{0}'and password='{1}'", username, password);try{ if(comboBox1.Text == "超级管理员"&&tbuser.Text=="admin"){conn.Open();SqlCommand comm = new SqlCommand(sql, conn);int num = (int)comm.ExecuteScalar();if (num > 0){ this.Hide();Fmmenu f1 = new Fmmenu();f1.ShowDialog(); }else{ MessageBox.Show("用户名或密码或身份错误,请重新输入!","登录失败", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }else if (comboBox1.Text =="普通管理员"){ conn.Open();SqlCommand comm = new SqlCommand(sql, conn);int num = (int)comm.ExecuteScalar();if (num > 0){ this.Hide();Fmmenu f1 = new Fmmenu();f1.删改信息ToolStripMenuItem.Enabled = false;f1.ShowDialog(); }else{MessageBox.Show("用户名或密码或身份错误,请重新输入!","登录失败", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);} }else{MessageBox.Show("用户名或密码或身份错误,请重新输入!","登录失败", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }catch (Exception eee){ MessageBox.Show(eee.Message, "数据库操作错误!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); }finally{conn.Close(); } }private void BUT_z_Click(object sender, EventArgs e){ Fmregister f2 = new Fmregister(); f2.ShowDialog();} }5.2注册界面与代码private voidbutton1_Click(object sender,EventArgs e){if(tbpw.Text ==tB2_repw.Text){ string connstring =@"DataSource=.zhaojuan-PC\SQLEXPRESS;AttachDbFilename=F:\仓库管理系统\仓库管理系统\WMS_DB.mdf;IntegratedSecurity=True;ConnectTimeout=30;User Instance=True";SqlConnection conn = new SqlConnection(connstring); ;try{conn.Open();SqlCommand comm = new SqlCommand("register", conn);mandType = CommandType.StoredProcedure;comm.Parameters.AddWithValue("@username", tbuser.Text.Trim()); comm.Parameters.AddWithValue("@password", tbpw.Text.Trim());comm.Parameters.AddWithValue("@workerID", tB_worker.Text.Trim());int count = comm.ExecuteNonQuery();//执行命令,返回的行数if (count > 0) {MessageBox.Show("注册成功!可以登录!", "成功", MessageBoxButtons.OK, rmation); }else{ MessageBox.Show("注册失败!","错误!",MessageBoxButtons.OK,rmation);} }catch(Exception ){ MessageBox.Show("操作数据失败!可能用户名重复或您不是本公司职员!", "错误!", MessageBoxButtons.OK, rmation); }finally{conn.Close();}}elseMessageBox.Show("注册失败!重复密码错误!", "错误!", MessageBoxButtons.OK, rmation); }private void but_return_Click(object sender, EventArgs e){ this.Close();}5.3修改密码private void but_Y_Click(object sender, EventArgs e){ if(tBsure.Text ==tBNpass.Text){ string connstring =@"DataSource=zhaojuan-PC\SQLEXPRESS;AttachDbFilename=D:\仓库管理系统\仓库管理系统\WMS_DB.mdf;IntegratedSecurity=True";SqlConnection conn = newSqlConnection(connstring);try{ conn.Open();SqlCommand comm = newSqlCommand("updatepass", conn);mandType=CommandType.StoredProcedure;comm.Parameters.AddWithValue("@username", tBuser.Text);comm.Parameters.AddWithValue("@password", tBpass.Text);comm.Parameters.AddWithValue("@newpass", tBNpass.Text);int count = comm.ExecuteNonQuery();if (count > 0){MessageBox.Show("修改密码成功");tBuser.Text = ""; tBpass.Text = ""; tBNpass.Text = "";tBsure.Text = ""; tBuser.Focus(); }else{MessageBox.Show("数据库操作失败", "修改密码失败", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}}catch{ MessageBox.Show("操作数据失败!", "错误!", MessageBoxButtons.OK, rmation); }finally{ conn.Close();} }else{ MessageBox.Show("确认密码与新密码不符", "修改密码失败", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);tBuser.Text = ""; tBpass.Text = ""; tBNpass.Text = ""; tBsure.Text = ""; tBuser.Focus(); } }private void button1_Click(object sender, EventArgs e){this.Close();}5.4系统主界面设计和代码public partial class Fmmenu:Form{public Fmmenu(){ InitializeComponent();}private void职员ToolStripMenuItem_Click(objectsender, EventArgs e){ putinto_w w = newputinto_w();w.ShowDialog(); }private void查询所有ToolStripMenuItem_Click(object sender, EventArgs e){ allinformation s = new allinformation();s.ShowDialog(); }private void按仓库ToolStripMenuItem_Click(object sender, EventArgs e) { BY_WHID bw = new BY_WHID();bw.ShowDialog(); }private void供货商ToolStripMenuItem_Click(object sender, EventArgs e){ putinto_sup su = new putinto_sup(); su.ShowDialog(); } private void仓库信息ToolStripMenuItem_Click(object sender, EventArgs e){putinto_WH wh = new putinto_WH(); wh.ShowDialog(); }private void商品信息ToolStripMenuItem_Click(object sender, EventArgs e){ putin_G g = new putin_G();g.ShowDialog(); }private void入库ToolStripMenuItem_Click(object sender, EventArgs e) {putin pi = new putin(); pi.ShowDialog(); }private void出库ToolStripMenuItem_Click(object sender, EventArgs e) {putout po = new putout(); po.ShowDialog(); }private void删改信息ToolStripMenuItem_Click(object sender, EventArgs e){updataANDdelete ud = new updataANDdelete(); ud.ShowDialog();} private void提醒ToolStripMenuItem_Click(object sender, EventArgs e) {remind re = new remind(); re.ShowDialog(); }private void修改密码ToolStripMenuItem_Click(object sender, EventArgs e){ updatapass up = new updatapass(); up.ShowDialog(); } private void关于ToolStripMenuItem_Click(object sender, EventArgs e) { About ab = new About(); ab.ShowDialog(); }private void按供货商ToolStripMenuItem_Click(object sender, EventArgs e){ BY_SUP bs = new BY_SUP(); bs.ShowDialog(); } }5.5查询信息管理界面设计public partial class allinformation : Form{ public allinformation(){InitializeComponent(); }private void allinformation_Load(object sender, EventArgs e){ this.view_putoutTableAdapter.Fill(this.wMS_DBDataSet4.View_putout); this.view_putinTableAdapter.Fill(this.wMS_DBDataSet3.view_putin);this.supplierTableAdapter.Fill(this.wMS_DBDataSet2.Supplier);this.workerTableAdapter.Fill(this.wMS_DBDataSet1.Worker);this.gOODSTableAdapter.Fill(this.wMS_DBDataSet.GOODS);} private void fillByToolStripButton_Click(object sender, EventArgs e) { try{this.gOODSTableAdapter.FillBy(this.wMS_DBDataSet.GOODS); }catch (System.Exception ex){ System.Windows.Forms.MessageBox.Show(ex.Message);}try{ this.workerTableAdapter.FillBy1(this.wMS_DBDataSet1.Worker);}catch (System.Exception ex){ System.Windows.Forms.MessageBox.Show(ex.Message); } try{ this.view_putoutTableAdapter.FillBy(this.wMS_DBDataSet4.View_putout ); }catch (System.Exception ex){ System.Windows.Forms.MessageBox.Show(ex.Message); } try{ this.supplierTableAdapter.FillBy(this.wMS_DBDataSet2.Supplier); } catch (System.Exception ex){ System.Windows.Forms.MessageBox.Show(ex.Message); } try{this.view_putinTableAdapter.FillBy(this.wMS_DBDataSet3.view_putin); }catch (System.Exception ex){ System.Windows.Forms.MessageBox.Show(ex.Message); } } }5.6添加信息查询界面设计根据上图可知添加信息分为三类,人员信心,仓库信息,和商品信息,此外,人员信息分为职工类和供货商类,因添加界面和代码,格式大抵相同,所以只展示部分界面,进入添加设计如下:1.添加商品信息public partial class putin_G : Form{ public putin_G(){ InitializeComponent();}private void but_Y_Click(object sender,EventArgs e){string connstring = @"DataSource=.zhaojuan-PC\SQLEXPRESS;AttachDbFilename=F:\仓库管理系统\仓库管理系统\WMS_DB.mdf;IntegratedSecurity=True;Connect Timeout=30;UserInstance=True";SqlConnection conn = new SqlConnection(connstring);try{ conn.Open();SqlCommand comm = new SqlCommand("insertgoods", conn);mandType = CommandType.StoredProcedure;comm.Parameters.AddWithValue("@goods_ID",tB1_G_ID.Text.Trim());comm.Parameters.AddWithValue("@goods_name",tB2_G_name.Text.Trim());comm.Parameters.AddWithValue("@goods_price",tB3_G_price.Text.Trim());comm.Parameters.AddWithValue("@minnum",tB5_G_minnum.Text.Trim());int count = comm.ExecuteNonQuery();//执行命令,返回的行数if (count > 0){MessageBox.Show("添加成功!", "成功", MessageBoxButtons.OK, rmation);}else{MessageBox.Show("添加失败!", "错误!", MessageBoxButtons.OK, rmation);}}catch (Exception){ MessageBox.Show("操作数据失败!可能商品已存在!", "错误!", MessageBoxButtons.OK, rmation);}finally{conn.Close();}}private void button1_Click(object sender, EventArgs e) { this.Close(); } }2录入仓库信息public partial class putinto_WH : Form{public putinto_WH(){ InitializeComponent();}private void but_Y_Click(object sender,EventArgs e){string connstring = @"DataSource=.zhaojuan-PC\SQLEXPRESS;AttachDbFilename=F:\仓库管理系统\仓库管理系统\WMS_DB.mdf;IntegratedSecurity=True;Connect Timeout=30;UserInstance=True";SqlConnection conn = new SqlConnection(connstring);try{conn.Open();SqlCommand comm = new SqlCommand("insertWH", conn);mandType = CommandType.StoredProcedure;comm.Parameters.AddWithValue("@WH_ID",tB1_WH_ID.Text.Trim());comm.Parameters.AddWithValue("@WHname",tB2_WHname.Text.Trim());comm.Parameters.AddWithValue("@workerID",tB3_workerID.Text.Trim());comm.Parameters.AddWithValue("@WHphone",tB4_WHphone.Text.Trim());comm.Parameters.AddWithValue("@address",tB5_address.Text.Trim());int count = comm.ExecuteNonQuery();//执行命令,返回的行数if (count > 0){ MessageBox.Show("添加成功!", "成功", MessageBoxButtons.OK, rmation); }else{ MessageBox.Show("添加失败!", "错误!", MessageBoxButtons.OK, rmation);} }catch (Exception){ MessageBox.Show("操作数据失败!可能仓库已存在!", "错误!", MessageBoxButtons.OK, rmation);}finally{conn.Close(); } }private void button1_Click(object sender, EventArgs e){this.Close(); }}3录入职员信息(代码只展示不同部分Try{ conn.Open();SqlCommand comm = newSqlCommand("insertworker", conn);mandType=CommandType.StoredProcedurecomm.Parameters.AddWithValue("@workerID",tB1_ID.Text.Trim());comm.Parameters.AddWithValue("@workerName",tB2_name.Text.Trim());comm.Parameters.AddWithValue("@Sex", tB3_sex.Text.Trim());comm.Parameters.AddWithValue("@phone", tB4_phone.Text.Trim()); comm.Parameters.AddWithValue("@workerPost",tB5_POST.Text.Trim());int count = comm.ExecuteNonQuery();//执行命令,返回的行数5.7出入库信息表设计1出库表界面设计public partial class putout: Form{ public putout(){ InitializeComponent();}private voidbutton1_Click(object sender,EventArgs e){ this.Close(); }private void but_Y_Click(objectsender, EventArgs e){string show_str1 =string.Empty;string show_str2 =string.Empty;string dt1 =dateTimePicker1.Value.ToString();string dt2=dateTimePicker2.Value.Date.ToString();string connstring = @"Data Source=.zhaojuan-PC\SQLEXPRESS;AttachDbFilename=F:\仓库管理系统\仓库管理系统\WMS_DB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";SqlConnection conn = new SqlConnection(connstring);try{conn.Open();SqlCommand comm = new SqlCommand("SPputout", conn);mandType = CommandType.StoredProcedure;//声明,引号中的内容是存储过程名comm.Parameters.AddWithValue("@putoutID",tB_puID.Text.Trim());comm.Parameters.AddWithValue("@goodsID",tB_GID.Text.Trim());string sql = string.Format("select Goods_name,Goods_price from [GOODS] where Goods_ID='{0}'", tB_GID.Text.Trim());SqlCommand comm1 = new SqlCommand(sql, conn);SqlDataReader sdr = comm1.ExecuteReader();while (sdr.Read()){ show_str1 = string.Format("{0}", sdr[0].ToString()); show_str2 = string.Format("{0}", sdr[1].ToString());} sdr.Close();//关闭SQLdatareadersdr.Dispose();this.tB_Gname.Text = show_str1;this.tB_Gprice.Text = show_str2;//将查询结果显示在文本框comm.Parameters.AddWithValue("@num",float.Parse(tB_Gnum.Text.Trim()));comm.Parameters.AddWithValue("@JSR",tB_JSR.Text.Trim());comm.Parameters.AddWithValue("@checker",tB_check.Text.Trim());comm.Parameters.AddWithValue("@time", dt1);tB_value.Text = (float.Parse(tB_Gnum.Text) * float.Parse(tB_Gprice.Text)).ToString();comm.Parameters.AddWithValue("@totalvalue",tB_value.Text);comm.Parameters.AddWithValue("@WH_ID",tB_WH.Text.Trim());comm.Parameters.AddWithValue("@producetime", dt2);int count = comm.ExecuteNonQuery();//执行命令,返回的行数if (count > 0){ MessageBox.Show("出库成功!", "成功", MessageBoxButtons.OK, rmation); }else{MessageBox.Show("出库失败!", "错误!", MessageBoxButtons.OK, rmation);}}catch{ MessageBox.Show("操作数据失败!可能填写错误!", "错误!", MessageBoxButtons.OK, rmation);}finally{ conn.Close(); } }2入库表界面设计(代码展示不同部分)private void but_Y_Click(objectsender, EventArgs e){string show_str1 =string.Empty;string show_str2 =string.Empty;string dt1 =dateTimeNow.Value.Date.ToString();DateTime dt2 =dateTimeGpro.Value.Date;DateTime dt3 =dateTimeGqgp.Value.Date;TimeSpan dt4 = dt3 - dt2;string connstring = @"Data Source=.zhaojuan-PC\SQLEXPRESS;AttachDbFilename=F:\仓库管理系统\仓库管理系统\WMS_DB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";SqlConnection conn = new SqlConnection(connstring);string sql1=string .Format("select count(*) from Storegoods where Goods_ID={0} and producetime={1}",tB_GID.Text.Trim(),dt2);conn.Open();SqlCommand comm2 = new SqlCommand(sql1, conn);int num=(int) comm2.ExecuteScalar();if (num == 0){ try{ SqlCommand comm = new SqlCommand("SPputin", conn); mandType = CommandType.StoredProcedure;comm.Parameters.AddWithValue("@putinID",tB_INID.Text.Trim());comm.Parameters.AddWithValue("@goodsID",tB_GID.Text.Trim());string sql = string.Format("select Goods_name,Goods_price from [GOODS] where Goods_ID='{0}'", tB_GID.Text.Trim());SqlCommand comm1 = new SqlCommand(sql, conn);SqlDataReader sdr = comm1.ExecuteReader();while (sdr.Read()){show_str1 = string.Format("{0}", sdr[0].ToString());show_str2 = string.Format("{0}", sdr[1].ToString());}sdr.Close();sdr.Dispose();this.tB_Gname.Text = show_str1;this.tB_Gprice.Text = show_str2;//将查询结果显示在文本框comm.Parameters.AddWithValue("@num",float.Parse(tB_num.Text.Trim()));comm.Parameters.AddWithValue("@supplier",tB_SUP.Text.Trim());comm.Parameters.AddWithValue("@JSR",tB_JSR.Text.Trim());comm.Parameters.AddWithValue("@checker",tB_check.Text.Trim());comm.Parameters.AddWithValue("@time", dt1);tB_value.Text = (float.Parse(tB_num.Text) * float.Parse(tB_Gprice.Text)).ToString();comm.Parameters.AddWithValue("@totalvalue",tB_value.Text);comm.Parameters.AddWithValue("@WH_ID",tB_WH.Text.Trim());comm.Parameters.AddWithValue("@producetime",dt2.ToString());comm.Parameters.AddWithValue("@qgp", dt4.Days);int count = comm.ExecuteNonQuery();//执行命令,返回的行数if (count > 0){MessageBox.Show("入库成功!", "成功", MessageBoxButtons.OK, rmation);}else{ MessageBox.Show("入库失败!", "错误!", MessageBoxButtons.OK, rmation);}}catch (Exception){ MessageBox.Show("操作数据失败!可能填写错误!", "错误!", MessageBoxButtons.OK, rmation); }finally{conn.Close();}}else{ try{SqlCommand comm = new SqlCommand("SPputin2", conn); mandType = CommandType.StoredProcedure;comm.Parameters.AddWithValue("@putinID",tB_INID.Text.Trim());comm.Parameters.AddWithValue("@goodsID",tB_GID.Text.Trim());string sql = string.Format("select Goods_name,Goods_price from [GOODS] where Goods_ID='{0}'", tB_GID.Text.Trim());SqlCommand comm1 = new SqlCommand(sql, conn);SqlDataReader sdr = comm1.ExecuteReader();while (sdr.Read()){show_str1 = string.Format("{0}", sdr[0].ToString());show_str2 = string.Format("{0}", sdr[1].ToString());}sdr.Close();sdr.Dispose();this.tB_Gname.Text = show_str1;this.tB_Gprice.Text = show_str2;//将查询结果显示在文本框comm.Parameters.AddWithValue("@num",float.Parse(tB_num.Text.Trim()));comm.Parameters.AddWithValue("@supplier",tB_SUP.Text.Trim());comm.Parameters.AddWithValue("@JSR",tB_JSR.Text.Trim());comm.Parameters.AddWithValue("@checker",tB_check.Text.Trim());comm.Parameters.AddWithValue("@time", dt1);tB_value.Text = (float.Parse(tB_num.Text) * float.Parse(tB_Gprice.Text)).ToString();comm.Parameters.AddWithValue("@totalvalue",tB_value.Text);comm.Parameters.AddWithValue("@WH_ID",tB_WH.Text.Trim());comm.Parameters.AddWithValue("@producetime",dt2.ToString());comm.Parameters.AddWithValue("@qgp", dt4.Days);int count = comm.ExecuteNonQuery();//执行命令,返回的行数5.8删改信息设计private void button1_Click(object sender, EventArgs e){this.gOODSTableAdapter.Update(wMS_DBDataSet7);}private voidupdataANDdelete_Load(objectsender, EventArgs e){this.supplierTableAdapter.Fill(this.wMS_DBDataSet9.Supplier);this.workerTableAdapter.Fill(this.wMS_DBDataSet8.Worker);this.gOODSTableAdapter.Fill(this.wMS_DBDataSet7.GOODS);}private void button7_Click(objectsender, EventArgs e){foreach(DataGridViewRow r indataGridView1.SelectedRows){dataGridView1.Rows.Remove(r); } }private void button3_Click(object sender, EventArgs e){workerTableAdapter.Update(wMS_DBDataSet8);}private void button4_Click(object sender, EventArgs e){foreach (DataGridViewRow r in dataGridView2.SelectedRows) {dataGridView2.Rows.Remove(r);} }private void button5_Click(object sender, EventArgs e){supplierTableAdapter.Update(wMS_DBDataSet9);}private void button6_Click(object sender, EventArgs e){ foreach (DataGridViewRow r in dataGridView3.SelectedRows) { dataGridView3.Rows.Remove(r);}}6总结经过两周的课程设计,我们组设计的作品仓库管理系统终于完成,在一次次的调试后,程序比较完善,并且利用数据库的相关知识,存储信息。