23-04-13, 04:20 AM
هذا الكود يقوم بالحفظ والتحديث واصلاح الاخطاء إن وجدت
Try
()Me.Validate
()Me.TABLE1BindingSource.EndEdit
(Me.TableAdapterManager.UpdateAll(Me.DATABASE1DataSet
Catch DbconExp As System.Data.DBConcurrencyException
Try
(Console.WriteLine("Fixing Concurrency Error..."r
()Me.Validate
()Me.TABLE1BindingSource.EndEdit
(Me.TABLE1TableAdapter.Update(Me.DATABASE1DataSet
(Me.TableAdapterManager.UpdateAll(Me.DATABASE1DataSet
Catch ex As Exception
(MsgBox(ex.Message
End Try
Catch ex As Exception
(MsgBox(ex.Message
End Try
()Me.TABLE1BindingSource.AddNew
Try
()Me.Validate
()Me.TABLE1BindingSource.EndEdit
(Me.TableAdapterManager.UpdateAll(Me.DATABASE1DataSet
Catch DbconExp As System.Data.DBConcurrencyException
Try
(Console.WriteLine("Fixing Concurrency Error..."r
()Me.Validate
()Me.TABLE1BindingSource.EndEdit
(Me.TABLE1TableAdapter.Update(Me.DATABASE1DataSet
(Me.TableAdapterManager.UpdateAll(Me.DATABASE1DataSet
Catch ex As Exception
(MsgBox(ex.Message
End Try
Catch ex As Exception
(MsgBox(ex.Message
End Try
()Me.TABLE1BindingSource.AddNew
