0
나는 꽤 많은 C#에서 엔티티 프레임 워크를 사용하고 거기에 무엇을 해야할지,하지만 어떻게 내가 내 목록에있는 항목에 액세스 할 한 :VB에서 # 엔티티 개체에 액세스하는 방법을 이해하지 못합니까?
txtboxOrderNunber.Text=records.ordernumber
: 나는이 작업을 수행 할 수 있도록
Dim records As List(Of R3Delivery)
records = threeContext.GetAllDeliverysByRecordId(41)
이것은 내가 위의 방법 덕분를 사용하여 업데이트를 절약 할 방법도 제 기능
Function GetAllDeliverysByRecordId(ByVal recorId As Int16) As List(Of R3Delivery)
Dim retVal As New List(Of R3Delivery)
retVal = (From u In dbContext.R3Delivery Where u.r3DeliveryId = recorId Select u).ToList()
Return retVal
End Function
된다. saveedit
records.Item(0).qty = txtQty.Text
records.Item(0).isDelivered = chkNotDelivered.Checked
Try
threeContext.dbContext.SaveChanges()
MessageBox.Show("Changes saved to the database.")
Close()
정확하게 C#에서와 같은 방식으로 저장합니다. – Styxxy
@Styxxy 내 저장보기 자신의 저장을 수정하지만 gridview 창을 닫을 때까지 내 gridview를 새로 고치지 않습니다. – rogue39nin
@Styxxy 여기에 다른 stitack이 있습니다 [link] http://stackoverflow.com/questions/23011805/grid-only -updating-main-gridwindow-is-closed? noredirect = 1 # comment35149313_23011805 – rogue39nin