ImageVerifierCode 换一换
格式:DOCX , 页数:31 ,大小:19.80KB ,
资源ID:6098126      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/6098126.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(课程设计代码.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

课程设计代码.docx

1、课程设计代码 用户登录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.SqlClient;using System.Configuration;namespace jinxiaocunSystem pu

2、blic partial class 用户登录: Form private string strcon = ConfigurationManager.ConnectionStringsDbLink.ToString(); public 用户登录() InitializeComponent(); private void button1_Click(object sender, EventArgs e)/登录 Common.Name = this.textBox1.Text; string usernumber = textBox1.Text.Trim(); string passward =

3、textBox2.Text.Trim(); int p = 0; int q = 0; SqlConnection connection = new SqlConnection(strcon); connection.Open(); if (connection.State.ToString() = Open) string sqls = Select * from Enter; SqlDataAdapter da = new SqlDataAdapter(sqls, connection); DataSet ds = new DataSet(); da.Fill(ds, Enter); fo

4、r (int i = 0; i ds.Tables0.Rows.Count; i+) if (Convert.ToInt32(ds.Tables0.RowsiproductShu) 1000) q = q + 1; connection.Close(); if (radioButton1.Checked)/系统管理员登陆 string strsql = select count(*) from Enterlable where usenumber= + textBox1.Text.Trim() + and password= + textBox2.Text.Trim() + and role=

5、 + radioButton1.Text + ; SqlCommand cmd = new SqlCommand(strsql, connection); connection.Open(); int i = (int)cmd.ExecuteScalar(); if (i 0) Form1 aa = new Form1(); aa.Show(); this.Hide(); else MessageBox.Show(请输入登录信息, 错误提示, MessageBoxButtons.OKCancel, MessageBoxIcon.Stop); else if (radioButton2.Chec

6、ked)/部门经理登录 string strsql = select count(*) from Enterlable where usenumber= + textBox1.Text.Trim() + and password= + textBox2.Text.Trim() + and role= + radioButton2.Text + ; SqlCommand cmd = new SqlCommand(strsql, connection); connection.Open(); int i = (int)cmd.ExecuteScalar(); if (i 0) Form4 aa =

7、 new Form4(); aa.Show(); this.Hide(); else MessageBox.Show(请输入登录信息, 错误提示, MessageBoxButtons.OKCancel, MessageBoxIcon.Stop); else if (radioButton3.Checked)/仓库管理员登陆 string strsql = select count(*) from Enterlable where usenumber= + textBox1.Text.Trim() + and password= + textBox2.Text.Trim() + and role

8、= + radioButton3.Text + ; SqlCommand cmd = new SqlCommand(strsql, connection); connection.Open(); int i = (int)cmd.ExecuteScalar(); if (i 0) if (p 0 | q 0) MessageBox.Show(有 + p + 种产品不足需采购,有 + q + 种产品过多停止采购); Form2 aa = new Form2(); aa.Show(); this.Hide(); else MessageBox.Show(请输入登录信息, 错误提示, Message

9、BoxButtons.OKCancel, MessageBoxIcon.Stop); else MessageBox.Show(请选择登录权限, 错误提示, MessageBoxButtons.OKCancel, MessageBoxIcon.Stop); connection.Close(); private void 用户登录_Load(object sender, EventArgs e) 仓库管理员模块using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;u

10、sing System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using System.Data.SqlClient;using System.Configuration;namespace jinxiaocunSystem public partial class Form2 : Form private string strcon = ConfigurationManager.ConnectionStringsDbLink.ToS

11、tring(); public Form2() InitializeComponent(); private void 修改密码_Click(object sender, EventArgs e) 修改密码 aa = new 修改密码(); aa.Show(); private void 出货管理_Click(object sender, EventArgs e) 删除采购 aa = new 删除采购(); aa.Show(); private void 进货管理_Click(object sender, EventArgs e) 添加 aa = new 添加(); aa.Show(); pr

12、ivate void button1_Click(object sender, EventArgs e) 修改采购 aa = new 修改采购(); aa.Show(); private void button2_Click(object sender, EventArgs e) 查询采购 aa = new 查询采购(); aa.Show(); private void button3_Click(object sender, EventArgs e) 入库 aa = new 入库(); aa.Show(); private void button4_Click(object sender,

13、EventArgs e) 出库 aa = new 出库); aa.Show(); private void button5_Click(object sender, EventArgs e) 库存信息查询 aa = new 库存信息查询(); aa.Show(); private void button6_Click(object sender, EventArgs e) 用户登录 aa = new 用户登录(); aa.Show(); this.Hide(); 经理管理模块using System;using System.Collections.Generic;using System.C

14、omponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace jinxiaocunSystem public partial class Form4 : Form public Form4() InitializeComponent(); private void 信息查询_Click(object sender, EventArgs e) 查询采购 aa = new 查询采购(); aa.Show();

