คือว่าหนูเขียน ให้ โชว์ขึ้น list Order มาเพื่อเลือกสินค้าที่เราต้องการจะสั้งซื้อนะค่ะ แต่พอ list Order ขึ้นมาได้แล้วไม่สามารถเลือกสินค้าให้ลงไปใน TextBox ที่ต้องการได้นะค่ะ รบกวนพี่ๆด้วยนะค่ะ
Option Explicit On หน้าOrder ค่ะ
Option Strict On
Imports System.Data
Imports System.Data.OleDb
Imports System.Drawing.Printing
Public Class frmOrder
Inherits System.Windows.Forms.Form
Const DATABASE_FILE As String = "C:\\Database\\Pharmacy.mdb"
Dim strConnection As String = " Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & DATABASE_FILE
Dim Conn As New OleDbConnection(strConnection)
Dim da As OleDbDataAdapter
Dim ds As DataSet = New DataSet()
Dim UseFont As New Font("MS Sans Serif", 10)
Dim prDoc As New PrintDocument()
Private prDlg As PrintDialog = New PrintDialog
Dim IsFindCompany As Boolean = False
Dim IsFindEmployee As Boolean = False
Dim IsFindProducts As Boolean = False
Dim LastID_O As String = ""
Private Sub frmOrder_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized
Windows.Forms.Cursor.Current = Cursors.WaitCursor
With Conn
If .State = ConnectionState.Open Then .Close()
.ConnectionString = strConn
.Open()
End With
Dim sqlSectionType As String = ""
sqlSectionType = "SELECT * FROM t_Product"
sqlSectionType &= " ORDER BY Product_id"
da = New OleDbDataAdapter(sqlSectionType, Conn)
da.Fill(ds, "t_Product")
lsvProductsList.Columns.Add("รหัสอุปกรณ์", 80, HorizontalAlignment.Left)
lsvProductsList.Columns.Add("ชื่ออุปกรณ์", 230, HorizontalAlignment.Left)
lsvProductsList.Columns.Add("ราคา", 70, HorizontalAlignment.Right)
lsvProductsList.Columns.Add("จำนวนสั่งซื้อ", 80, HorizontalAlignment.Right)
lsvProductsList.Columns.Add("ราคารวม", 70, HorizontalAlignment.Right)
lsvProductsList.View = View.Details
lsvProductsList.GridLines = True
txtNumber_O.Text = "0"
AddHandler prDoc.PrintPage, New PrintPageEventHandler(AddressOf Me.StringToPrint_Print)
prDoc.DocumentName = "สั่งซื้ออุปกรณ์"
prDlg.Document = prDoc
txtID_P.Focus()
Windows.Forms.Cursor.Current = Cursors.Default
End Sub
Private Sub txtID_E_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtID_E.KeyDown
If txtID_E.Text <> "" Then
If (e.KeyCode = Keys.Enter) Then
Dim sqlEmployees As String = ""
sqlEmployees = "SELECT t_Employee.Employee_id,t_Employee.Employee_name, "
sqlEmployees &= " t_Employees.Employee_id,t_Order.Employee_id"
sqlEmployees &= " FROM t_Employees,t_Order"
sqlEmployees &= " AND (t_Employees.Employee_id='" & txtID_E.Text & "')"
With Conn
If .State = ConnectionState.Open Then .Close()
.ConnectionString = strConn
.Open()
End With
If IsFindEmployee = True Then
ds.Tables("t_Employee").Clear()
End If
da.SelectCommand.CommandText = sqlEmployees
da.Fill(ds, "t_Employee")
If ds.Tables("t_Employee").Rows.Count <> 0 Then
IsFindEmployee = True
txtID_E.Text = CStr(ds.Tables("t_Employee").Rows(0).Item("Employee_id"))
txtName_E.Text = CStr(ds.Tables("t_Employee").Rows(0).Item("Employee_name"))
ClearAllProductsData()
lsvProductsList.Items.Clear()
txtID_P.Focus()
Else
IsFindEmployee = False
MessageBox.Show("รายชื่อพนักงานที่คุณระบุ ไม่มี !!!", "ผลการตรวจสอบ", MessageBoxButtons.OK, MessageBoxIcon.Information)
rEmployee_id = ""
rEmployee_name = ""
txtName_E.Text = ""
txtID_E.Focus()
txtID_E.SelectAll()
End If
End If
End If
End Sub
Private Sub btnShowListEmp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowListEmp.Click
If txtID_P.Text = "" Then
MessageBox.Show("กรุณาป้อนข้อมูลสินค้าก่อน !!!", "ผลการตรวจสอบ", MessageBoxButtons.OK, MessageBoxIcon.Information)
txtID_P.Focus()
Exit Sub
End If
Dim fAllEmp As New frmListAllEmployees
fAllEmp.ShowDialog(Me)
txtID_E.Text = rEmployee_id
txtName_E.Text = rEmployee_name
rEmployee_id = ""
rEmployee_name = ""
txtID_E.Enabled = True
ClearAllProductsData()
lsvProductsList.Items.Clear()
txtID_P.Focus()
End Sub
Private Sub ClearAllEmployeesData()
txtName_E.Text = ""
End Sub
Private Sub txtID_P_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtID_P.KeyDown
If txtID_P.Text <> "" Then
If (e.KeyCode = Keys.Enter) Then
Dim sqlProducts As String = ""
sqlProducts = "SELECT t_Product.Product_id, t_Product.Product_name,t_Product.Product_Price,"
sqlProducts &= " FROM t_Product,"
sqlProducts &= " AND (t_Products.ID_P='" & txtID_P.Text & "')"
If IsFindProducts = True Then
ds.Tables("t_Product").Clear()
End If
da.SelectCommand.CommandText = sqlProducts
da.Fill(ds, "t_Product")
Dim AllDateRent As Integer = 0
If ds.Tables("t_Product").Rows.Count <> 0 Then
IsFindProducts = True
txtID_P.Text = CStr(ds.Tables("t_Product").Rows(0).Item("Product_id"))
txtName_P.Text = CStr(ds.Tables("t_Product").Rows(0).Item("Product_name"))
txtPriceUnit_P.Text = CStr(ds.Tables("t_Product").Rows(0).Item("Product_Price"))
txtNumber_O.Focus()
txtNumber_O.SelectAll()
Else
IsFindProducts = False
MessageBox.Show("ไม่พบรหัสอุปกรณ์ตามที่คุณระบุ !!!", "ผลการตรวจสอบ", MessageBoxButtons.OK, MessageBoxIcon.Information)
ClearAllProductsData()
txtID_P.Focus()
txtID_P.SelectAll()
End If
End If
End If
End Sub
Private Sub ClearAllProductsData()
txtID_P.Text = ""
txtName_P.Text = ""
txtPriceUnit_P.Text = ""
txtNumber_O.Text = "0"
End Sub
Private Sub btnShowListProducts_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowListProducts.Click
Dim fAllPro As New frmListAllProducts
fAllPro.ShowDialog(Me)
txtID_P.Text = rProduct_id
txtName_P.Text = rProduct_name
txtPriceUnit_P.Text = rProduct_Price.ToString()
txtNumber_O.Text = rOrder_Quantity.ToString()
rProduct_id = ""
rProduct_name = ""
rOrder_Quantity = 0
txtNumber_O.Focus()
txtNumber_O.SelectAll()
End Sub
Private Sub ClearAllData()
txtID_P.Text = ""
txtName_P.Text = ""
txtPriceUnit_P.Text = "0"
txtNumber_O.Text = "0"
'txtRemain_P.Text = ""
End Sub
Private Sub btnAddList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddList.Click
If (txtID_P.Text = "") Or (txtName_P.Text = "") Or (txtPriceUnit_P.Text = "") Or (txtNumber_O.Text = "") Then
txtID_P.Focus()
Exit Sub
End If
If (CInt(txtNumber_O.Text) = 0) Then
txtNumber_O.Focus()
Exit Sub
End If
Dim i As Integer = 0
Dim tmpID As String = ""
For i = 0 To lsvProductsList.Items.Count - 1
tmpID = lsvProductsList.Items(i).SubItems(0).Text
If txtID_P.Text = tmpID Then
MessageBox.Show("คุณเลือกรหัสอุปกรณ์ซ้ำกัน !!!", "ผลการตรวจสอบ", MessageBoxButtons.OK, MessageBoxIcon.Information)
txtID_P.Text = ""
txtName_P.Text = ""
txtPriceUnit_P.Text = "0"
txtNumber_O.Text = "0"
txtID_P.Focus()
txtID_P.SelectAll()
Exit Sub
End If
Next
Dim TotalUnit As Integer = 0
Dim lvi As ListViewItem
TotalUnit = CInt(txtPriceUnit_P.Text) * CInt(txtNumber_O.Text) '* CInt(lblBookCost.Text)
Dim anyData() As String
anyData = New String() { _
txtID_P.Text, _
txtName_P.Text, _
txtPriceUnit_P.Text, _
txtNumber_O.Text, _
TotalUnit.ToString("#,##0") _
}
lvi = New ListViewItem(anyData)
lsvProductsList.Items.Add(lvi)
CalculateOrder()
ClearAllProductsData()
txtID_P.Focus()
End Sub
Private Sub lsvProductsList_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lsvProductsList.DoubleClick
Dim i As Integer = 0
For i = 0 To lsvProductsList.SelectedItems.Count - 1
Dim lvi As ListViewItem
lvi = lsvProductsList.SelectedItems(i)
lsvProductsList.Items.Remove(lvi)
Next
CalculateOrder()
End Sub
Private Sub CalculateOrder()
Dim i As Integer = 0
Dim tmpPriceUnit_P As Integer = 0
Dim tmpNumber_O As Integer = 0
'Dim tmpAmount As Integer = 0
Dim tmpSum As Integer = 0
'Dim tmpDiscount As Integer = 0
'Dim tmpNet As Integer = 0
For i = 0 To lsvProductsList.Items.Count - 1
tmpPriceUnit_P = CInt(lsvProductsList.Items(i).SubItems(2).Text)
tmpNumber_O = CInt(lsvProductsList.Items(i).SubItems(3).Text)
'tmpAmount = CInt(lsvProductsList.Items(i).SubItems(4).Text)
tmpSum = tmpSum + (tmpPriceUnit_P * tmpNumber_O)
'tmpDiscount = tmpDiscount + CInt((tmpBookNum * tmpDateNum * tmpAmount) * rRentRateDiscount)
'tmpNet = tmpSum - tmpDiscount
Next
lblTotal.Text = tmpSum.ToString("฿ #,##0.00")
'lblDiscount.Text = tmpDiscount.ToString("#,##0.00")
'lblNet.Text = tmpNet.ToString("#,##0.00")
End Sub
Private Sub btnDeleteList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeleteList.Click
lsvProductsList.Items.Clear()
ClearAllProductsData()
lblTotal.Text = "฿ 0.00"
txtID_P.Focus()
End Sub
Private Sub btnSaveList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaveList.Click
If txtID_E.Text = "" Then
MessageBox.Show("กรุณาระบุรหัสพนักงานก่อน !!!", "ผลการตรวจสอบ", MessageBoxButtons.OK, MessageBoxIcon.Information)
txtID_E.Focus()
Exit Sub
End If
If lsvProductsList.Items.Count = 0 Then
MessageBox.Show("กรุณาป้อนรายการสั่งซื้ออุปกรณ์ !!!", "ผลการตรวจสอบ", MessageBoxButtons.OK, MessageBoxIcon.Information)
txtID_P.Focus()
Exit Sub
End If
Dim sqlOrder As String = ""
Dim comOrder As OleDbCommand = New OleDbCommand
With Conn
If .State = ConnectionState.Open Then .Close()
.ConnectionString = strConn
.Open()
End With
Try
If MessageBox.Show("คุณต้องการบันทึกรายการการสั่งซื้ออุปกรณ์ ใช่หรือไม่?", "คำยืนยัน", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
AutoGenerateNo_O()
sqlOrder = "INSERT INTO t_Order (Order_id,Order_Date,Product_id,Order_Quantity,Order_PriceTotal,Employee_id) "
sqlOrder &= " VALUES('" & LastID_O & "',"
sqlOrder &= "'" & dtpDateOrder.Value & "',"
sqlOrder &= "'" & lblTotal.Text & "',"
sqlOrder &= "'" & txtID_E.Text & "')"
With comOrder
.CommandType = CommandType.Text
.CommandText = sqlOrder
.Connection = Conn
.ExecuteNonQuery()
End With
Dim i As Integer = 0
Dim tmpID_P As String = ""
Dim tmpNumber_O As Integer = 0
Dim sqlProducts As String = ""
Dim tmpDateOrder As Date
tmpDateOrder = Date.Now
For i = 0 To lsvProductsList.Items.Count - 1
sqlOrder = "INSERT INTO t_Order(Order_id,Product_id,Order_Quantity)"
sqlOrder &= " VALUES('" & LastID_O & "',"
tmpID_P = lsvProductsList.Items(i).SubItems(0).Text
tmpNumber_O = CInt(lsvProductsList.Items(i).SubItems(3).Text)
sqlOrder &= "'" & tmpID_P & "',"
sqlOrder &= tmpNumber_O & ")"
With comOrder
.CommandText = sqlOrder
.ExecuteNonQuery()
End With
Next
frmMain.tslStatus.Text = "กำลังบันทึกข้อมูล..."
MessageBox.Show("บันทึกรายการการสั่งซื้ออุปกรณ์เรียบร้อยแล้ว !!!", "ผลการทำงาน", MessageBoxButtons.OK, MessageBoxIcon.Information)
frmMain.tslStatus.Text = ""
If IsInstallPrinter() = True Then
If prDlg.ShowDialog = Windows.Forms.DialogResult.OK Then
prDoc.Print()
End If
Else
MessageBox.Show("คุณไม่ติดตั้ง Printer แล้วจะพิมพ์เอกสารได้ไงเล่า 555", "ผลการตรวจสอบ", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
ClearAllEmployeesData()
ClearAllProductsData()
lsvProductsList.Items.Clear()
txtID_P.Enabled = True
txtID_P.Focus()
End If
Catch ErrProcess As Exception
MessageBox.Show("ไม่สามารถบันทึกรายการการสั่งซื้อได้ เนื่องจาก " & ErrProcess.Message, "ข้อผิดพลาด", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Exit Sub
End Try
End Sub
Private Function IsInstallPrinter() As Boolean
IsInstallPrinter = False
If prDoc.PrinterSettings.PrinterName = "<no default printer>" Then
IsInstallPrinter = False
Else
IsInstallPrinter = True
End If
End Function
Private Sub StringToPrint_Print(ByVal sender As Object, ByVal e As PrintPageEventArgs)
AnyString(e.Graphics, "ใบสั่งซื้ออุปกรณ์", 350, 140)
AnyString(e.Graphics, "โรงพยาบาลค่ายกฤษณ์สีวะรา", 317, 160)
AnyString(e.Graphics, "จังหวัดสกลนคร", 346, 180)
AnyString(e.Graphics, "เลขที่ใบสั่งซื้อ : " & LastID_O, 550, 200)
AnyString(e.Graphics, "วัน/เวลาที่สั่งซื้อ : " & dtpDateOrder.Value, 550, 220)
AnyString(e.Graphics, "รหัสพนักงาน : " & txtID_E.Text, 80, 390)
AnyString(e.Graphics, "ชื่อ - สกุล : " & txtName_E.Text, 400, 390)
AnyString(e.Graphics, "____________________________________________________________________________________________________________________", 10, 435)
AnyString(e.Graphics, "รหัสอุปกรณ์", 80, 450)
AnyString(e.Graphics, "รายการ", 300, 450)
AnyString(e.Graphics, "ราคา", 530, 450)
AnyString(e.Graphics, "จำนวนสั่งซื้อ", 600, 450)
AnyString(e.Graphics, "ราคารวม", 680, 450)
AnyString(e.Graphics, "____________________________________________________________________________________________________________________", 10, 460)
AnyString(e.Graphics, "____________________________________________________________________________________________________________________", 10, 850)
Dim i As Integer = 0
Dim CurrentYPosition As Integer = 480
Dim strColumn1 As String = ""
Dim strColumn2 As String = ""
Dim strColumn3 As Integer = 0
Dim strColumn4 As Integer = 0
Dim strColumn5 As Integer = 0
For i = 0 To lsvProductsList.Items.Count - 1
strColumn1 = lsvProductsList.Items(i).SubItems(0).Text
strColumn2 = lsvProductsList.Items(i).SubItems(1).Text
strColumn3 = CInt(lsvProductsList.Items(i).SubItems(2).Text)
strColumn4 = CInt(lsvProductsList.Items(i).SubItems(3).Text)
strColumn5 = CInt(lsvProductsList.Items(i).SubItems(4).Text)
AnyString(e.Graphics, strColumn1, 80, CurrentYPosition)
AnyString(e.Graphics, strColumn2, 180, CurrentYPosition)
AnyString(e.Graphics, strColumn3.ToString(), 530, CurrentYPosition)
AnyString(e.Graphics, strColumn4.ToString(), 600, CurrentYPosition)
AnyString(e.Graphics, strColumn5.ToString(), 680, CurrentYPosition)
CurrentYPosition = CurrentYPosition + 20
Next
End Sub
Private Sub AnyString(ByVal g As Graphics, ByVal printString As String, ByVal xPos As Integer, ByVal yPos As Integer)
Dim anyPoint As New PointF(xPos, yPos)
g.DrawString(printString, UseFont, Brushes.Black, anyPoint)
End Sub
Private Sub AutoGenerateNo_O()
Dim sqlTmp As String = ""
Dim comTmp As OleDbCommand = New OleDbCommand
Dim drTmp As OleDbDataReader
Dim tmpID_O As Integer = 0
sqlTmp = "SELECT TOP 1 Order_id FROM t_Order ORDER BY Order_id DESC"
With Conn
If .State = ConnectionState.Open Then .Close()
.ConnectionString = strConn
.Open()
End With
Try
With comTmp
.CommandType = CommandType.Text
.CommandText = sqlTmp
.Connection = Conn
drTmp = .ExecuteReader()
drTmp.Read()
tmpID_O = CInt(CStr((drTmp.Item("No_O"))))
tmpID_O = tmpID_O + 1
LastID_O = tmpID_O.ToString("00000")
End With
Catch
LastID_O = "00001"
End Try
End Sub
Private Sub txtNumber_O_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtNumber_O.KeyPress
If e.KeyChar < "0" Or e.KeyChar > "9" Then
e.Handled = True
End If
End Sub
Private Sub txtName_P_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtName_P.TextChanged
End Sub
Private Sub txtID_P_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtID_P.TextChanged
End Sub
End Class
Option Explicit On หน้าlist Productค่ะ
Option Strict On
Imports System.Data
Imports System.Data.OleDb
Public Class frmListAllProducts
Inherits System.Windows.Forms.Form
Const DATABASE_FILE As String = "C:\\Database\\Pharmacy.mdb"
Dim strConnection As String = " Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & DATABASE_FILE
Dim Conn As New OleDbConnection(strConnection)
' Dim Conn As OleDbConnection = New OleDbConnection()
Dim da As OleDbDataAdapter
Dim ds As DataSet = New DataSet
Dim IsFind As Boolean = False
Dim ToClose As Boolean = False
Private Sub frmListAllProducts_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'PharmacyDataSet.t_Product' table. You can move, or remove it, as needed.
Me.T_ProductTableAdapter.Fill(Me.PharmacyDataSet.t_Product)
Windows.Forms.Cursor.Current = Cursors.WaitCursor
With Conn
If .State = ConnectionState.Open Then .Close()
.ConnectionString = strConn
.Open()
End With
Dim sqlBook As String = ""
sqlBook = "SELECT * FROM t_Product "
If IsFind = True Then
ds.Tables("t_Product").Clear()
End If
da = New OleDbDataAdapter(sqlBook, Conn)
da.Fill(ds, "t_Product")
If ds.Tables("t_Product").Rows.Count <> 0 Then
IsFind = True
With grdProducts
.AllowNavigation = False
.ReadOnly = True
.DataSource = ds.Tables("t_Product")
End With
Else
IsFind = False
grdProducts.DataSource = Nothing
End If
FormatDataGridWithData()
Windows.Forms.Cursor.Current = Cursors.Default
End Sub
Private Sub FormatDataGridWithData()
Dim grdTS As DataGridTableStyle = New DataGridTableStyle()
With grdTS
.AlternatingBackColor = Color.LemonChiffon
.BackColor = Color.White
.MappingName = "t_Product"
End With
Dim cs0 As New DataGridTextBoxColumn()
With cs0
.HeaderText = "รหัสสินค้า"
.MappingName = "Product_id"
.ReadOnly = True
.Width = 80
End With
grdTS.GridColumnStyles.Add(cs0)
Dim cs1 As New DataGridTextBoxColumn()
With cs1
.HeaderText = "ชื่อสินค้า"
.MappingName = "Product_name"
.ReadOnly = True
.Width = 100
End With
grdTS.GridColumnStyles.Add(cs1)
Dim cs2 As New DataGridTextBoxColumn()
With cs2
.HeaderText = "ยี่ห้อสินค้า"
.MappingName = "Product_Brand"
.ReadOnly = True
.Width = 100
End With
grdTS.GridColumnStyles.Add(cs2)
Dim cs3 As New DataGridTextBoxColumn()
With cs3
.HeaderText = "รายละเอียดสินค้า"
.MappingName = "Product_Detail"
.ReadOnly = True
.Width = 250
End With
grdTS.GridColumnStyles.Add(cs3)
Dim cs4 As New DataGridTextBoxColumn()
With cs4
.HeaderText = "ราคาต่อหน่วย"
.MappingName = "Product_Price"
.ReadOnly = True
.Width = 150
End With
grdTS.GridColumnStyles.Add(cs4)
Dim cs5 As New DataGridTextBoxColumn()
With cs5
.HeaderText = "จำนวนทั้งหมด"
.MappingName = "Product_Total"
.ReadOnly = True
.Width = 150
End With
grdTS.GridColumnStyles.Add(cs5)
With grdProducts
.TableStyles.Clear()
.CaptionFont = New Font("MS Sans Serif", 10.0, FontStyle.Regular)
.CaptionText = "รายการสินค้าทั้งหมด"
.TableStyles.Add(grdTS)
.FlatMode = True
End With
End Sub
Private Sub grdProducts_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Dim UserSelectRow As Integer = 0
If IsFind = True Then
UserSelectRow = grdProducts.CurrentRowIndex
rProduct_id = CStr(grdProducts.Item(UserSelectRow, 0))
rProduct_name = CStr(grdProducts.Item(UserSelectRow, 1))
rProduct_Price = CInt(grdProducts.Item(UserSelectRow, 2))
End If
Me.Close()
End Sub
Private Sub grdProducts_Navigate(ByVal sender As System.Object, ByVal ne As System.Windows.Forms.NavigateEventArgs) Handles grdProducts.Navigate
End Sub
Private Sub T_ProductBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Validate()
Me.T_ProductBindingSource.EndEdit()
Me.T_ProductTableAdapter.Update(Me.PharmacyDataSet.t_Product)
End Sub
End Class