For Each r In value
c = New Dynamic_Database.Dynamic_lstCommand
c.CmdText = FixParaName(s.ToString(), "@") ' Dynamic Parameter --> MSSQL used @, Oracle used :, OleDb used ?, etc
c.CmdParameter = New List(Of Parameter) From {
New Parameter() With {.Name = FixParaName("@BranchID", "@"), .DefaultValue = r.BranchID},
New Parameter() With {.Name = FixParaName("@sysID", "@"), .DefaultValue = r.sysID},
New Parameter() With {.Name = FixParaName("@MenuID", "@"), .DefaultValue = r.MenuID},
New Parameter() With {.Name = FixParaName("@ErrorAction", "@"), .DefaultValue = r.ErrorAction},
New Parameter() With {.Name = FixParaName("@ErrorDescription", "@"), .DefaultValue = r.ErrorDescription},
New Parameter() With {.Name = FixParaName("@ErrorDateTime", "@"), .DefaultValue = r.ErrorDateTime},
New Parameter() With {.Name = FixParaName("@ErrorUserID", "@"), .DefaultValue = r.ErrorUserID},
New Parameter() With {.Name = FixParaName("@ErrorIPAddress", "@"), .DefaultValue = r.ErrorIPAddress}
}
lstCmd.Add(c)
Next
Date :
2013-04-02 21:56:03
By :
ผ่านมา
No. 5
Guest
Code (VB.NET)
'***** Deserializable *****
<Serializable()>
Public Class dynErrorLog 'DynamicErrorLog
Sub New()
End Sub
Public Property ErrorID As Integer 'Auto Number
Public Property BranchID As Integer
Public Property sysID As Integer 'Main System
Public Property MenuID As Integer 'MenuID = PageID
Public Property ErrorAction As String 'U, I, D, V = View, P = Print, A = Approve, L = Login
Public Property ErrorDescription As String 'varchar(MAX)
Public Property ErrorDateTime As DateTime
Public Property ErrorUserID As Integer
Public Property ErrorIPAddress As String 'Suport IPV6 Max length 39 charactor
End Class