2023年-仓库管理系统报告.docx
《2023年-仓库管理系统报告.docx》由会员分享,可在线阅读,更多相关《2023年-仓库管理系统报告.docx(22页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、计算机工程学院Project! (GUI + SQL2005;实行赧告选题名称:仓库管理系统专业: 计算机科学与技术(软件工程方向) 班级:软件1092姓名:王伟剑学号: 1091305220指导教师: 冯万利 于长辉 高尚兵 庄军2011 年 06月11日5货物出库6库存预警7商品查询4编码实现登录系统public static string pwd;public static string pid;private void button l_Click(object sender, EventArgs e) (pwd = this.textBoxl.Text;pid = this.text
2、Box2.Text;Logs 1 = new Logs();if (int.Parse (LisPassword(this.textBox2.Text,this.textBox 1 .Text).ToString () )= 1) (this.Hide();Management m = new Management();m.ShowDialog();)else(DialogResult dr = MessageBox.Show(”请检查您的用户名和密码”登录失败二 MessageBoxButtons.YesNo);if (DialogResult.No=dr)(Application.Exit
3、();private void button2_Click(object sender, EventArgs e)(Application.Exit();)主菜单public partial class Management: Form(public Management()(InitializeComponent();)private void ChangeToolStripMenuItem_Click(object sender, EventArgs e) (ChangePassword cp 二 new ChangePassword();cp.ShowDialog();)private
4、void LogoutToolStripMenuItem_Click(object sender, EventArgs e) (DialogResult dr = MessageBox.Show(您确定要注销吗?注销MessageBoxButtons.YesNo);if (dr = DialogResult.Yes) (Application.Exit();private void OutToolStripMenuItem_Click(object sender, EventArgs e)(Application.Exit();)private void Management_Load(obj
5、ect sender, EventArgs e)(this.goodsTableAdapter.Fill(this.wmsDataSet.Goods);)private void Management_FormClosed(object sender, FormClosedEventArgs e) (Application.Exit();)private void InputF2ToolStripMenuItem_Click(object sender, EventArgs e)(InputWHForm iwh = new InputWHForm();iwh.ShowDialog ();)pr
6、ivate void Management_Activated(object sender, EventArgs e)(this.goodsTableAdapter.Fill(this.wmsDataSet.Goods);)private void OutF6ToolStripMenuItem_Click(object sender, EventArgs e)(OutWHForm owh = new OutWHForm();owh.ShowDialog ();)private void WarningToolStripMenuItem_Click(object sender, EventArg
7、s e)Warning w = new WarningO; w.ShowDialogO;private void GoodsDetailsToolStripMenuItem_Click(object sender, EventArgs e) (this.goodsTableAdapter.Fill(this.wmsDataSet.Goods);private void WareHouseDetailsToolStripMenuItem_Click(object sender, EventArgs e) (this.warehousesTableAdapter.Fill(this.wmsData
8、Setl. Warehouses);)private void SearchToolStripMenuItem_Click(object sender, EventArgs e)(Search s = new Search();s.Show();)private void fillByToolStripButton_Click(object sender, EventArgs e)(try(this.goodsTableAd 叩 ter.FillBy(this.wmsDataSet.Goods);)catch (System.Exception ex)(System. Windows.Form
9、s.MessageBox.Show(ex.Message);入库登记public partial class InputWHForm : Form (public InputWHForm()(InitializeComponent();private void InputWHForm_Load(object sender, EventArgs e)/TODO:这行代码将数据加载到表“wmsDataSet4.Goods”中。您可以根据需要移动或移除它。 this.goodsTableAdapter.Fill(this.wmsDataSet4.Goods);)private void button
10、6_Click(object sender, EventArgs e) (this.CloseQ;)public void SendToInput() (GoodsDetails s = new GoodsDetails();s.GID = int.Parse(this.textBox 1 .Text);s.GName = boBox 1 .Text;s.Gprice 二 float.Parse(this.textBox3.Text);s.GProviderl = boBox 1 .Text;s.GProvider2 = boBox4.Text;s.Wname = int.Parse (boB
11、ox2.Text);s.Count = SqlHelper.DefiniteCount(this.textBox 1 .Text) + int.Parse(this.textBox2.Text); SqlHelper.AddGoods(s);)private void button5_Click(object sender, EventArgs e) (SendToInput();this.Close();)private void textBox 1 _TextChanged(object sender, EventArgs e) (GoodsDetails g = SqlHelper.Bi
12、nd(this.textBox I .Text);boBox3.Text = g.GName;this.textBox3.Text = g.Gprice.ToString ();boBox 1 .Text = g.GProviderl;boBox4.Text = g.GProvider2;boBox2.Text = g.Wname.ToString ();) ) 出库登记 public partial class OutWHForm : Formpublic OutWHForm()InitializeComponent();)private void button2_Click(object
13、sender, EventArgs e)(this.Close();)private void button 1 _Click(object sender, EventArgs e) (SentToOutput();this.Close();)private void SentToOutput()(GoodsDetails s = new GoodsDetails();s.GID = int.Parse(this.textBox 1 .Text);s.GName = boBox 1 .Text;s.Gprice = float.Parse(this.textBox3.Text);s.GProv
14、iderl = boBox 1 .Text;s.GProvider2 = boBox4.Text;s.Count = SqlHelper.DefiniteCount(this.textBoxl .Text) - int.Parse(this.textBox2.Text);SqlHelper.OutGoods(s);)private void OutWHForm_Load(object sender, EventArgs e) (/TODO:这行代码将数据加载到表“wmsDataSet2.Goods”中。您可以根据需要移动或移除它。this.goodsTableAdapter.Fill(this
15、.wmsDataSet2.Goods);)private void textBox 1 _TextChanged(object sender, EventArgs e) (GoodsDetails g = SqlHelper.Bind(this.textBox 1 .Text);boBox3.Text = g.GName;this.textBox3.Text = g.Gprice.ToString ();boBox 1 .Text = g.GProviderl;boBox4.Text = g.GProvidcr2;库存预警public partial class Warning : Form(
16、public WarningO(InitializeComponent();)private void button3_Click(object sender, EventArgs e) (this.listBox l.Items.Clear();List g 二 new List();g = SqlHelper.WarningBind(this.textBox2.Text);int i = 0;for (i=0; i g.Count();i+ ) (this.listBox 1.Items. Add(gi.GID.ToString().PadLeft(4) + gi.GName.PadLef
17、t(20) + gi.Count.ToString().PadLeft(10) + gi.GProviderl.PadLeft(20) + gi.GProvider2.PadLeft(10);)this.textBoxl.Text = i.ToStringO;)货物查询public partial class Search : Form(public Search()(InitializeComponent();private void button l_Click(object sender, EventArgs e) (this.Close();private void Search_Lo
18、ad(object sender, EventArgs e) (/ TODO:这行代码将数据加载到表“wmsDataSet5.Goods”中。您可以根据需要移动或移除它。this.goodsTableAdapter.Fill(this.wmsDataSet5.Goods);private void button2_Click(object sender, EventArgs e)GoodsDetails g = SqlHelper.BindVague(boBox3.Text);this.textBoxl.Text = g.GID.ToStringO;this.textBox3.Text = g
19、.Gprice.ToStringO;boBox 1 .Text = g.GProviderl;boBox4.Text = g.GProvider2;boBox2.Text = g.Wname.ToStringO;this.textBox2.Text = g.Count.ToString();)private void button3_Click(object sender, EventArgs e)(GoodsDetails g = SqlHelper.Bind(this.textBox 1 .Text);boBox3.Text = g.GName;this.textBox3.Text = g
20、.Gprice.ToStringO;boBox 1 .Text 二 g.GProviderl;boBox4.Text = g.GProvider2;boBox2.Text = g.Wname.ToStringO;this.textBox2.Text = g.Count.ToStringO;)数据库连接public static void ChangeDBPassword(int p,string p2)(SqlConnection co = new SqlConnection(ConnectionString.con);SqlCommand cmd = new SqlCommand(strin
21、g.Format(update Users set Upassword-0* where Un”lp,p2), co);co.Open();var i = (int)cmd.ExecuteNonQuery ();MessageBox.Show(密码修改成功)co.Close();)public static void AddGoods(GoodsDetails g)(SqlConnection co 二 new SqlConnection(ConnectionString.con);SqlCommand cmd3 = new SqlCommand(string.Format(nselect c
22、ount(*) from Goods where 产品 ID=0Hg.GID), co);co.Open ();int j=(int)cmd3.ExecuteScalar ();if)SqlCommand cmd2 = new SqlCommand(string.Format(Hinsert into Goods valuesf0Vl 727374;57677T, g.GID ,g.GName ,g.Gprice,g.Count ,g.GProviderl ,g.GProvider2 ,g.GDescribe,g.Wname ), co);int i = (int)cmd2.ExecuteNo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2023 仓库 管理 系统 报告
限制150内