Dim lst As WinForm.ListBox
lst = e.Form.Controls("ListBox1")
Dim cmd As New SQLCommand
cmd.C
For i As Integer = 0 To lst.Items.Count - 1
cmd.CommandText = "Insert Into 党员慰问记录表(党员编号,姓名) values (\'" & lst.Items(i) & "\')"
cmd.ExecuteNonQuery()
Next
Messagebox.Show("保存成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)