一个月前做的一次关于数据库的课程设计,时间不够(三天半的时间)且实力有限,所以没有完全完成,而且存在bug(下文会有说明),在这里记录下,提供大家一些思路。

一、课程设计目的及要求

《数据库原理》课程设计是计算机科学与技术课程体系中专业实践教学的重要环节之一,是学完《数据库原理》课程后进行的一次全面综合实践,其目的在于加深学生对数据库基本概念、基本原理,以及关系数据库设计理论的理解,通过课程设计的综合训练,培养学生动手能力解决数据库分析、设计和应用等实际问题的能力,掌握关系数据库系统建设的流程,掌握E-R图的绘制方法以及关系数据库设计方法、数据库规范化处理的技能,并通过业务SQL描述深入掌握SQL的使用方法。

二、问题描述

实现服饰信息(服饰编号、名称、类别号、单价、库存数),管理员信息(工号、姓名、联系电话)和服饰类别信息(类别号、类别名称、是否破损)的插入、删除、修改、浏览和查询管理;实现服饰的出库管理(出库单号、服饰名称、出库数量、出库时间、管理员工号);实现入库管理(入库单号、服饰名称、入库数量、入库时间、管理员工号);建立数据库相关表之间的参照完整性约束;创建触发器,实现已破损服饰的自动销毁登记管理;创建视图,按类别查询不同服饰的编号、名称、总数和库存量;创建存储过程,查询库存数少于指定数目的在库服饰信息,以便进货。

三、功能需求

  • 服饰信息的增删改查;
  • 管理员信息的增删改查;
  • 服饰类别信息的增删改查;
  • 服饰的出库管理操作;
  • 服饰的入库管理操作。

四、数据库设计

4.1数据流图

4.2数据字典

  1. 数据项

数据项名称:服饰编号

别名:clothes_id

含义:某类服饰的编号

类型:字符串

长度:20

  1. 数据存储
    数据存储名称:服饰信息

别名:clothes

说明:服饰存放于仓库的情况

组成:服饰编号+服饰名称+服饰类型+服饰数量+服饰价格

输入:入库单

输出:出库单

存取方式:索引文件,以服饰编号为关键字

操作方式:立即查询

  1. 数据流

数据流名称:订单

说明:顾客订货时填写的项目

输入:顾客提交

输出:订单检验

组成:编号+订货日期+地址+电话+货物名称+数量

  1. 数据加工

加工名:查阅库存

操作条件:接收到合格订单时

输入:合格订单

输出:可供货订单或缺货订单

加工过程:根据订单数量和总库存数量可以判断供货或缺货

4.3概念设计之E-R图

服饰信息实体:

管理员实体:

服饰类别实体:

逻辑结构之关系模式

4.4数据表结构

clothes

名称

类型

长度

是否允许为空

clothes_id

char

20

clothes_name

char

30

type_id

char

20

clothes_price

int

11

clothes_num

int

11

enter

名称

类型

长度

是否允许为空

enter_id

char

20

enter_name

char

30

enter_num

int

11

enter_time

date

0

manager_id

char

20

export

名称

类型

长度

是否允许为空

export_id

char

20

export_name

char

30

export_num

int

11

enter_time

date

0

manager_id

char

20

manager

名称

类型

长度

是否允许为空

manager_id

char

20

manager_name

char

30

phone_number

char

20

type

名称

类型

长度

是否允许为空

type_id

char

20

typer_name

char

30

broken

int

11

五、系统实现途径

根据前面分析所得出的数据需求和功能需求,我们后台采用 MySQL数据库管理系统建立数据库,借助C#语言编码实现系统界面及各个功能模块。你问我为什么不用java写?因为我习惯用VS2015直接拖组件,省去做界面的时间。

六、界面实现

6.1主界面

6.2服饰信息增加界面

6.3服饰信息删除界面

6.4 服饰信息查询界面

6.5服饰信息更新界面

6.6入库单

6.7出库单

6.8查库存

七、数据库实现

暂无代码,后面再加。。。

八、后台项目结构

8.1项目目录

8.2Bean包(实体类)

8.3Dao包(数据库操作类)

