0% found this document useful (0 votes)
30 views1 page

Secondform

Uploaded by

api-250722697
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Secondform

Uploaded by

api-250722697
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Public Class addForm

Private Sub returnButton_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles returnButton.Click
'close second form
Close()
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ExitToolStripMenuItem.Click
'close second form. Identical to return button
Close()
End Sub

Private Sub addButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addButton.Click, AddToolStripMenuItem.Click
Dim partNum As String = partNumTextBox.Text
Dim partDescription As String = nameTextBox.Text
Dim partPrice As Single = CSng(priceTextBox.Text)
Dim theProduct As New Product

'use object to write new product to file
theProduct.writeProduct(partNum, partDescription, partPrice)
End Sub
End Class

You might also like