예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (this.txtname.Text == "")
            {
                MessageBox.Show("未插入数据");
            }
            //添加类型
            else
            {
                string name = this.txtname.Text;

                bool count = ProductTypeBLL.insert(name);
                if (count == true)
                {
                    MessageBox.Show("添加成功");
                    this.Close();
                }
                else
                {
                    MessageBox.Show("添加失败");
                }
            }
        }