Ejemplo n.º 1
0
        private void btn_deleteRecord_Click(object sender, EventArgs e)
        {
            DBOperation   bf      = new DBOperation();
            cIC_Card_Data ic_data = new cIC_Card_Data();

            ic_data.IC_ID = this.IC_ID;

            DataBase data = new DataBase();//创建DataBase类的对象
            DataSet  ds   = data.getDs("select * from tb_ICCard_Data", "tb_Data");

            form1.dgv_IcData.DataSource = ds.Tables[0];


            if (bf.Delete_IcData(ic_data) == 1)
            {
                MessageBox.Show("delete ok");
            }
            else
            {
                MessageBox.Show("delete error");
            }
        }