8.4SystemForm包(界面)

8.5ClothesForms包(服饰操作界面)

8.6 其他

其他大多数是visual studio2017社区版自动生成的,所以不做介绍。

九、后台代码

9.1Bean包中administrator类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Clothes
{public class Administrator{private string manager_id;private string manager_name;private string phone_number;public void SetManageId(string manager_id){this.manager_id = manager_id;}public void SetManageName(string manager_name){this.manager_name = manager_name;}public void SetPhoneNum(string phone_number){this.phone_number = phone_number;}public string GetManagerName(){return manager_name;}public string GetManagerId(){return manager_id;}public string GetPhoneNum(){return phone_number;}}
}

9.2 Bean包中的Clo类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Clothes
{public class Clo{private string clothes_id;private string clothes_name;private string type_id;private int clothes_price;private int clothes_num;public void SetCloId(string clothes_id){this.clothes_id = clothes_id;}public void SetCloName(string clothes_name){this.clothes_name = clothes_name;}public void SetTypeId(string type_id){this.type_id = type_id;}public void SetCloPrice(int clothes_price){this.clothes_price = clothes_price;}public void SetCloNum(int clothes_num){this.clothes_num = clothes_num;}public String GetCloId(){return clothes_id;}public String GetCloName(){return clothes_name;}public String GetTypeId(){return type_id;}public int GetCloPrice(){return clothes_price;}public int GetCloNum(){return clothes_num;}}
}

9.3 Bean包中的ClothesType类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Clothes
{public class ClothesType{private string type_id;private string type_name;private int broken;public void SetTypeId(string type_id){this.type_id = type_id;}public void SetTypeName(string type_name){this.type_name = type_name;}public void SetBroken(int broken){this.broken = broken;}public string GetTypeId(){return type_id;}public string GetTypeName(){return type_name;}public int Getbroken(){return broken;}}
}

9.4Bean包中的Enterlib类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Clothes.Bean
{public class EnterLib{private string enter_id;private string enter_name;private int enter_num;private DateTime date;private string manager_id;public void SetEnterId(string enter_id){this.enter_id = enter_id;}public void SetEnterName(string enter_name){this.enter_name = enter_name;}public void SetEnterNum(int enter_num){this.enter_num = enter_num;}public void SetDate(DateTime date){this.date = date;}public void SetmanagerId(string manager_id){this.manager_id = manager_id;}public string GetEnterId(){return enter_id;}public string GetEnterName(){return enter_name;}public DateTime Getdate(){return date;}public int GetEnterNum(){return enter_num;}public string GetManagerId(){return manager_id;}}
}

9.5 Bean包中Outlib类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace Clothes.Bean
{public class OutLib{private string export_id;private string export_name;private int export_num;private DateTime date;private string manager_id;public void SetExportId(string export_id){this.export_id = export_id;}public void SetEnterName(string export_name){this.export_name = export_name;}public void SetExportNum(int export_num){this.export_num = export_num;}public void SetDate(DateTime date){this.date = date;}public void SetManagerId(string manager_id){this.manager_id = manager_id;}public string GetExportId(){return export_id;}public string GetExportName(){return export_name;}public int GetExportNum(){return export_num;}public DateTime GetDate(){return date;}public string GetManagerId(){return manager_id;}}
}

