Hi guys
I am designing a simple windows form application using typed datasets. My requirement is to assign a sequential value from a database SEQUENCE to one of the textboxes available with the form while default navigator "Save" button is clicked. My Database level Sequence name is "OrderHeader_seq"
My current .vb code as attached
Please help
Regards,
raj
I am designing a simple windows form application using typed datasets. My requirement is to assign a sequential value from a database SEQUENCE to one of the textboxes available with the form while default navigator "Save" button is clicked. My Database level Sequence name is "OrderHeader_seq"
My current .vb code as attached
VB.NET:
Public Class Form1
Dim Header_Id As Integer
Private Sub OrdersBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles OrdersBindingNavigatorSaveItem.Click
' I want to replace the below static assignment with dynamic values generated from database level Sequences
' If Me.Header_idTextBox.Text = "" Then
' Me.Header_idTextBox.Text = 1000
' End If
Me.Validate()
Me.OrdersBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.POSDataSet)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim Conn As String = My.Settings.POSConnectionString
MsgBox(Conn)
Me.OrdersBindingSource.AddNew()
End Sub
Private Sub Order_DetailsDataGridView_Enter(sender As Object, e As EventArgs) Handles Order_DetailsDataGridView.Enter
If Me.Header_idTextBox.Text = "" Then
MsgBox("Nothing here")
End If
End Sub
End Class
Please help
Regards,
raj