예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                // validation
                if (this.selectedProduct == null)
                {
                    MessageBox.Show("请先选择一个产品!");
                    return;
                }

                添加产品 form = new 添加产品(this.selectedProduct, this);
                form.ShowDialog();
                form.SetDesktopLocation(10, 10);

                //if (proman.AltProduct(selectedProduct))
                //{
                //    MessageBox.Show("修改产品成功!");
                //    dataGridView1.DataSource = this.proman.GetAllProducts();
                //    dataGridView1.Update();
                //}
                //else
                //    MessageBox.Show("修改失败!");
            }
            catch (Exception ex) { MessageBox.Show(ex.ToString()); }
        }
예제 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            添加产品 form = new 添加产品(null, this);

            form.ShowDialog();
            form.SetDesktopLocation(10, 10);
        }