MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Private Sub CreateProperty() Dim DB As New GHSDB.GHSDataContext Dim Listing As New GHSDB.Property Listing.Address1 = Me.Address1.Text Listing.Address2 = Me.Address2.Text Listing.City = Me.City.Text Listing.County = Me.State.Text Listing.Country = Me.Country.SelectedValue Listing.Postcode = Me.Zipcode.Text Listing.Property_ID = DB.Properties. Listing.Rooms = Me.Rooms.SelectedValue Listing.Bedrooms = Me.Bedrooms.SelectedValue 'For Each X As RepeaterItem In FeatureRepeater.Items 'Next If _Photos IsNot Nothing Then Dim P As GHSDB.Image For Each Photo In _Photos P = New GHSDB.Image P.Description = Photo.Description P.OriginalName = Photo.OriginalFilename P.Title = Photo.Title P.Path = Photo.Filename P.Active = True P.Property_ID = Listing.Property_ID Listing.Images.Add(P) Next End If If _Videos IsNot Nothing Then Dim V As GHSDB.Image For Each Video In _Videos V = New GHSDB.Image V.Description = Video.Description V.OriginalName = Video.OriginalFilename V.Title = Video.Title V.Path = Video.Filename V.Active = False V.Property_ID = Listing.Property_ID Listing.Images.Add(V) Next End If DB.Properties.InsertOnSubmit(Listing) DB.SubmitChanges() End Sub