9.6Dao包中的 MySQLOperate类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data;
using MySql.Data.MySqlClient;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;namespace Clothes
{public class MySQLOperate{private static string conStr = "server=localhost;port=3306;user " +"id=root;password=你的密码;database=clothesmanage;SslMode=none";private static MySqlConnection myCon = new MySqlConnection(conStr);private static MySqlCommand myCom = null;private static MySqlDataReader myDr = null;public static int ConnectOperate(string commandText,string clothes_name,int num, ref StringBuilder exStr){myCom = new MySqlCommand();myCom.Connection = myCon;myCom.CommandType = CommandType.StoredProcedure;myCom.CommandText = commandText;myCom.Parameters.Add("@name", MySqlDbType.VarChar, 30).Value = clothes_name;myCom.Parameters.Add("@num", MySqlDbType.Int32).Value = num;Debug.WriteLine("存储过程:" + myCom);try{if(myCon.State == ConnectionState.Closed){myCon.Open();}if(Convert.ToInt32(myCom.ExecuteNonQuery()) > 0){return 1;}else{return 2;}}catch (Exception ee){exStr.Append(ee.ToString());}finally{myCon.Close();myCon.Dispose();}return 3;}/// <summary>/// 数据库的增加删除更改操作/// </summary>/// <param name="Command"></param>/// <param name="exStr"></param>/// <returns></returns>public static Boolean ADUOperate(String Command, ref StringBuilder exStr){try{if (myCon.State == ConnectionState.Closed){myCon.Open();}myCom = new MySqlCommand(Command, myCon);if(Convert.ToInt32(myCom.ExecuteNonQuery()) > 0){return true;}return false;}catch (Exception ee){exStr.Append(ee.ToString());}finally{myCon.Close();myCon.Dispose();}return false;}/// <summary>/// 数据库查询操作/// </summary>/// <param name="queCommand"></param>/// <param name="exStr"></param>/// <returns></returns>public static List<Clo> QueOperate(String queCommand,ref StringBuilder exStr){List<Clo> list = new List<Clo>();try{if(myCon.State == ConnectionState.Closed){myCon.Open();}myCom = new MySqlCommand(queCommand, myCon);myDr = myCom.ExecuteReader();if (myDr.HasRows){while (myDr.Read()){Clo clothes = new Clo();clothes.SetCloId((string)myDr["clothes_id"]);clothes.SetCloName((string)myDr["clothes_name"]);clothes.SetTypeId((string)myDr["type_id"]);clothes.SetCloPrice((int)myDr["clothes_price"]);clothes.SetCloNum((int)myDr["clothes_num"]);list.Add(clothes);}}return list;}catch (Exception ee){exStr.Append(ee.ToString());}finally{myCon.Close();myDr.Close();myCon.Dispose();}return null;}}
}

说一下这里的几个坑。第一个是数据库的连接,因为我用的是8.0的MySQL,所以连接的方式与原来5.0版本等不同,我记得当时是去MySQL的隐藏配置文件中改了连接密码方式,然后才连接成功。由于做这个课设有一段时间了,所以具体操作记得不是很清楚,而且当时查阅的相关博客没有保存书签。第二个是调用数据库的存储过程,这个由于但是时间不够,我就没去解决了。现在时间一长,不太想继续做下去。所以一直有bug。。。对了,实现数据库的连接前,需要添加dll库,这个得根据你的数据库版本来添加,具体可以搜一搜相关的博客。

9.7AddClothes界面逻辑(添加服饰信息界面)

using Clothes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace ClothesManage
{public partial class AddClothes : Form{StringBuilder exStr = new StringBuilder();public AddClothes(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){if (textBox1.Text.Equals("") || textBox2.Text.Equals("") ||textBox4.Text.Equals("") || textBox3.Text.Equals("") ||textBox5.Text.Equals("")){MessageBox.Show("请认真填写!!!");return;}string clothes_id = textBox1.Text;string clothes_name = textBox2.Text;string type_id = textBox3.Text;int clothes_price = Convert.ToInt32(textBox4.Text);int clothes_num = Convert.ToInt32(textBox5.Text);string addCom = "insert into clothes(clothes_id, clothes_name," +" type_id, clothes_price, clothes_num)" +" values('" + clothes_id + "','" + clothes_name + "','" +type_id + "'," + clothes_price + "," + clothes_num + ")";Debug.WriteLine("添加语句:" + addCom);Boolean flag = MySQLOperate.ADUOperate(addCom, ref exStr);if (flag){MessageBox.Show("成功!!!");}else{MessageBox.Show("添加失败,请检查填写是否正确!!!");Debug.WriteLine("服饰信息添加错误:" + exStr.ToString());}}private void button2_Click(object sender, EventArgs e){this.Hide();Form1 form1 = new Form1();form1.ShowDialog();Application.ExitThread();}}
}

9.8DelClothes界面逻辑(删除服饰信息界面)

using Clothes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace ClothesManage
{public partial class DelClothes : Form{public DelClothes(){InitializeComponent();}private void button2_Click(object sender, EventArgs e){this.Hide();Form1 form1 = new Form1();form1.ShowDialog();Application.ExitThread();}private void button1_Click(object sender, EventArgs e){StringBuilder exStr = new StringBuilder();if (textBox1.Text.Equals("") ){MessageBox.Show("请认真填写!!!");return;}string clothes_id = textBox1.Text;string addCom = "DELETE FROM clothes WHERE clothes_id= '" + clothes_id + "'" ;Debug.WriteLine("查询语句:" + addCom);Boolean flag = MySQLOperate.ADUOperate(addCom, ref exStr);if (flag){MessageBox.Show("成功!!!");}else{MessageBox.Show("添加失败,请检查是否正确填写信息!!!");Debug.WriteLine("服饰信息删除错误:" + exStr.ToString());}}}
}

9.9 QueClothes后台逻辑(服饰信息查询界面)

using Clothes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace ClothesManage
{public partial class QueClothes : Form{List<Clo> list = new List<Clo>();string addCom = null;public QueClothes(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){function(1);}private void button2_Click(object sender, EventArgs e){this.Hide();Form1 form1 = new Form1();form1.ShowDialog();Application.ExitThread();}private void button3_Click(object sender, EventArgs e){function(3);}private void function(int n){StringBuilder exStr = new StringBuilder();if (textBox1.Text.Equals("") && n == 1){MessageBox.Show("请认真填写!!!");return;}string clothes_id = textBox1.Text;if (n == 1){addCom = "SELECT * FROM clothes WHERE clothes_id= '" + clothes_id + "'";}else if(n == 3){addCom = "SELECT * FROM clothes";}Debug.WriteLine("查询语句:" + addCom);list = MySQLOperate.QueOperate(addCom, ref exStr);if (list != null){listView1.Items.Clear();for(int i=0; i<list.Count; i++){ListViewItem item = new ListViewItem();item.Text = list[i].GetCloId();item.SubItems.Add(list[i].GetCloName());item.SubItems.Add(list[i].GetTypeId());item.SubItems.Add(list[i].GetCloPrice().ToString());item.SubItems.Add(list[i].GetCloNum().ToString());listView1.Items.Add(item);}}else{MessageBox.Show("查询失败,未知错误!!!");Debug.WriteLine("服饰信息查询错误:" + exStr.ToString());}}}}

9.10UpdClothes界面逻辑(更新服饰信息界面)

using Clothes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace ClothesManage
{public partial class UpdClothes : Form{public UpdClothes(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){StringBuilder exStr = new StringBuilder();if (textBox1.Text.Equals("") || textBox2.Text.Equals("") ||textBox4.Text.Equals("") || textBox3.Text.Equals("") ||textBox5.Text.Equals("")){MessageBox.Show("请认真填写!!!");return;}string clothes_id = textBox1.Text;string clothes_name = textBox2.Text;string type_id = textBox3.Text;int clothes_price = Convert.ToInt32(textBox4.Text);int clothes_num = Convert.ToInt32(textBox5.Text);string addCom = "update clothes set clothes_name = '" + clothes_name + "',type_id='" + type_id +"',clothes_price=" + clothes_price + ",clothes_num=" + clothes_num + " where clothes_id ='" + clothes_id +"'";Debug.WriteLine("更新语句:" + addCom);Boolean flag = MySQLOperate.ADUOperate(addCom, ref exStr);if (flag){MessageBox.Show("成功!!!");}else{MessageBox.Show("添加失败,请检查是否填写正确!!!");Debug.WriteLine("服饰信息更新错误:" + exStr.ToString());}}private void button2_Click(object sender, EventArgs e){this.Hide();Form1 form1 = new Form1();form1.ShowDialog();Application.ExitThread();}}
}

9.11 Main界面逻辑(主界面)

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 ClothesManage.SystemFroms.LibForm;namespace ClothesManage
{public partial class Form1 : Form{public Form1(){InitializeComponent();}private void bt_exti_Click(object sender, EventArgs e){Application.ExitThread();}private void bt_add_clo_Click(object sender, EventArgs e){this.Hide();AddClothes ac = new AddClothes();ac.ShowDialog();Application.ExitThread();}private void bt_del_clo_Click(object sender, EventArgs e){this.Hide();DelClothes dc = new DelClothes();dc.ShowDialog();Application.ExitThread();}private void bt_upd_clo_Click(object sender, EventArgs e){this.Hide();UpdClothes uc = new UpdClothes();uc.ShowDialog();Application.ExitThread();}private void bt_que_clo_Click(object sender, EventArgs e){this.Hide();QueClothes qc = new QueClothes();qc.ShowDialog();Application.ExitThread();}private void bt_add_admini_Click(object sender, EventArgs e){this.Hide();AddAdmini aa = new AddAdmini();aa.ShowDialog();Application.ExitThread();}private void bt_del_admini_Click(object sender, EventArgs e){this.Hide();DelAdmini da = new DelAdmini();da.ShowDialog();Application.ExitThread();}private void bt_upd_admini_Click(object sender, EventArgs e){this.Hide();UpdAdmini ua = new UpdAdmini();ua.ShowDialog();Application.ExitThread();}private void bt_que_admini_Click(object sender, EventArgs e){this.Hide();QueAdmini qa = new QueAdmini();qa.ShowDialog();Application.ExitThread();}private void bt_add_type_Click(object sender, EventArgs e){this.Hide();AddType at = new AddType();at.ShowDialog();Application.ExitThread();}private void but_del_type_Click(object sender, EventArgs e){this.Hide();DelType dt = new DelType();dt.ShowDialog();Application.ExitThread();}private void bt_upd_type_Click(object sender, EventArgs e){this.Hide();UpdType ut = new UpdType();ut.ShowDialog();Application.ExitThread();}private void bt_que_type_Click(object sender, EventArgs e){this.Hide();QueType qt = new QueType();qt.ShowDialog();Application.ExitThread();}private void bt_outlib_Click(object sender, EventArgs e){this.Hide();LibOut lo = new LibOut();lo.ShowDialog();Application.ExitThread();}private void bt_enterlib_Click(object sender, EventArgs e){this.Hide();LibEnter le = new LibEnter();le.ShowDialog();Application.ExitThread();}private void bt_lib_num_Click(object sender, EventArgs e){this.Hide();LibNum ln = new LibNum();ln.ShowDialog();Application.ExitThread();}}
}

9.12LibEnter界面逻辑(入库单)

using Clothes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace ClothesManage
{public partial class LibEnter : Form{List<Clo> list = new List<Clo>();public LibEnter(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){StringBuilder exStr = new StringBuilder();if (textBox1.Text.Equals("") || textBox2.Text.Equals("") ||textBox3.Text.Equals("") ||textBox5.Text.Equals("")){MessageBox.Show("请认真填写!!!");return;}string enter_id = textBox1.Text;string enter_name = textBox2.Text;int enter_num = Convert.ToInt32(textBox3.Text);string enter_time = DateTime.Now.ToString("yyyy-MM-dd");string manager_id = textBox5.Text;string queCom = "select * from clothes where clothes_name = '" + enter_name + "'";Debug.WriteLine("查询语句:" + queCom);list = MySQLOperate.QueOperate(queCom, ref exStr);if(list != null){;}else{MessageBox.Show("没有名为:" + enter_name + "的存在");return;}string addCom = "insert into enter(enter_id, enter_name," +" enter_num, enter_time, manager_id)" +" values('" + enter_id + "','" + enter_name + "'," +enter_num + ",'" + enter_time + "','" + manager_id + "')";Debug.WriteLine("添加语句:" + addCom);            Boolean flag = MySQLOperate.ADUOperate(addCom, ref exStr);if (flag){string updCom = "update clothes set clothes_num = clothes_num + " + enter_num + " where clothes_name = '" + enter_name +"'";Boolean flag1 = MySQLOperate.ADUOperate(updCom, ref exStr);if (flag1)MessageBox.Show("成功!!!");}else{MessageBox.Show("添加失败,请检查填写是否正确!!!");Debug.WriteLine("出库单添加错误:" + exStr.ToString());}}private void button2_Click(object sender, EventArgs e){this.Hide();Form1 form1 = new Form1();form1.ShowDialog();Application.ExitThread();}}
}

9.13 LibNum界面逻辑(库存数)

using Clothes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace ClothesManage.SystemFroms.LibForm
{public partial class LibNum : Form{public LibNum(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){if (textBox1.Text.Equals("") || comboBox1.Text.Equals("")){MessageBox.Show("请认真填写!!!");return;}StringBuilder exStr = new StringBuilder();string clothes_name = comboBox1.Text;int num = Convert.ToInt32(textBox1.Text);int flag = MySQLOperate.ConnectOperate("get_info", clothes_name,num, ref exStr);if (flag == 1){MessageBox.Show("需要进货!!!");}else if (flag == 2){MessageBox.Show("不需要进货!!!");}else if (flag == 3){MessageBox.Show("出错了!!!");Debug.WriteLine(exStr.ToString());}}private void button2_Click(object sender, EventArgs e){this.Hide();Form1 form1 = new Form1();form1.ShowDialog();Application.ExitThread();}}
}

9.14LibOut界面逻辑(出库单)

using Clothes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace ClothesManage
{public partial class LibOut : Form{List<Clo> list = new List<Clo>();public LibOut(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){StringBuilder exStr = new StringBuilder();if (textBox1.Text.Equals("") || textBox2.Text.Equals("") ||textBox3.Text.Equals("") || textBox4.Text.Equals("")){MessageBox.Show("请认真填写!!!");return;}string export_id = textBox1.Text;string export_name = textBox2.Text;int export_num = Convert.ToInt32(textBox3.Text);string export_time = DateTime.Now.ToString("yyyy-MM-dd");string manager_id = textBox4.Text;string queCom = "select * from clothes where clothes_name = '"+ export_name + "'";Debug.WriteLine("查询语句:" + queCom);list = MySQLOperate.QueOperate(queCom, ref exStr);if (list != null){;}else{MessageBox.Show("没有名为:" + export_name + "的存在");return;}string addCom = "insert into export(export_id, export_name," +" export_num, export_time, manager_id)" +" values('" + export_id + "','" + export_name + "'," +export_num + ",'" + export_time + "','" + manager_id + "')";Debug.WriteLine("添加语句:" + addCom);Boolean flag = MySQLOperate.ADUOperate(addCom, ref exStr);if (flag){string updCom = "update clothes set clothes_num = clothes_num - " + export_num + " where clothes_name = '" + export_name + "'";Boolean flag1 = MySQLOperate.ADUOperate(updCom, ref exStr);if(flag1)MessageBox.Show("成功!!!");}else{MessageBox.Show("添加失败,请检查填写是否正确!!!");Debug.WriteLine("出库单添加错误:" + exStr.ToString());}}private void button2_Click(object sender, EventArgs e){this.Hide();Form1 form1 = new Form1();form1.ShowDialog();Application.ExitThread();}private void LibOut_Load(object sender, EventArgs e){}}
}

9.15其他界面

其他界面我没有去实现,因为感觉差不多。

代码下载

数据库代码

数据库课程设计之服饰库存管理系统相关推荐

  1. 数据库课程设计(电脑配件库存管理系统)

    又是一年课程设计时,此次做的是数据库管理系统:电脑配件库存管理系统 主要包括以下基本内容: 1)电脑配件资料的添加与删除: 2)电脑配件的进货与出货管理: 3)电脑配件的库存管理与信息统计: 4)各种 ...

  2. 数据库课程设计:建材物资管理系统数据库课程设计

    数据库课程设计:建材物资管理系统数据库课程设计 ** 一.课设简述 ** 本次设计基于大二学习的数据库原理这门课程,选择了建材物资管理系统这个课设题目,在查阅了相关资料后,设计了集进货商家信息,进货报 ...

  3. 数据库课程设计——学生宿舍信息管理系统

    数据库课程设计--学生宿舍信息管理系统 目录 1.设计目的... 2 2.任务与要求... 2 3.学生宿舍管理系统课程设计... 2 3.1 引言... 2 3.2需求分析... 2 3.2.1. ...

  4. 汽车站订票系统mysql实验_数据库课程设计报告-车站售票管理系统

    数据库课程设计报告-车站售票管理系统 吉林工程技术师范学院 课程设计报告 设计名称: 车站售票信息管理系统 姓 名: 孟祥丽 学 号: 23号 专 业: 计算机科学与技术 班 级: C1042 院 系 ...

  5. java数据库图书销售系统_SQL+java数据库课程设计,图书销售管理系统

    [实例简介] SQL数据库课程设计,图书销售管理系统,报告,任务书,挺全的 [实例截图] [核心代码] 07计本2班_15号_刘思旭_图书销售管理系统 └── 07计本2班_15号_刘思旭_图书销售管 ...

  6. 数据库课程设计:图书信息管理系统(Java+MySQL)(附程序)

    期末数据库课程设计做了个图书信息管理系统,由于老师给的选题给得早,所以我在开学后的几周就开学搞了,删删改改整了好多,在此整理分享一下: 项目简介: 随着社会的发展,人们对知识的需求也在不断增长.书籍作 ...

  7. C++/数据库课程设计_诊所信息管理系统_系统介绍

    系统介绍 本系统是一个诊所信息管理系统,可以作为C++或者数据库课程设计的参考,实现了患者挂号.支付.电子病历, 医生诊断.开处方.查看病历,医生.患者.药房.科室管理以及药品进销存. 针对用户的具体 ...

  8. 数据库课程设计《教务信息管理系统》

    (87条消息) 数据库系统课程设计<教务信息管理系统>python连接pymysql-MySQL代码类资源-CSDN文库 本文使用python和mysql创建一个基础中的基础的教务信息管理 ...

  9. php咖啡管理系统论文,数据库课程设计--“茶咖啡”销售管理系统总结

    为期一周的数据库课程设计终于完工, 总结一些经验和教训.发现基础的知识还是要时刻记在心中,知识不基础,何谈去开发?因为做什么东西都首先要一定的目标,计划,以及做到东西要做到那个程度,这方面一点要先在脑 ...

