企业ERP管理软件采购管理申请计划子模块的设计与开发(12)
时间:2016-11-25 19:48 来源:毕业论文 作者:毕业论文 点击:次
getdata(sql); } } private void getdata(string sql) { DataSet result = new DataSet(); result = new Class1().hsggetdata(sql); if (result != null) { if (result.Tables[0].Rows.Count > 0) { int k = 0; for (k = 0; k < result.Tables[0].Rows.Count; k++) { bh.Items.Add(result.Tables[0].Rows[k]["bh"].ToString().Trim()); } } } } protected void Button1_Click(object sender, EventArgs e) { string sql; sql = "select * from kucun where bh='"+bh.SelectedItem.ToString().Trim()+"'"; DataSet result = new DataSet(); result = new Class1().hsggetdata(sql); if (result != null) { if (result.Tables[0].Rows.Count > 0) { sql = "update kucun set shuliang=shuliang+"+shuliang.Text.ToString().Trim()+" where bh='"+bh.SelectedItem.ToString().Trim()+"'"; } else { sql = "insert into kucun(bh,ggxh,dw,promc,price,shuliang,gys,rkprice) values('" + bh.SelectedItem.ToString().Trim() + "','" + ggxh.Text.ToString().Trim() + "','" + dw.Text.ToString().Trim() + "','" + promc.Text.ToString().Trim() + "'," + price.Text.ToString().Trim() + "," + shuliang.Text.ToString().Trim() + ",'" + gys.Text.ToString().Trim() + "'," + rkprice.Text.ToString().Trim() + ")"; } } int result2; result2 = new Class1().hsgexucute(sql); sql = "insert into ruku(bh,ggxh,dw,promc,price,shuliang,gys,rkprice) values('" + bh.SelectedItem.ToString().Trim() + "','" + ggxh.Text.ToString().Trim() + "','" + dw.Text.ToString().Trim() + "','" + promc.Text.ToString().Trim() + "'," + price.Text.ToString().Trim() + "," + shuliang.Text.ToString().Trim() + ",'" + gys.Text.ToString().Trim() + "'," + rkprice.Text.ToString().Trim() + ")"; (责任编辑:qin) |