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平台的设计与开发

电子政务建设与民营企业...

對中小型企业实施CRM的探讨【2032字】

信息系统与企业竞争战略评析【1553字】

ERP技术发展的现状趋势及...

ERP中的物流模块研究【2721字】

数据挖掘技术:企业网络...

县级供电企业光纤通信工程建设方案【997字】

中国学术生态细节考察《...

AT89C52单片机的超声波测距...

C#学校科研管理系统的设计

志愿者活动的调查问卷表

神经外科重症监护病房患...

10万元能开儿童乐园吗,我...

国内外图像分割技术研究现状

承德市事业单位档案管理...

医院财务风险因素分析及管理措施【2367字】

公寓空调设计任务书