-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainWindow.xaml.vb
31 lines (29 loc) · 1.37 KB
/
MainWindow.xaml.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Imports XPOIssues.Issues
Imports DevExpress.Data.Filtering
Imports DevExpress.Xpo
Imports System.Linq
Imports DevExpress.Xpf.Grid
Class MainWindow
Public Sub New()
InitializeComponent()
Dim properties = New ServerViewProperty() {
New ServerViewProperty("Subject", SortDirection.None, New OperandProperty("Subject")),
New ServerViewProperty("UserId", SortDirection.None, New OperandProperty("UserId")),
New ServerViewProperty("Created", SortDirection.None, New OperandProperty("Created")),
New ServerViewProperty("Votes", SortDirection.None, New OperandProperty("Votes")),
New ServerViewProperty("Priority", SortDirection.None, New OperandProperty("Priority")),
New ServerViewProperty("Oid", SortDirection.Ascending, New OperandProperty("Oid"))
}
Dim source = New XPInstantFeedbackView(GetType(Issue), properties, Nothing)
AddHandler source.ResolveSession, Sub(o, e) e.Session = New Session()
grid.ItemsSource = source
LoadLookupData()
End Sub
Private Sub LoadLookupData()
Dim session = New Session()
usersLookup.ItemsSource = session.Query(Of User).OrderBy(Function(user) user.Oid).[Select](Function(user) New With {
.Id = user.Oid,
.Name = user.FirstName & " " + user.LastName
}).ToArray()
End Sub
End Class