15、private void 修改密_Click(object sender, EventArgs e) 修改密码 aa = new 修改密码(); aa.Show(); private void button3_Click(object sender, EventArgs e) 用户登录 aa = new 用户登录(); aa.Show(); this.Hide(); private void button1_Click(object sender, EventArgs e) 库存查询 aa = new 库存查询(); aa.Show(); 系统管理模块using System;using Sy

16、stem.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace jinxiaocunSystem public partial class Form1 : Form public Form1() InitializeComponent(); private void 退出系统_Click(object sender, EventAr

17、gs e) 用户登录 aa = new 用户登录(); aa.Show(); this.Hide(); private void button1_Click(object sender, EventArgs e) 系统管理 aa = new 系统管理(); aa.Show(); private void button3_Click(object sender, EventArgs e) 查询采购 aa = new 查询采购(); aa.Show(); private void button4_Click(object sender, EventArgs e) 库存查询 aa = new 库存查

18、询(); aa.Show(); private void button2_Click(object sender, EventArgs e) 修改密码系统_管理员_ aa = new 修改密码_系统管理员_(); aa.Show(); 修改密码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;

19、using System.Windows.Forms;using System.Configuration;using System.Data.SqlClient;namespace jinxiaocunSystem public partial class 修改密码 : Form private string strcon = ConfigurationManager.ConnectionStringsDbLink.ToString(); public 修改密码() InitializeComponent(); private void 确认_Click(object sender, Eve

20、ntArgs e) if (textBox1.Text.Trim() = textBox2.Text.Trim() SqlConnection connection = new SqlConnection(strcon); connection.Open(); String strsql1 = select count(*) from Enterlable where usenumber= + textBox3.Text.Trim() + and password= + textBox4.Text.Trim() + ; SqlCommand cmd1 = new SqlCommand(strs

21、ql1, connection); int i = (int)cmd1.ExecuteScalar(); if(i0) string strsql = update EnterLable set password = + textBox1.Text.Trim() + where usenumber= + textBox3.Text.Trim() + ; SqlCommand cmd = new SqlCommand(strsql, connection); int iresult = cmd.ExecuteNonQuery(); if (iresult 0) MessageBox.Show(信

22、息更改成功); connection.Close(); else MessageBox.Show(信息更改失败); connection.Close(); else MessageBox.Show(旧密码?输?入?错洙?误); connection.Close(); else MessageBox.Show(两次密码不一样,请重新输入, 错误提示, MessageBoxButtons.OKCancel, MessageBoxIcon.Stop); return; private void 取消_Click(object sender, EventArgs e) Form4 aa = new F

23、orm4(); aa.Show(); This.Hide(); 修改采购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.SqlClient;using System.Configuration;namespace jinxiaocunSystem public

24、 partial class 修改采购: Form private string strcon = ConfigurationManager.ConnectionStringsDbLink.ToString(); public 修改采购() InitializeComponent(); private void 修改采购_Load(object sender, EventArgs e) this.gRNTableAdapter.Fill(this.jinxiaocunSystemDataSet2.GRN); private void button1_Click(object sender, E

25、ventArgs e) SqlConnection connection = new SqlConnection(strcon); connection.Open(); if (connection.State.ToString() = Open) if (textBox1.Text != & textBox2.Text != & textBox3.Text != & textBox4.Text != & textBox5.Text != & textBox6.Text != & textBox7.Text != & textBox8.Text != ) string strsql = upd

26、ate GRN set Credentialsnumber= + textBox1.Text.Trim() + ,CKnumber= + textBox2.Text.Trim() + ,Goodsnumber= + textBox3.Text.Trim() + ,Goodnumber= + textBox4.Text.Trim() + ,Inunit= + textBox5.Text.Trim() + ,Incktime= + textBox6.Text.Trim() + ,Makingpeople= + textBox7.Text.Trim() + ,Purchasingpeople= +

27、textBox8.Text.Trim() + where Credentialsnumber= + textBox1.Text.Trim() + ; SqlCommand cmda = new SqlCommand(strsql, connection); int iresult = cmda.ExecuteNonQuery(); if (iresult 0) MessageBox.Show(修改信息成功); this.gRNTableAdapter.Fill(this.jinxiaocunSystemDataSet2.GRN); else MessageBox.Show(修改信息失骸败, 错

28、误提示, MessageBoxButtons.OKCancel, MessageBoxIcon.Stop); return; else MessageBox.Show(修改信息不能为空?, 错误提示, MessageBoxButtons.OKCancel, MessageBoxIcon.Stop); return; connection.Close(); private void button2_Click(object sender, EventArgs e) textBox1.Text = null; textBox2.Text = null; textBox3.Text = null; textBox4.Text = null; textBox5.Text = null; textBox6.Text = null; textBox7.Text = null; textBox8.Text = null; 添加采购using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using Sy

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1