2 listbox to exchange value with DBML
Posted
by Garcia Julien
on Stack Overflow
See other posts from Stack Overflow
or by Garcia Julien
Published on 2010-04-08T07:00:51Z
Indexed on
2010/04/08
7:03 UTC
Read the original article
Hit count: 480
Hi, i'have two Listbox. the think is i do the transfert like : click on field in the left listbox, hit "move right" button and it wll display in the right list box.' The other think it's the first Listbox is bind on Dataset and the second on Entity (Linq-to sql). So when i click on the move next i do that :
Dim newSite As New List(Of vw_SiteList)
For Each row As SitesDataset.FDDSTRow In SiteAdsListBox.SelectedItems
newSite.Add(New vw_SiteList With { _
.SITECODE = row.DEST_COD, _
.SiteDisplay = row.SiteDisplay, _
.CREATEDBY = Environment.GetEnvironmentVariable("USERNAM"), _
.DATECREATED = Now _
})
Next
JCDataContext.vw_SiteLists.InsertAllOnSubmit(NewSite)
I would like to see now the new field in the right listbox but it isn't there because the field itr's not yet added in the database.
How can i do that?
Thanks
Ju
© Stack Overflow or respective owner