最新文章

  1. 怎样使phpnow1.5.6-1支持firebird
  2. Python+Selenium学习笔记10 - send_keys上传文件
  3. 南充一中计算机机房被盗,四川省CCF CSP-JS第一轮认证考试在南充一中成功举行...
  4. Servlet之请求转发和响应重定向
  5. python中的模块与类
  6. Windows10和Ubuntu双系统下用windows引导Ubuntu
  7. java多线程中 锁 的概念的理解,java 并发多线程显式锁概念简介 什么是显式锁 多线程下篇(一)...
  8. HTML动态时间代码
  9. SQL数据去重复 Distinct 和 row_number() over()
  10. datagrid数据导出到excel文件给客户端下载的几种方法(转)
  11. 将excel文档转为word文档的方法
  12. 知网文献阅读器android,CAJViewer知网阅读器
  13. 身为管理者必须会讲的68个小故事
  14. Google离开我们快十年了
  15. 【CocosCreator】单机游戏存档的常用加密解密方法
  16. 计算机网络知识点总结(第四章 网络层)
  17. Linux/Windows快速镜像安装包下载
  18. 重庆兰格机械集团有限公司招聘-船讯网
  19. error C2275 将此类型用作表达式非法
  20. MS-DOS信息英汉对照 计算机英语强化

热门文章

  1. 每任务-苹果应用市场隐私政策
  2. PS制作海报操作技巧若干,问题若干,查看图片大小
  3. 业务系统如何集成工作流系统?_K2 BPM集成能力讲解
  4. 用Python帮你选注双色球号码
  5. win7 打开图片提示内存不足
  6. 【python】基础七:编码问题
  7. python大数据毕业设计题目100例
  8. Lambda 表达式 详解——【参考MSDN】
  9. python poisson图像融合制作CSDN博客头像
  10. 一文弄懂JVM内存结构,垃圾回收器和垃圾回收算法