Guest User

Untitled

a guest
Jan 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. Public Overridable Function Save(ByVal UpdateUserID As Integer) As Integer
  2. Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("mcle").ToString())
  3.  
  4. Try
  5. conn.Open()
  6. Return Save(conn, UpdateUserID)
  7. Finally
  8. conn.Close()
  9. End Try
  10. End Function
  11.  
  12. Public Overridable Function Save(ByVal conn As SqlConnection, ByVal UpdateUserID As Integer) As Integer
  13. If Me.activityID <> 0 Then
  14. Return SaveAct(conn, UpdateUserID)
  15. Else
  16. Return AddAct(conn, UpdateUserID)
  17. End If
  18. End Function
  19.  
  20. Public Overridable Function Save(ByVal UpdateUserID As Integer) As Integer
  21. Using cn As SqlConnection = GetConnection()
  22. If Me.activityID <> 0 Then
  23. Return SaveAct(conn, UpdateUserID)
  24. Else
  25. Return AddAct(conn, UpdateUserID)
  26. End If
  27. End Using
  28. End Function
Add Comment
Please, Sign In to add comment