forked from DevExpress-Examples/out-of-maintenance-XPO_tutorial-1-your-first-data-aware-application-with-xpo-e4555
-
Notifications
You must be signed in to change notification settings - Fork 0
/
XtraForm1.vb
35 lines (32 loc) · 880 Bytes
/
XtraForm1.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
32
33
34
35
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Imports DevExpress.XtraEditors
Imports DevExpress.Xpo
Imports XpoTutorial1.DataModel
Namespace XpoTutorial1
Partial Public Class XtraForm1
Inherits DevExpress.XtraEditors.XtraForm
Public Sub New()
InitializeComponent()
End Sub
Private Sub XtraForm1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If xpCollection1.Count = 0 Then
Dim customer1 = New Customer(session1)
customer1.Name = "John"
customer1.Age = 21
customer1.Save()
xpCollection1.Add(customer1)
Dim customer2 = New Customer(session1)
customer2.Name = "Bob"
customer2.Age = 37
customer2.Save()
xpCollection1.Add(customer2)
End If
End Sub
End Class
End Namespace