Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function GetTypeFromTableName(ByVal _TableName As String, ByVal _DataContext As DataContext)
- Dim Mytype As Type = (From t In _DataContext.Mapping.GetTables Where t.TableName = "dbo." + _TableName Select t.RowType.Type).SingleOrDefault
- Return Mytype
- End Function
- Dim DBA As New LINQDataContext
- _TBLName="City"
- TableType = GetTypeFromTableName(_TBLName, DBA)
- Dim GridQuery = From T In DBA.GetTable(TableType) Select T
- If Chk.Checked Then
- CallByName(obj, "CName", CallType.Set, Txt_Name.Text)
- GridQuery = From T In DBA.GetTable(TableType) Where T Like obj
- End If
Add Comment
Please, Sign In to add comment