//删除销售记录按钮事件 private void button4_Click(object sender, EventArgs e) { ClassSqlConnect del = new ClassSqlConnect(); string delItems; delItems = ("SALE" + textBox1.Text.ToString() + "," + textBox5.Text.ToString() + "," + textBox7.Text.ToString() + " "); del.Delete(delItems); delItems = ("SALE"); DataSet ds = del.Select(delItems); this.dataGridView1.DataSource = ds; this.dataGridView1.DataMember = "SALE"; del.Close(); }
//删除用户按钮事件 private void ButtonDel_Click(object sender, EventArgs e) { ClassSqlConnect del = new ClassSqlConnect(); string delItems; delItems = ("USER" + TextUID1.Text.ToString() + " "); del.Delete(delItems); delItems = ("USER"); DataSet ds = del.Select(delItems); this.DataGridView1.DataSource = ds; this.DataGridView1.DataMember = "USERS"; del.Close(); }