【正文】
adapter As sqlstr2 = select * from 項(xiàng)目表 where 項(xiàng)目 id like 39。 adapter = New (sqlstr2, myconn) (table1) = (0).Item(0) = (0).Item(1) = (0).Item(2) = (0).Item(3) = (0).Item(4) = (0).Item(5) = (0).Item(6) = (0).Item(7) = (0).Item(8) 40 End Sub Private Sub MenuItem3_Click(ByVal sender As , ByVal e As ) Handles xmid1 = () () End Sub Private Sub MenuItem4_Click(ByVal sender As , ByVal e As ) Handles xmid1 = () () End Sub Private Sub MenuItem5_Click(ByVal sender As , ByVal e As ) Handles xmid1 = () () End Sub Private Sub MenuItem6_Click(ByVal sender As , ByVal e As ) Handles () () End Sub Private Sub MenuItem7_Click(ByVal sender As , ByVal e As ) Handles () () End Sub Private Sub MenuItem1_Click(ByVal sender As , ByVal e As ) Handles khid = kh = 0 () () End Sub Private Sub MenuItem2_Click(ByVal sender As , ByVal e As ) Handles fzid = fz = 0 41 () () End Sub Private Sub Button7_Click(ByVal sender As , ByVal e As ) Handles Dim sql As String = delete from 項(xiàng)目表 where 項(xiàng)目 id like 39。 Dim mycmd As New (sql, myconn) () Try () Catch ex As Exception MsgBox() End Try () = = = = = = = = = = True mm = 0 End Sub Private Sub Button1_Click(ByVal sender As , ByVal e As ) Handles = = = = = = = = = mm = 1 = True End Sub Private Sub Button6_Click(ByVal sender As , ByVal e As 42 ) Handles If mm = 1 Then Dim sql As String = insert into 項(xiàng)目表 values(39。,39。,39。, amp。 amp。 amp。 amp。 amp。 amp。 amp。 amp。 amp。 ,客戶 id=39。,項(xiàng)目負(fù)責(zé)人 id=39。,項(xiàng)目開始日期 =39。,項(xiàng)目結(jié)束日期 =39。,項(xiàng)目說明 =39。 where 項(xiàng)目 id= 39。 Dim mycmd As New (sql, myconn) () Try () Catch ex As Exception MsgBox() End Try () Else End If () Dim sql1 As String = select distinct 項(xiàng)目 id from 項(xiàng)目表 Dim cmd As New (sql1, myconn) Dim reader As () reader = () Do While ((0)) Loop () () = False 43 End Sub Private Sub Button5_Click_1(ByVal sender As , ByVal e As ) Handles nn = mm = 2 = True End Sub Private Sub Form1_Activated(ByVal sender As Object, ByVal e As ) Handles Dim sql1 As String Dim table1 As New DataTable Dim adapter As If xm = 0 Then sql1 = select * from 項(xiàng)目表 ElseIf xm = 1 Then sql1 = select * from 項(xiàng)目表 where 項(xiàng)目 id like39。 Else sql1 = select * from 項(xiàng)目表 where 項(xiàng)目 id like39。 End If adapter = New (sql1, myconn) (table1) = (0).Item(0) = (0).Item(1) = (0).Item(2) = (0).Item(3) = (0).Item(4) = (0).Item(5) = (0).Item(6)。 xmid amp。 xmid amp。 nn amp。 amp。 amp。 amp。 amp。 amp。,項(xiàng)目金額 = amp。,所在地 =39。,項(xiàng)目 id=39。) Dim mycmd As New (sql, myconn) () Try () Catch ex As Exception MsgBox() End Try () ElseIf mm = 2 Then Dim sql As String = update 項(xiàng)目表 set 項(xiàng)目名稱 = 39。,39。,39。,39。,39。 ,39。 amp。 amp。 amp。 Trim() amp。 Trim() amp。data source=SH\A。 amp。 Dim myconn As New (initial catalog =工程項(xiàng)目管理 。存儲(chǔ)過程的使用 Private Sub Button2_Click(ByVal sender As , ByVal e As ) Handles i = Dim sql As String Dim table1 As New 38 sql = select * from 項(xiàng)目表 where 客戶 ID like 39。data source =SH\A。 amp。 TO 項(xiàng)目表: Public Class 客戶 to項(xiàng)目 Inherits Dim myconn As New (initial catalog =工程項(xiàng)目管理 。 fzid1 amp。data source =SH\A。 amp。 Dim myconn As New (initial catalog =工程項(xiàng)目管理 。) Dim myadapter As Dim mydataset As New DataSet Dim i As Integer Private Sub 負(fù)責(zé)人 to項(xiàng)目 _Load(ByVal sender As , ByVal e As ) Handles Dim sql2 As String sql2 = select distinct 項(xiàng)目負(fù)責(zé)人 ID from 項(xiàng)目負(fù)責(zé)人表 Dim mycmd As New (sql2, myconn) Dim reader As () reader = () Do While ((0)) Loop () () End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As , ByVal e As ) Handles Dim sql As String Dim table1 As New sql = select * from 項(xiàng)目表 where 項(xiàng)目負(fù)責(zé)人 ID like 39。 39。 Dim mycmd As New (sql, myconn) () Try () Catch ex As Exception MsgBox() End Try 34 () Else End If () Dim sql4 As String = select distinct 項(xiàng)目負(fù)責(zé)人 id from 項(xiàng)目負(fù)責(zé)人表 Dim cmd As New (sql4, myconn) Dim reader As () reader = () Do While ((0)) Loop () () = False End Sub 39。 where 項(xiàng)目負(fù)責(zé)人 id= 39。,地址 =39。,電話 =39。,職務(wù) =39。,項(xiàng)目負(fù)責(zé)人 id=39。) Dim mycmd As New (sql, myconn) ()