بسم الله الرحمن الرحيم
السلام عليكم ورحمة الله وبركاته
كيف لي ان احدث بيانات الداتا جريد فيو، بعد ان تتم عملية الاضافة.
Private db As New DB.Data_BedaDataContext
Private Sub btn_Exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Exit.Click
Me.Close()
End Sub
Public Sub _AddingNew(ByVal Tab As DB.Beda)
db.Bedas.InsertOnSubmit(Tab)
db.SubmitChanges()
End Sub
Sub Broom()
For Each c As Control In Me.Controls
If TypeOf c Is TextBox Then
c.Text = vbNullString
End If
Next
End Sub
Private Sub btn_Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Save.Click
Dim mabee, shra As Integer
Try
Dim Tabl As DB.Beda = New DB.Beda
With Tabl
.Beda_Name = txt_beda.Text
.Beda_Note = txt_Note.Text
If Integer.TryParse(txt_Mabee.Text, mabee) Then
.Mabee_Price = mabee
Else
.Mabee_Price = 0
End If
If Integer.TryParse(txt_shra.Text, shra) Then
.Shra_Price = shra
Else
.Shra_Price = 0
End If
End With
_AddingNew(Tabl)
MessageBox.Show("Saved Successfull >>>>> ", "Saved", MessageBoxButtons.OK, MessageBoxIcon.Information)
Broom()
Catch ex As Exception
End Try
Beda_List_frm.DGV.Refresh()
End Subحيث اضفت الكود التالي
Beda_List_frm.DGV.Refresh()
الا ان الداتا جريد فيو لا يتم تحديثها
ارجو المساعدة
والف الف شكر