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() + ")";
- 上一篇:Flash CS4三维游戏设计(赛车)
- 下一篇:C#+sqlserver学生MIS平台的设计与开发
-
-
-
-
-
-
-
乳业同业并购式全产业链...
河岸冲刷和泥沙淤积的监测国内外研究现状
电站锅炉暖风器设计任务书
酸性水汽提装置总汽提塔设计+CAD图纸
大众媒体对公共政策制定的影响
当代大学生慈善意识研究+文献综述
java+mysql车辆管理系统的设计+源代码
杂拟谷盗体内共生菌沃尔...
中考体育项目与体育教学合理结合的研究
十二层带中心支撑钢结构...