1、.ToString(); public 用户登录() InitializeComponent(); private void button1_Click(object sender, EventArgs e)/登录 Common.Name = this.textBox1.Text; string usernumber = textBox1.Text.Trim(); string passward = textBox2.Text.Trim(); int p = 0; int q = 0; SqlConnection connection = new SqlConnection(strcon);
2、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); for (int i = 0; i ds.Tables0.Rows.Count; i+) if (Convert.ToInt32(ds.Tables0.RowsiproductShu) 1000) q
3、 = 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= + radioButton1.Text + SqlCommand cmd = new SqlCommand(strsql, connection); int i = (int)cmd.Execu
4、teScalar(); if (i 0) Form1 aa = new Form1(); aa.Show(); this.Hide(); else MessageBox.Show(请输入登录信息, 错误提示, MessageBoxButtons.OKCancel, MessageBoxIcon.Stop); else if (radioButton2.Checked)/部门经理登录 + radioButton2.Text + Form4 aa = new Form4(); else if (radioButton3.Checked)/仓库管理员登陆 + radioButton3.Text +
5、if (p 0 | q MessageBox.Show(有 + p + 种产品不足需采购,有 + q + 种产品过多停止采购 Form2 aa = new Form2();请选择登录权限 connection.Close(); private void 用户登录_Load(object sender, EventArgs e)仓库管理员模块 public partial class Form2 : private string strcon = ConfigurationManager.ConnectionStrings public Form2() private void 修改密码_Cli
6、ck(object sender, EventArgs e) 修改密码 aa = new 修改密码(); private void 出货管理_Click(object sender, EventArgs e) 删除采购 aa = new 删除采购(); private void 进货管理_Click(object sender, EventArgs e) 添加 aa = new 添加(); private void button1_Click(object sender, EventArgs e) 修改采购 aa = new 修改采购(); private void button2_Click
7、(object sender, EventArgs e) 查询采购 aa = new 查询采购(); private void button3_Click(object sender, EventArgs e) 入库 aa = new 入库(); private void button4_Click(object sender, EventArgs e) 出库 aa = new 出库); private void button5_Click(object sender, EventArgs e) 库存信息查询 aa = new 库存信息查询(); private void button6_Cl
8、ick(object sender, EventArgs e) 用户登录 aa = new 用户登录();经理管理模块 public partial class Form4 : public Form4() private void 信息查询_Click(object sender, EventArgs e) private void 修改密_Click(object sender, EventArgs e) 库存查询 aa = new 库存查询();系统管理模块 public partial class Form1 : public Form1() private void 退出系统_Cli
9、ck(object sender, EventArgs e) 系统管理 aa = new 系统管理();private void button3_Click(object sender, EventArgs e) 修改密码系统_管理员_ aa = new 修改密码_系统管理员_();修改密码 public partial class 修改密码 : public 修改密码() private void 确认_Click(object sender, EventArgs e) if (textBox1.Text.Trim() = textBox2.Text.Trim() String strsql
10、1 = + textBox3.Text.Trim() + + textBox4.Text.Trim() + SqlCommand cmd1 = new SqlCommand(strsql1, connection); int i = (int)cmd1.ExecuteScalar(); if(i0)update EnterLable set password = where usenumber= int iresult = cmd.ExecuteNonQuery(); if (iresult 信息更改成功 else信息更改失败);旧密码?输?入?错洙?误两次密码不一样,请重新输入 return
11、; private void 取消_Click(object sender, EventArgs e) This.Hide();修改采购 public partial class 修改采购: public 修改采购() private void 修改采购_Load(object sender, EventArgs e) this.gRNTableAdapter.Fill(this.jinxiaocunSystemDataSet2.GRN); if (textBox1.Text != & textBox2.Text ! textBox3.Text ! textBox4.Text ! textBo
12、x5.Text ! textBox6.Text ! textBox7.Text ! textBox8.Text !update GRN set Credentialsnumber=,CKnumber=,Goodsnumber=,Goodnumber=,Inunit= + textBox5.Text.Trim() + ,Incktime= + textBox6.Text.Trim() + ,Makingpeople= + textBox7.Text.Trim() + ,Purchasingpeople= + textBox8.Text.Trim() + where Credentialsnumb
13、er= SqlCommand cmda = new SqlCommand(strsql, connection); int iresult = cmda.ExecuteNonQuery();修改信息成功修改信息失骸败, 修改信息不能为空? 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 Sy
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1