private void button1_Click(object sender, EventArgs e)
        {
            DataSet ds = new DataSet();

            ds = Merchandise.SearchByName(Datebass.user_ifms.ID, textBox2.Text);
            dataGridView1.DataSource = ds;
            dataGridView1.DataMember = "merchandise";
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox2.Text == String.Empty)  //输入不能为空
            {
                MessageBox.Show("输入不能为空!");
                return;
            }
            DataSet ds = new DataSet();

            ds = Merchandise.SearchByName(Datebass.user_ifms.ID, textBox2.Text);
            dataGridView1.DataSource = ds;
            dataGridView1.DataMember = "merchandise";
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == string.Empty ||
                textBox3.Text == string.Empty ||
                textBox4.Text == string.Empty ||
                textBox5.Text == string.Empty)
            {
                MessageBox.Show("输入不能为空!");
                return;
            }
            Merchandise a = new Merchandise();

            if (Merchandise.IsAnEntryExist(Datebass.user_ifms.ID, textBox5.Text, textBox3.Text, textBox4.Text) == false)
            {
                MessageBox.Show("输入有误,不存在该货物表项!");
                return;
            }
            if (Merchandise.IsMerchandiseEnough(Datebass.user_ifms.ID, textBox5.Text, textBox3.Text, textBox4.Text, Convert.ToDouble(textBox1.Text)) < 0)
            {
                MessageBox.Show("货物剩余量不足!");
                return;
            }
            if (a.PickUpMerchandise(Datebass.user_ifms.ID, textBox5.Text, textBox3.Text, textBox4.Text, Convert.ToDouble(textBox1.Text)))
            {
                MessageBox.Show("取货成功!");
                string name = a.GetName(Datebass.user_ifms.ID, textBox5.Text, textBox3.Text, textBox4.Text);
                textBox2.Text = name;
                DataSet ds = new DataSet();
                ds = Merchandise.SearchByName(Datebass.user_ifms.ID, name);
                dataGridView1.DataSource = ds;
                dataGridView1.DataMember = "merchandise";
                return;
            }
            else
            {
                MessageBox.Show("取货失败!");
                return;
            }
        }