Click here to Skip to main content
15,868,141 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.NET DUPLICATE SCREEN SHARING PROBLEM Pin
CHill6013-Dec-15 8:15
mveCHill6013-Dec-15 8:15 
GeneralRe: VB.NET DUPLICATE SCREEN SHARING PROBLEM Pin
Steve Roseik20-Dec-15 7:31
Steve Roseik20-Dec-15 7:31 
QuestionUsing Await Pin
jkirkerx10-Dec-15 14:02
professionaljkirkerx10-Dec-15 14:02 
AnswerRe: Using Await Pin
CHill6012-Dec-15 4:02
mveCHill6012-Dec-15 4:02 
GeneralRe: Using Await Pin
jkirkerx12-Dec-15 13:57
professionaljkirkerx12-Dec-15 13:57 
GeneralRe: Using Await Pin
CHill6013-Dec-15 2:35
mveCHill6013-Dec-15 2:35 
AnswerWell here's what I ended up with Pin
jkirkerx13-Dec-15 12:30
professionaljkirkerx13-Dec-15 12:30 
QuestionLINQ group By Pin
byka8-Dec-15 4:58
byka8-Dec-15 4:58 
I am using LINQ to group by however after group By I need to create a new table with data...

I am using Dataview to get all data

VB
Dim vDependent As DataView = myDataTable.DefaultView
                          vDependent.RowFilter = "EEGRP ='" & item.EEGRP & "' AND EESSN ='" & item.EESSN & "'"


Is there is a better way to do this?

VB
Dim data = myDataTable.AsEnumerable().GroupBy(Function(r) New With {Key .EEGRP = r.Field(Of String)("EEGRP"), Key .EESSN = r.Field(Of String)("EESSN"), _                                                                                          Key .DEDENF = r.Field(Of String)("DEDENF"), Key .DEDENM = r.Field(Of String)("DEDENM"), _
                                                                                          Key .DEDREL = r.Field(Of String)("DEDREL")},
                      Function(key, rows) New With
                      {
                          Key .EEGRP = key.EEGRP,
                          Key .EESSN = key.EESSN,
                          Key .DEDENF = key.DEDENF,
                          Key .DEDENM = key.DEDENM,
                          Key .DEDREL = key.DEDREL,
                              .Dates = rows.Select(Function(r) DateFromStringParts( _
                                                      r.Field(Of String)("DEIBCY"), _
                                                      r.Field(Of String)("DEIBYR"), _
                                                      r.Field(Of String)("DEIBMT"), _
                                                      r.Field(Of String)("DEIBDY"))).OrderByDescending(Function(d) d).Take(3).ToList()}
                      )

                       'Create new table with original table schema
                      Dim result As New DataTable
                      result = myDataTable.Clone()
                      For Each item In data
                          Dim vDependent As DataView = myDataTable.DefaultView
                          vDependent.RowFilter = "EEGRP ='" & item.EEGRP & "' AND EESSN ='" & item.EESSN & "'"
                          ' item.Dates.ElementAtOrDefault(1), item.Dates.ElementAtOrDefault(2))
                          Dim newRow As DataRow = result.NewRow()
                          newRow("EEGRP") = vDependent(0)("EEGRP")...

QuestionBuild this as a separate project within the project Pin
jkirkerx7-Dec-15 11:18
professionaljkirkerx7-Dec-15 11:18 
AnswerRe: Build this as a separate project within the project Pin
Wombaticus7-Dec-15 11:33
Wombaticus7-Dec-15 11:33 
GeneralRe: Build this as a separate project within the project Pin
jkirkerx7-Dec-15 11:59
professionaljkirkerx7-Dec-15 11:59 
GeneralRe: Build this as a separate project within the project Pin
Wombaticus7-Dec-15 12:08
Wombaticus7-Dec-15 12:08 
GeneralRe: Build this as a separate project within the project Pin
jkirkerx8-Dec-15 12:30
professionaljkirkerx8-Dec-15 12:30 
QuestionPrinting in Visual Studio 2015 Pin
DelboyKent5-Dec-15 5:29
DelboyKent5-Dec-15 5:29 
AnswerRe: Printing in Visual Studio 2015 Pin
Dave Kreskowiak5-Dec-15 6:35
mveDave Kreskowiak5-Dec-15 6:35 
Questionftp/tcp for Windows CE 5.0 Pin
tclacla4-Dec-15 10:27
tclacla4-Dec-15 10:27 
AnswerRe: ftp/tcp for Windows CE 5.0 Pin
Garth J Lancaster4-Dec-15 12:01
professionalGarth J Lancaster4-Dec-15 12:01 
Questionhelp with linq query Pin
byka4-Dec-15 2:56
byka4-Dec-15 2:56 
AnswerRe: help with linq query Pin
Richard Deeming4-Dec-15 4:15
mveRichard Deeming4-Dec-15 4:15 
GeneralRe: help with linq query Pin
byka4-Dec-15 5:07
byka4-Dec-15 5:07 
GeneralRe: help with linq query Pin
Richard Deeming4-Dec-15 5:12
mveRichard Deeming4-Dec-15 5:12 
GeneralRe: help with linq query Pin
Garth J Lancaster4-Dec-15 11:58
professionalGarth J Lancaster4-Dec-15 11:58 
QuestionHiding Buttons based on ListView items (WinForm) Pin
dell-gl62m1-Dec-15 20:08
dell-gl62m1-Dec-15 20:08 
SuggestionRe: Hiding Buttons based on ListView items (WinForm) Pin
Richard MacCutchan1-Dec-15 22:07
mveRichard MacCutchan1-Dec-15 22:07 
QuestionCopy .exe file to desktop Pin
dell-gl62m29-Nov-15 15:24
dell-gl62m29-Nov-15 15:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.