Esempio n. 1
0
        private void BT_ok_Click(object sender, EventArgs e)
        {
            if (db.GetPresetList(TB_Name.Text, 1) != null)
            {
                MessageBox.Show("名称已存在");
                return;
            }
            if (!db.AddPreset(TB_Name.Text, TB_Remark.Text))
            {
                MessageBox.Show("数据库异常");
                return;
            }



            this.Close();
        }