Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (this.listView1.SelectedItems.Count != 1)
            {
                MessageBox.Show("请选择需要修改信息的产品");
                return;
            }
            string pNo   = this.listView1.SelectedItems[0].Text.ToString();
            string pName = textBox5.Text;

            if (Productctrl.productchange(pNo, pName))
            {
                MessageBox.Show("产品信息修改成功");
            }
            else
            {
                MessageBox.Show("请输入产品名称");
            }
            button1_Click(null, null);
        }