diff --git a/TokoRotiSeleksi.sln b/TokoRotiSeleksi.sln
new file mode 100644
index 0000000..775fb0d
--- /dev/null
+++ b/TokoRotiSeleksi.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2013 for Windows Desktop
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TokoRotiSeleksi", "TokoRotiSeleksi\TokoRotiSeleksi.vbproj", "{AAE4524B-495B-453A-9EC3-F71B03E8541D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AAE4524B-495B-453A-9EC3-F71B03E8541D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AAE4524B-495B-453A-9EC3-F71B03E8541D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AAE4524B-495B-453A-9EC3-F71B03E8541D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AAE4524B-495B-453A-9EC3-F71B03E8541D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/TokoRotiSeleksi/App.config b/TokoRotiSeleksi/App.config
new file mode 100644
index 0000000..8ae0e97
--- /dev/null
+++ b/TokoRotiSeleksi/App.config
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TokoRotiSeleksi/Application.xaml b/TokoRotiSeleksi/Application.xaml
new file mode 100644
index 0000000..a4ed8b3
--- /dev/null
+++ b/TokoRotiSeleksi/Application.xaml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/TokoRotiSeleksi/Application.xaml.vb b/TokoRotiSeleksi/Application.xaml.vb
new file mode 100644
index 0000000..084cbe9
--- /dev/null
+++ b/TokoRotiSeleksi/Application.xaml.vb
@@ -0,0 +1,6 @@
+Class Application
+
+ ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
+ ' can be handled in this file.
+
+End Class
diff --git a/TokoRotiSeleksi/Login.xaml b/TokoRotiSeleksi/Login.xaml
new file mode 100644
index 0000000..d287709
--- /dev/null
+++ b/TokoRotiSeleksi/Login.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TokoRotiSeleksi/Login.xaml.vb b/TokoRotiSeleksi/Login.xaml.vb
new file mode 100644
index 0000000..6378f3a
--- /dev/null
+++ b/TokoRotiSeleksi/Login.xaml.vb
@@ -0,0 +1,20 @@
+Imports System.Data
+Imports System.Data.SqlClient
+Public Class Login
+
+ Private Sub filterButton_Click(sender As Object, e As RoutedEventArgs) Handles filterButton.Click
+ Using con As New SqlConnection("Data Source=.;Initial Catalog=TokoRoti;Integrated Security=True")
+ Dim data As New SqlDataAdapter("SELECT * FROM Login WHERE nama='" + username.Text.Trim + "' AND password ='" + password.Password + "'", con)
+ Dim table As New DataTable
+ data.Fill(table)
+
+ If table.Rows.Count = 1 Then
+ Dim main As New MainWindow(table.Rows(0)(0), table.Rows(0)(1), table.Rows(0)(4))
+ main.Show()
+ Me.Close()
+ Else
+ MessageBox.Show("Username & Password Salah")
+ End If
+ End Using
+ End Sub
+End Class
diff --git a/TokoRotiSeleksi/MainWindow.xaml b/TokoRotiSeleksi/MainWindow.xaml
new file mode 100644
index 0000000..f6a8be6
--- /dev/null
+++ b/TokoRotiSeleksi/MainWindow.xaml
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TokoRotiSeleksi/MainWindow.xaml.vb b/TokoRotiSeleksi/MainWindow.xaml.vb
new file mode 100644
index 0000000..cc9dca2
--- /dev/null
+++ b/TokoRotiSeleksi/MainWindow.xaml.vb
@@ -0,0 +1,512 @@
+Imports System.Data
+Imports System.Data.SqlClient
+Imports System.IO
+
+Class MainWindow
+ Dim conString As String = "Data Source=.;Initial Catalog=TokoRoti;Integrated Security=True"
+ Dim addMode As Boolean = False
+ Dim idBarang, idStaff, level As String
+ Dim transactionTable, dataTable, itemSuggestionTable, categoryTable, statusTable As New DataTable
+ Dim dlg As Microsoft.Win32.OpenFileDialog
+ Dim tableName, columnName, columnIdName, insertCMD, saveCMD As String
+ Dim categoryValue As String
+ Dim discountValue, minReq As Integer
+ Dim menuIndex As Integer
+ Dim navButton() As Button
+
+ Public Sub New(staff As String, nameStaff As String, lvl As String)
+
+ ' This call is required by the designer.
+ InitializeComponent()
+
+ ' Add any initialization after the InitializeComponent() call.
+ idStaff = staff
+ Welcome.Text = "Welcome, " + nameStaff + " !!"
+ level = lvl
+ End Sub
+
+ Private Sub fillPreview()
+ Using con As New SqlConnection(conString)
+ Dim data1 As New SqlDataAdapter("Select * FROM " + tableName + " WHERE " + columnName + " LIKE '" + searchBox.Text + "%'", con)
+ dataTable = New DataTable
+ data1.Fill(dataTable)
+
+ masterGrid.ItemsSource = dataTable.DefaultView
+ End Using
+ End Sub
+
+
+ Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs)
+ Dim s As New Style
+ s.Setters.Add(New Setter(UIElement.VisibilityProperty, Visibility.Collapsed))
+ mainTab.ItemContainerStyle = s
+
+ navButton = New Button() {dashboardButton, transactionButton, breadButton, staffButton, reportButton}
+ FillComboBox()
+
+ dateSelect.DisplayDate = Now
+
+ dlg = New Microsoft.Win32.OpenFileDialog
+
+ nowDate.Content = Date.Today.ToShortDateString
+ End Sub
+
+ Private Sub FillComboBox()
+ Using con As New SqlConnection(conString)
+ Dim data As New SqlDataAdapter("SELECT * FROM JenisBarang", con)
+ categoryTable = New DataTable
+ data.Fill(categoryTable)
+ itemCategory.Items.Clear()
+ itemCategoryData.Items.Clear()
+
+ For i = 0 To categoryTable.Rows.Count - 1
+ itemCategory.Items.Add(categoryTable.Rows(i)(1))
+ itemCategoryData.Items.Add(categoryTable.Rows(i)(1))
+ Next
+
+ If menuIndex = 3 Then
+ itemCategoryData.Items.Clear()
+ itemCategoryData.Items.Add("0")
+ itemCategoryData.Items.Add("1")
+
+ Return
+ End If
+
+ itemCategory.SelectedIndex = 0
+ itemCategoryData.SelectedIndex = 0
+ End Using
+ End Sub
+
+ Private Sub Window_MouseDown(sender As Object, e As MouseButtonEventArgs)
+ itemSuggestion.Visibility = Windows.Visibility.Collapsed
+ End Sub
+
+ Private Sub ChangeNavButton(index As Integer)
+ For i = 0 To navButton.Length - 1
+ If i = index Then
+ navButton(i).Style = CType(Application.Current.Resources("ActiveNav"), Style)
+ menuIndex = index
+ Else
+ navButton(i).Style = CType(Application.Current.Resources("PrimaryButton"), Style)
+ End If
+ Next
+ End Sub
+
+ Private Sub SumTotal()
+ Dim n As Integer = 0
+ For i = 0 To transactionTable.Rows.Count - 1
+ n += transactionTable.Rows(i)(2) * transactionTable.Rows(i)(3)
+ n -= (transactionTable.Rows(i)(4) / 100) * n
+ Next
+ totalPrice.Text = n
+ Dim moneyValue As Integer
+ If Not Integer.TryParse(moneyAmount.Text, moneyValue) Then
+ moneyValue = 0
+ End If
+ returnMoney.Text = moneyValue - n
+ End Sub
+
+ Private Sub TransactionTableFunction(mode As Integer)
+ '0 = fill, 1 = insert, 2 = update, 3 delete
+ If mode = 0 Then
+ Using con As New SqlConnection(conString)
+ Dim data As New SqlDataAdapter("select * from transactionTemp", con)
+ transactionTable = New DataTable
+ data.Fill(transactionTable)
+
+ transactionGrid.ItemsSource = transactionTable.DefaultView
+ End Using
+ ElseIf mode = 1 Then
+ Using con As New SqlConnection(conString)
+ Dim data As New SqlDataAdapter("Select jumlah from transactiontemp where idbarang='" + idBarang + "'", con)
+ Dim table As New DataTable
+ data.Fill(table)
+
+ Dim n As New Integer
+ If Not Integer.TryParse(itemQty.Text, n) Or itemQty.Text = "0" Then
+ n = 1
+ End If
+
+ con.Open()
+ If table.Rows.Count = 1 Then
+ n += table.Rows(0)(0)
+
+ Dim cmd1 As New SqlCommand("DELETE FROM TransactionTemp WHERE idbarang=" + idBarang, con)
+ cmd1.ExecuteNonQuery()
+
+ End If
+
+ Dim tempDis As String = 0
+
+ If minReq <= n Then
+ tempDis = discountValue
+ End If
+
+ Dim cmd As New SqlCommand("insert into transactionTemp (idBarang, NamaBarang, Harga, Jumlah, Diskon, idJenis) VALUES (@id, @name, @price, @qty, @discount, @idJenis)", con)
+ cmd.Parameters.AddWithValue("@id", idBarang)
+ cmd.Parameters.AddWithValue("@name", itemName.Text)
+ cmd.Parameters.AddWithValue("@price", itemPrice.Text)
+ cmd.Parameters.AddWithValue("@qty", n)
+ cmd.Parameters.AddWithValue("@discount", tempDis)
+ cmd.Parameters.AddWithValue("@idJenis", itemSuggestionTable.Rows(itemCategory.SelectedIndex)(5))
+
+ cmd.ExecuteNonQuery()
+
+ TransactionTableFunction(0)
+ End Using
+ ElseIf mode = 2 Then
+ Using con As New SqlConnection(conString)
+ Dim cmd As New SqlCommand("update transactiontemp set namabarang='" + itemName.Text + "', harga='" + itemPrice.Text + "', jumlah='" + itemQty.Text + "', diskon=" + discountValue + " WHERE idBarang='" + idBarang + "'", con)
+
+ con.Open()
+ cmd.ExecuteNonQuery()
+ End Using
+ TransactionTableFunction(0)
+ ElseIf mode = 3 Then
+ Using con As New SqlConnection(conString)
+ Dim cmd As New SqlCommand("DELETE FROM transactiontemp WHERE idbarang=" + idBarang, con)
+
+ con.Open()
+ cmd.ExecuteNonQuery()
+ End Using
+ TransactionTableFunction(0)
+ ElseIf mode = 4 Then
+ Using con As New SqlConnection(conString)
+ Dim cmd As New SqlCommand("DELETE FROM transactiontemp", con)
+ con.Open()
+ cmd.ExecuteNonQuery()
+ End Using
+ TransactionTableFunction(0)
+ End If
+ End Sub
+
+ Private Sub ItemSuggestoinFill()
+ Using con As New SqlConnection(conString)
+ Dim data As New SqlDataAdapter("select idBarang, nama, harga, diskon, minPembelian, idJenis from barang where nama LIKE '" + itemName.Text.Trim + "%' AND idJenis='" + categoryTable.Rows(itemCategory.SelectedIndex)(0).ToString + "'", con)
+ itemSuggestionTable = New DataTable
+ data.Fill(itemSuggestionTable)
+
+ If itemSuggestionTable.Rows.Count <= 0 Then
+
+ Return
+ End If
+
+ itemSuggestion.Visibility = Windows.Visibility.Visible
+ For i = 0 To itemSuggestionTable.Rows.Count - 1
+ itemSuggestion.Items.Add(itemSuggestionTable.Rows(i)(1))
+ Next
+ End Using
+ End Sub
+
+ Private Sub dashboardButton_Click(sender As Object, e As RoutedEventArgs) Handles dashboardButton.Click
+ ChangeNavButton(0)
+ mainTab.SelectedIndex = 0
+ End Sub
+
+ Private Sub transactionButton_Click(sender As Object, e As RoutedEventArgs) Handles transactionButton.Click
+ ChangeNavButton(1)
+ TransactionTableFunction(0)
+ mainTab.SelectedIndex = 1
+ End Sub
+
+ Private Sub breadButton_Click(sender As Object, e As RoutedEventArgs) Handles breadButton.Click
+ ChangeNavButton(2)
+ mainTab.SelectedIndex = 2
+ FillMasterData()
+ End Sub
+
+ Private Sub staffButton_Click(sender As Object, e As RoutedEventArgs) Handles staffButton.Click
+ ChangeNavButton(3)
+ mainTab.SelectedIndex = 2
+ FillMasterData()
+ End Sub
+
+ Private Sub reportButton_Click(sender As Object, e As RoutedEventArgs) Handles reportButton.Click
+ ChangeNavButton(4)
+ mainTab.SelectedIndex = 2
+ FillMasterData()
+ End Sub
+
+ Private Sub addToTable_Click(sender As Object, e As RoutedEventArgs) Handles addToTable.Click
+ TransactionTableFunction(1)
+ SumTotal()
+ End Sub
+
+ Private Sub updateTable_Click(sender As Object, e As RoutedEventArgs) Handles updateTable.Click
+ TransactionTableFunction(2)
+ End Sub
+
+ Private Sub deleteTable_Click(sender As Object, e As RoutedEventArgs) Handles deleteTable.Click
+ TransactionTableFunction(3)
+ End Sub
+
+ Private Sub reset_Click(sender As Object, e As RoutedEventArgs) Handles reset.Click
+ TransactionTableFunction(4)
+ End Sub
+
+ Private Sub itemName_TextChanged(sender As Object, e As TextChangedEventArgs)
+ itemSuggestion.Items.Clear()
+ ItemSuggestoinFill()
+ End Sub
+
+ Private Sub itemCategory_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
+
+ End Sub
+
+ Private Sub itemSuggestion_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
+ If itemSuggestion.SelectedItem = itemName.Text Or itemSuggestion.SelectedIndex < 0 Then
+ Return
+ End If
+ idBarang = itemSuggestionTable.Rows(itemSuggestion.SelectedIndex)(0)
+ itemPrice.Text = itemSuggestionTable.Rows(itemSuggestion.SelectedIndex)(2)
+ discountValue = itemSuggestionTable.Rows(itemSuggestion.SelectedIndex)(3)
+ minReq = itemSuggestionTable.Rows(itemSuggestion.SelectedIndex)(4)
+ itemName.Text = itemSuggestion.SelectedItem
+
+ itemSuggestion.Visibility = Windows.Visibility.Collapsed
+ End Sub
+
+ Private Sub filterButton_Click(sender As Object, e As RoutedEventArgs) Handles filterButton.Click
+
+ If filter.Visibility = Windows.Visibility.Visible Then
+ filter.Visibility = Visibility.Collapsed
+ Else
+ filter.Visibility = Windows.Visibility.Visible
+ End If
+ End Sub
+
+ Private Sub FillMasterData()
+ FillComboBox()
+ If menuIndex = 2 Then
+ tableName = "Barang"
+ label1.Content = "Harga"
+ label2.Content = "Stock"
+ columnName = "Nama"
+ columnIdName = "idBarang"
+ insertCMD = "(nama, harga, stok, diskon, minPembelian, idJenis) VALUES ('" + breadName.Text + "', '" + breadPrice.Text + "', '" + breadStock.Text + "', '" + discount.Text + "', '" + minBuy.Text + "', " + Convert.ToString(itemCategoryData.SelectedIndex + 1) + ")"
+ saveCMD = "nama='" + breadName.Text + "',harga= '" + breadPrice.Text + "', stok ='" + breadStock.Text + "',diskon= '" + discount.Text + "', minpembelian='" + minBuy.Text + "', idJenis='" + Convert.ToString(itemCategoryData.SelectedIndex + 1) + "'"
+ If Not IsDBNull(dlg.FileName) Then
+ saveCMD = "nama='" + breadName.Text + "',harga= '" + breadPrice.Text + "', stok ='" + breadStock.Text + "',diskon= '" + discount.Text + "', minpembelian='" + minBuy.Text + "', idJenis='" + Convert.ToString(itemCategoryData.SelectedIndex + 1) + "', gambar=@image"
+ insertCMD = "(nama, harga, stok, diskon, minPembelian, idJenis, gambar) VALUES ('" + breadName.Text + "', '" + breadPrice.Text + "', '" + breadStock.Text + "', '" + discount.Text + "', '" + minBuy.Text + "', " + Convert.ToString(itemCategoryData.SelectedIndex + 1) + ", @image)"
+ End If
+ minBuy.Visibility = Windows.Visibility.Visible
+ discount.Visibility = Windows.Visibility.Visible
+ minBuyLabel.Visibility = Windows.Visibility.Visible
+ discountLabel.Visibility = Windows.Visibility.Visible
+
+
+ ElseIf menuIndex = 3 Then
+ tableName = "Login"
+ label1.Content = "Username"
+ label2.Content = "Password"
+ columnName = "Nama"
+ columnIdName = "idPenjaga"
+ insertCMD = "(nama, username, password, level) VALUES ('" + breadName.Text + "', '" + breadPrice.Text + "','" + breadStock.Text + "', '" + itemCategoryData.SelectedIndex.ToString + "') "
+ saveCMD = "nama='" + breadName.Text + "', username='" + breadPrice.Text + "', password='" + password.Password + "', level='" + itemCategoryData.SelectedIndex.ToString + "'"
+ minBuy.Visibility = Windows.Visibility.Collapsed
+ discount.Visibility = Windows.Visibility.Collapsed
+ minBuyLabel.Visibility = Windows.Visibility.Collapsed
+ discountLabel.Visibility = Windows.Visibility.Collapsed
+
+ ElseIf menuIndex = 4 Then
+ tableName = "Penjualan"
+ label1.Content = "Username"
+ label2.Content = "Password"
+ columnName = "NamaBarang"
+ columnIdName = "idPenjualan"
+ End If
+
+ Using con As New SqlConnection(conString)
+ If (menuIndex = 4) Then
+ Dim data As New SqlDataAdapter("Select * FROM " + tableName + " WHERE " + columnName + " LIKE '" + searchBox.Text + "%' AND tanggal LIKE '" + dateSelect.DisplayDate + "%'", con)
+ dataTable = New DataTable
+ data.Fill(dataTable)
+
+ masterGrid.ItemsSource = dataTable.DefaultView
+ End If
+ Dim data1 As New SqlDataAdapter("Select * FROM " + tableName + " WHERE " + columnName + " LIKE '" + searchBox.Text + "%'", con)
+ dataTable = New DataTable
+ data1.Fill(dataTable)
+
+ masterGrid.ItemsSource = dataTable.DefaultView
+ End Using
+
+ End Sub
+
+ Private Sub searchBox_TextChanged(sender As Object, e As TextChangedEventArgs)
+ FillMasterData()
+ End Sub
+
+ Private Sub FillDataBase()
+ If String.IsNullOrWhiteSpace(imageURL.Text) Then
+ insertCMD = "(nama, harga, stok, diskon, minPembelian, idJenis) VALUES ('" + breadName.Text + "', '" + breadPrice.Text + "', '" + breadStock.Text + "', '" + discount.Text + "', '" + minBuy.Text + "', " + Convert.ToString(itemCategoryData.SelectedIndex + 1) + ")"
+ End If
+ Using con As New SqlConnection(conString)
+ Dim cmd As New SqlCommand("INSERT INTO " + tableName + " " + insertCMD, con)
+ If Not IsDBNull(dlg.FileName) And menuIndex = 2 And dlg.FileName <> "" Then
+ Dim stream As FileStream = File.OpenRead(dlg.FileName)
+ Dim content(stream.Length) As Byte
+ stream.Read(content, 0, stream.Length)
+ stream.Close()
+
+ cmd.Parameters.AddWithValue("@image", content)
+ End If
+ con.Open()
+ cmd.ExecuteNonQuery()
+ End Using
+ End Sub
+
+ Private Sub SaveDataBase()
+ If String.IsNullOrWhiteSpace(imageURL.Text) Then
+ saveCMD = "nama='" + breadName.Text + "',harga= '" + breadPrice.Text + "', stok ='" + breadStock.Text + "',diskon= '" + discount.Text + "', minpembelian='" + minBuy.Text + "', idJenis='" + Convert.ToString(itemCategoryData.SelectedIndex + 1) + "'"
+ End If
+ Using con As New SqlConnection(conString)
+ Dim cmd As New SqlCommand("UPDATE " + tableName + " SET " + saveCMD + " WHERE " + columnIdName + " = " + idBarang, con)
+ If Not IsDBNull(dlg.FileName) And menuIndex = 2 And dlg.FileName <> "" And String.IsNullOrWhiteSpace(imageURL.Text) Then
+ Dim stream As FileStream = File.OpenRead(dlg.FileName)
+ Dim content(stream.Length) As Byte
+ stream.Read(content, 0, stream.Length)
+ stream.Close()
+
+ cmd.Parameters.AddWithValue("@image", content)
+ End If
+ con.Open()
+ cmd.ExecuteNonQuery()
+
+ End Using
+ dlg.FileName = vbEmpty
+ End Sub
+
+ Private Sub save_Click(sender As Object, e As RoutedEventArgs) Handles save.Click
+ FillMasterData()
+
+ If addMode Then
+ FillDataBase()
+ Else
+ SaveDataBase()
+ End If
+
+ FillMasterData()
+ mainTab.SelectedIndex = 2
+ End Sub
+
+ Private Sub delete_Click(sender As Object, e As RoutedEventArgs) Handles delete.Click
+ Using con As New SqlConnection(conString)
+ Dim cmd As New SqlCommand("DELETE FROM " + tableName + " WHERE " + columnIdName + " = " + idBarang, con)
+ con.Open()
+ cmd.ExecuteNonQuery()
+ End Using
+
+ FillMasterData()
+ mainTab.SelectedIndex = 2
+ End Sub
+
+ Private Sub itemCategoryData_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
+
+ End Sub
+
+ Private Sub masterGrid_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
+ addMode = False
+ idBarang = dataTable.Rows(masterGrid.SelectedIndex)(0)
+ breadName.Text = dataTable.Rows(masterGrid.SelectedIndex)(1)
+ breadPrice.Text = dataTable.Rows(masterGrid.SelectedIndex)(2)
+ FillComboBox()
+ mainTab.SelectedIndex = 3
+
+ If menuIndex = 2 Then
+ breadStock.Text = dataTable.Rows(masterGrid.SelectedIndex)(6)
+ minBuy.Text = dataTable.Rows(masterGrid.SelectedIndex)(4)
+ discount.Text = dataTable.Rows(masterGrid.SelectedIndex)(3)
+ password.Visibility = Windows.Visibility.Collapsed
+
+ Dim img As New BitmapImage
+ If IsDBNull(dataTable.Rows(masterGrid.SelectedIndex)(7)) Then
+ Return
+ End If
+ Dim content() As Byte = dataTable.Rows(masterGrid.SelectedIndex)(7)
+ Using Stream As New MemoryStream(content)
+ img.BeginInit()
+ img.CacheOption = BitmapCacheOption.OnLoad
+ img.StreamSource = Stream
+ img.EndInit()
+
+ imgPreview.Source = img
+ End Using
+
+ Else
+ password.Password = dataTable.Rows(masterGrid.SelectedIndex)(3)
+ itemCategoryData.SelectedIndex = dataTable.Rows(masterGrid.SelectedIndex)(4)
+ password.Visibility = Windows.Visibility.Visible
+
+ FillMasterData()
+ End If
+ End Sub
+
+ Private Sub checkOut_Click(sender As Object, e As RoutedEventArgs) Handles checkOut.Click
+ Using con As New SqlConnection(conString)
+ Dim cmd As New SqlCommand
+ con.Open()
+ For i = 0 To transactionTable.Rows.Count - 1
+ cmd = New SqlCommand("INSERT INTO PENJUALAN (idPenjualan, NamaBarang, harga,Jumlah, Diskon, idJenis, tanggal) VALUES (@id, @name, @price, @qty, @discount, @idjenis, @date)", con)
+ cmd.Parameters.AddWithValue("@id", transactionTable.Rows(i)(0))
+ cmd.Parameters.AddWithValue("@name", transactionTable.Rows(i)(1))
+ cmd.Parameters.AddWithValue("@price", transactionTable.Rows(i)(2))
+ cmd.Parameters.AddWithValue("@qty", transactionTable.Rows(i)(3))
+ cmd.Parameters.AddWithValue("@discount", transactionTable.Rows(i)(4))
+ cmd.Parameters.AddWithValue("@idJenis", transactionTable.Rows(i)(5))
+ cmd.Parameters.AddWithValue("@date", Now.ToString)
+
+ cmd.ExecuteNonQuery()
+ Next
+ TransactionTableFunction(4)
+ End Using
+ End Sub
+
+ Private Sub moneyAmount_TextChanged(sender As Object, e As TextChangedEventArgs)
+ SumTotal()
+ End Sub
+
+ Private Sub transactionGrid_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
+ If transactionGrid.SelectedIndex < 0 Or transactionGrid.SelectedIndex > transactionTable.Rows.Count Then
+ Return
+ End If
+
+ SumTotal()
+ idBarang = transactionTable.Rows(transactionGrid.SelectedIndex)(0)
+ itemName.Text = transactionTable.Rows(transactionGrid.SelectedIndex)(1)
+ itemPrice.Text = transactionTable.Rows(transactionGrid.SelectedIndex)(2)
+ itemQty.Text = transactionTable.Rows(transactionGrid.SelectedIndex)(3)
+ itemCategory.SelectedIndex = transactionTable.Rows(transactionGrid.SelectedIndex)(5) - 1
+ End Sub
+
+ Private Sub addData_Click(sender As Object, e As RoutedEventArgs)
+ addMode = True
+
+ If menuIndex = 2 Then
+ password.Visibility = Windows.Visibility.Collapsed
+ FillMasterData()
+ Else
+ password.Visibility = Windows.Visibility.Visible
+ FillMasterData()
+ End If
+ mainTab.SelectedIndex = 3
+ End Sub
+
+ Private Sub browse_Click(sender As Object, e As RoutedEventArgs)
+ dlg.ShowDialog()
+
+ imageURL.Text = dlg.FileName
+ imgPreview.Source = New BitmapImage(New Uri(dlg.FileName, UriKind.RelativeOrAbsolute))
+ End Sub
+
+ Private Sub reportButton_Copy_Click(sender As Object, e As RoutedEventArgs) Handles reportButton_Copy.Click
+ Dim login As New Login
+ login.Show()
+
+ Me.Close()
+ End Sub
+
+ Private Sub closeButton_Click(sender As Object, e As RoutedEventArgs) Handles closeButton.Click
+ mainTab.SelectedIndex = 2
+ End Sub
+End Class
diff --git a/TokoRotiSeleksi/My Project/AssemblyInfo.vb b/TokoRotiSeleksi/My Project/AssemblyInfo.vb
new file mode 100644
index 0000000..bfa2034
--- /dev/null
+++ b/TokoRotiSeleksi/My Project/AssemblyInfo.vb
@@ -0,0 +1,59 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+Imports System.Globalization
+Imports System.Resources
+Imports System.Windows
+
+' General Information about an assembly is controlled through the following
+' set of attributes. Change these attribute values to modify the information
+' associated with an assembly.
+
+' Review the values of the assembly attributes
+
+
+
+
+
+
+
+
+
+'In order to begin building localizable applications, set
+'CultureYouAreCodingWith in your .vbproj file
+'inside a . For example, if you are using US english
+'in your source files, set the to "en-US". Then uncomment the
+'NeutralResourceLanguage attribute below. Update the "en-US" in the line
+'below to match the UICulture setting in the project file.
+
+'
+
+
+'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
+'1st parameter: where theme specific resource dictionaries are located
+'(used if a resource is not found in the page,
+' or application resource dictionaries)
+
+'2nd parameter: where the generic resource dictionary is located
+'(used if a resource is not found in the page,
+'app, and any theme specific resource dictionaries)
+
+
+
+
+'The following GUID is for the ID of the typelib if this project is exposed to COM
+
+
+' Version information for an assembly consists of the following four values:
+'
+' Major Version
+' Minor Version
+' Build Number
+' Revision
+'
+' You can specify all the values or you can default the Build and Revision Numbers
+' by using the '*' as shown below:
+'
+
+
+
diff --git a/TokoRotiSeleksi/My Project/MyExtensions/MyWpfExtension.vb b/TokoRotiSeleksi/My Project/MyExtensions/MyWpfExtension.vb
new file mode 100644
index 0000000..22f84b7
--- /dev/null
+++ b/TokoRotiSeleksi/My Project/MyExtensions/MyWpfExtension.vb
@@ -0,0 +1,121 @@
+#If _MyType <> "Empty" Then
+
+Namespace My
+ '''
+ ''' Module used to define the properties that are available in the My Namespace for WPF
+ '''
+ '''
+ _
+ Module MyWpfExtension
+ Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.Computer)
+ Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.User)
+ Private s_Windows As New ThreadSafeObjectProvider(Of MyWindows)
+ Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.Log)
+ '''
+ ''' Returns the application object for the running application
+ '''
+ _
+ Friend ReadOnly Property Application() As Application
+ Get
+ Return CType(Global.System.Windows.Application.Current, Application)
+ End Get
+ End Property
+ '''
+ ''' Returns information about the host computer.
+ '''
+ _
+ Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.Computer
+ Get
+ Return s_Computer.GetInstance()
+ End Get
+ End Property
+ '''
+ ''' Returns information for the current user. If you wish to run the application with the current
+ ''' Windows user credentials, call My.User.InitializeWithWindowsUser().
+ '''
+ _
+ Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.User
+ Get
+ Return s_User.GetInstance()
+ End Get
+ End Property
+ '''
+ ''' Returns the application log. The listeners can be configured by the application's configuration file.
+ '''
+ _
+ Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.Log
+ Get
+ Return s_Log.GetInstance()
+ End Get
+ End Property
+
+ '''
+ ''' Returns the collection of Windows defined in the project.
+ '''
+ _
+ Friend ReadOnly Property Windows() As MyWindows
+ _
+ Get
+ Return s_Windows.GetInstance()
+ End Get
+ End Property
+ _
+ _
+ Friend NotInheritable Class MyWindows
+ _
+ Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Window})(ByVal Instance As T) As T
+ If Instance Is Nothing Then
+ If s_WindowBeingCreated IsNot Nothing Then
+ If s_WindowBeingCreated.ContainsKey(GetType(T)) = True Then
+ Throw New Global.System.InvalidOperationException("The window cannot be accessed via My.Windows from the Window constructor.")
+ End If
+ Else
+ s_WindowBeingCreated = New Global.System.Collections.Hashtable()
+ End If
+ s_WindowBeingCreated.Add(GetType(T), Nothing)
+ Return New T()
+ s_WindowBeingCreated.Remove(GetType(T))
+ Else
+ Return Instance
+ End If
+ End Function
+ _
+ _
+ Private Sub Dispose__Instance__(Of T As Global.System.Windows.Window)(ByRef instance As T)
+ instance = Nothing
+ End Sub
+ _
+ _
+ Public Sub New()
+ MyBase.New()
+ End Sub
+ Private Shared s_WindowBeingCreated As Global.System.Collections.Hashtable
+ Public Overrides Function Equals(ByVal o As Object) As Boolean
+ Return MyBase.Equals(o)
+ End Function
+ Public Overrides Function GetHashCode() As Integer
+ Return MyBase.GetHashCode
+ End Function
+ _
+ _
+ Friend Overloads Function [GetType]() As Global.System.Type
+ Return GetType(MyWindows)
+ End Function
+ Public Overrides Function ToString() As String
+ Return MyBase.ToString
+ End Function
+ End Class
+ End Module
+End Namespace
+Partial Class Application
+ Inherits Global.System.Windows.Application
+ _
+ _
+ Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo
+ _
+ Get
+ Return New Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo(Global.System.Reflection.Assembly.GetExecutingAssembly())
+ End Get
+ End Property
+End Class
+#End If
\ No newline at end of file
diff --git a/TokoRotiSeleksi/My Project/Resources.Designer.vb b/TokoRotiSeleksi/My Project/Resources.Designer.vb
new file mode 100644
index 0000000..e7ecddc
--- /dev/null
+++ b/TokoRotiSeleksi/My Project/Resources.Designer.vb
@@ -0,0 +1,62 @@
+'------------------------------------------------------------------------------
+'
+' This code was generated by a tool.
+' Runtime Version:$clrversion$
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My.Resources
+
+ 'This class was auto-generated by the StronglyTypedResourceBuilder
+ 'class via a tool like ResGen or Visual Studio.
+ 'To add or remove a member, edit your .ResX file then rerun ResGen
+ 'with the /str option, or rebuild your VS project.
+ '''
+ ''' A strongly-typed resource class, for looking up localized strings, etc.
+ '''
+ _
+ Friend Module Resources
+
+ Private resourceMan As Global.System.Resources.ResourceManager
+
+ Private resourceCulture As Global.System.Globalization.CultureInfo
+
+ '''
+ ''' Returns the cached ResourceManager instance used by this class.
+ '''
+ _
+ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+ Get
+ If Object.ReferenceEquals(resourceMan, Nothing) Then
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("$safeprojectname$.Resources", GetType(Resources).Assembly)
+ resourceMan = temp
+ End If
+ Return resourceMan
+ End Get
+ End Property
+
+ '''
+ ''' Overrides the current thread's CurrentUICulture property for all
+ ''' resource lookups using this strongly typed resource class.
+ '''
+ _
+ Friend Property Culture() As Global.System.Globalization.CultureInfo
+ Get
+ Return resourceCulture
+ End Get
+ Set(ByVal value As Global.System.Globalization.CultureInfo)
+ resourceCulture = value
+ End Set
+ End Property
+ End Module
+End Namespace
diff --git a/TokoRotiSeleksi/My Project/Resources.resx b/TokoRotiSeleksi/My Project/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/TokoRotiSeleksi/My Project/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/TokoRotiSeleksi/My Project/Settings.Designer.vb b/TokoRotiSeleksi/My Project/Settings.Designer.vb
new file mode 100644
index 0000000..d5ebd8d
--- /dev/null
+++ b/TokoRotiSeleksi/My Project/Settings.Designer.vb
@@ -0,0 +1,91 @@
+'------------------------------------------------------------------------------
+'
+' This code was generated by a tool.
+' Runtime Version:4.0.30319.42000
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+
+ _
+Partial Friend NotInheritable Class MySettings
+ Inherits Global.System.Configuration.ApplicationSettingsBase
+
+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+
+#Region "My.Settings Auto-Save Functionality"
+#If _MyType = "WindowsForms" Then
+ Private Shared addedHandler As Boolean
+
+ Private Shared addedHandlerLockObject As New Object
+
+ _
+ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
+ If My.Application.SaveMySettingsOnExit Then
+ My.Settings.Save()
+ End If
+ End Sub
+#End If
+#End Region
+
+ Public Shared ReadOnly Property [Default]() As MySettings
+ Get
+
+#If _MyType = "WindowsForms" Then
+ If Not addedHandler Then
+ SyncLock addedHandlerLockObject
+ If Not addedHandler Then
+ AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+ addedHandler = True
+ End If
+ End SyncLock
+ End If
+#End If
+ Return defaultInstance
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property DBTokoRotiConnectionString() As String
+ Get
+ Return CType(Me("DBTokoRotiConnectionString"),String)
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property TokoRotiConnectionString() As String
+ Get
+ Return CType(Me("TokoRotiConnectionString"),String)
+ End Get
+ End Property
+End Class
+
+Namespace My
+
+ _
+ Friend Module MySettingsProperty
+
+ _
+ Friend ReadOnly Property Settings() As Global.TokoRotiSeleksi.MySettings
+ Get
+ Return Global.TokoRotiSeleksi.MySettings.Default
+ End Get
+ End Property
+ End Module
+End Namespace
diff --git a/TokoRotiSeleksi/My Project/Settings.settings b/TokoRotiSeleksi/My Project/Settings.settings
new file mode 100644
index 0000000..46dd421
--- /dev/null
+++ b/TokoRotiSeleksi/My Project/Settings.settings
@@ -0,0 +1,22 @@
+
+
+
+
+
+ <?xml version="1.0" encoding="utf-16"?>
+<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <ConnectionString>Data Source=.;Initial Catalog=DBTokoRoti;Integrated Security=True</ConnectionString>
+ <ProviderName>System.Data.SqlClient</ProviderName>
+</SerializableConnectionString>
+ Data Source=.;Initial Catalog=DBTokoRoti;Integrated Security=True
+
+
+ <?xml version="1.0" encoding="utf-16"?>
+<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <ConnectionString>Data Source=.;Initial Catalog=TokoRoti;Integrated Security=True</ConnectionString>
+ <ProviderName>System.Data.SqlClient</ProviderName>
+</SerializableConnectionString>
+ Data Source=.;Initial Catalog=TokoRoti;Integrated Security=True
+
+
+
\ No newline at end of file
diff --git a/TokoRotiSeleksi/Resources/DTechnologyNoRoom.png b/TokoRotiSeleksi/Resources/DTechnologyNoRoom.png
new file mode 100644
index 0000000..7327597
Binary files /dev/null and b/TokoRotiSeleksi/Resources/DTechnologyNoRoom.png differ
diff --git a/TokoRotiSeleksi/TokoRotiDataSet.Designer.vb b/TokoRotiSeleksi/TokoRotiDataSet.Designer.vb
new file mode 100644
index 0000000..e90c3eb
--- /dev/null
+++ b/TokoRotiSeleksi/TokoRotiDataSet.Designer.vb
@@ -0,0 +1,4935 @@
+'------------------------------------------------------------------------------
+'
+' This code was generated by a tool.
+' Runtime Version:4.0.30319.42000
+'
+' Changes to this file may cause incorrect behavior and will be lost if
+' the code is regenerated.
+'
+'------------------------------------------------------------------------------
+
+Option Strict Off
+Option Explicit On
+
+
+
+'''
+'''Represents a strongly typed in-memory cache of data.
+'''
+ _
+Partial Public Class TokoRotiDataSet
+ Inherits Global.System.Data.DataSet
+
+ Private tableBarang As BarangDataTable
+
+ Private tableJenisBarang As JenisBarangDataTable
+
+ Private tableLogin As LoginDataTable
+
+ Private tablePenjualan As PenjualanDataTable
+
+ Private tableTransactionTemp As TransactionTempDataTable
+
+ Private relationFK_Barang_JenisBarang As Global.System.Data.DataRelation
+
+ Private relationFK_TransactionTemp_Barang As Global.System.Data.DataRelation
+
+ Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.BeginInit
+ Me.InitClass
+ Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
+ AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
+ AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
+ Me.EndInit
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context, false)
+ If (Me.IsBinarySerialized(info, context) = true) Then
+ Me.InitVars(false)
+ Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
+ AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
+ AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
+ Return
+ End If
+ Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
+ If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
+ Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
+ ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
+ If (Not (ds.Tables("Barang")) Is Nothing) Then
+ MyBase.Tables.Add(New BarangDataTable(ds.Tables("Barang")))
+ End If
+ If (Not (ds.Tables("JenisBarang")) Is Nothing) Then
+ MyBase.Tables.Add(New JenisBarangDataTable(ds.Tables("JenisBarang")))
+ End If
+ If (Not (ds.Tables("Login")) Is Nothing) Then
+ MyBase.Tables.Add(New LoginDataTable(ds.Tables("Login")))
+ End If
+ If (Not (ds.Tables("Penjualan")) Is Nothing) Then
+ MyBase.Tables.Add(New PenjualanDataTable(ds.Tables("Penjualan")))
+ End If
+ If (Not (ds.Tables("TransactionTemp")) Is Nothing) Then
+ MyBase.Tables.Add(New TransactionTempDataTable(ds.Tables("TransactionTemp")))
+ End If
+ Me.DataSetName = ds.DataSetName
+ Me.Prefix = ds.Prefix
+ Me.Namespace = ds.Namespace
+ Me.Locale = ds.Locale
+ Me.CaseSensitive = ds.CaseSensitive
+ Me.EnforceConstraints = ds.EnforceConstraints
+ Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
+ Me.InitVars
+ Else
+ Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
+ End If
+ Me.GetSerializationData(info, context)
+ Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
+ AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
+ AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
+ End Sub
+
+ _
+ Public ReadOnly Property Barang() As BarangDataTable
+ Get
+ Return Me.tableBarang
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property JenisBarang() As JenisBarangDataTable
+ Get
+ Return Me.tableJenisBarang
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Login() As LoginDataTable
+ Get
+ Return Me.tableLogin
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Penjualan() As PenjualanDataTable
+ Get
+ Return Me.tablePenjualan
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property TransactionTemp() As TransactionTempDataTable
+ Get
+ Return Me.tableTransactionTemp
+ End Get
+ End Property
+
+ _
+ Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
+ Get
+ Return Me._schemaSerializationMode
+ End Get
+ Set
+ Me._schemaSerializationMode = value
+ End Set
+ End Property
+
+ _
+ Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
+ Get
+ Return MyBase.Tables
+ End Get
+ End Property
+
+ _
+ Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
+ Get
+ Return MyBase.Relations
+ End Get
+ End Property
+
+ _
+ Protected Overrides Sub InitializeDerivedDataSet()
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataSet
+ Dim cln As TokoRotiDataSet = CType(MyBase.Clone,TokoRotiDataSet)
+ cln.InitVars
+ cln.SchemaSerializationMode = Me.SchemaSerializationMode
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function ShouldSerializeTables() As Boolean
+ Return false
+ End Function
+
+ _
+ Protected Overrides Function ShouldSerializeRelations() As Boolean
+ Return false
+ End Function
+
+ _
+ Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
+ If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
+ Me.Reset
+ Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
+ ds.ReadXml(reader)
+ If (Not (ds.Tables("Barang")) Is Nothing) Then
+ MyBase.Tables.Add(New BarangDataTable(ds.Tables("Barang")))
+ End If
+ If (Not (ds.Tables("JenisBarang")) Is Nothing) Then
+ MyBase.Tables.Add(New JenisBarangDataTable(ds.Tables("JenisBarang")))
+ End If
+ If (Not (ds.Tables("Login")) Is Nothing) Then
+ MyBase.Tables.Add(New LoginDataTable(ds.Tables("Login")))
+ End If
+ If (Not (ds.Tables("Penjualan")) Is Nothing) Then
+ MyBase.Tables.Add(New PenjualanDataTable(ds.Tables("Penjualan")))
+ End If
+ If (Not (ds.Tables("TransactionTemp")) Is Nothing) Then
+ MyBase.Tables.Add(New TransactionTempDataTable(ds.Tables("TransactionTemp")))
+ End If
+ Me.DataSetName = ds.DataSetName
+ Me.Prefix = ds.Prefix
+ Me.Namespace = ds.Namespace
+ Me.Locale = ds.Locale
+ Me.CaseSensitive = ds.CaseSensitive
+ Me.EnforceConstraints = ds.EnforceConstraints
+ Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
+ Me.InitVars
+ Else
+ Me.ReadXml(reader)
+ Me.InitVars
+ End If
+ End Sub
+
+ _
+ Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
+ Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
+ stream.Position = 0
+ Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
+ End Function
+
+ _
+ Friend Overloads Sub InitVars()
+ Me.InitVars(true)
+ End Sub
+
+ _
+ Friend Overloads Sub InitVars(ByVal initTable As Boolean)
+ Me.tableBarang = CType(MyBase.Tables("Barang"),BarangDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tableBarang) Is Nothing) Then
+ Me.tableBarang.InitVars
+ End If
+ End If
+ Me.tableJenisBarang = CType(MyBase.Tables("JenisBarang"),JenisBarangDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tableJenisBarang) Is Nothing) Then
+ Me.tableJenisBarang.InitVars
+ End If
+ End If
+ Me.tableLogin = CType(MyBase.Tables("Login"),LoginDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tableLogin) Is Nothing) Then
+ Me.tableLogin.InitVars
+ End If
+ End If
+ Me.tablePenjualan = CType(MyBase.Tables("Penjualan"),PenjualanDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tablePenjualan) Is Nothing) Then
+ Me.tablePenjualan.InitVars
+ End If
+ End If
+ Me.tableTransactionTemp = CType(MyBase.Tables("TransactionTemp"),TransactionTempDataTable)
+ If (initTable = true) Then
+ If (Not (Me.tableTransactionTemp) Is Nothing) Then
+ Me.tableTransactionTemp.InitVars
+ End If
+ End If
+ Me.relationFK_Barang_JenisBarang = Me.Relations("FK_Barang_JenisBarang")
+ Me.relationFK_TransactionTemp_Barang = Me.Relations("FK_TransactionTemp_Barang")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.DataSetName = "TokoRotiDataSet"
+ Me.Prefix = ""
+ Me.Namespace = "http://tempuri.org/TokoRotiDataSet.xsd"
+ Me.EnforceConstraints = true
+ Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
+ Me.tableBarang = New BarangDataTable()
+ MyBase.Tables.Add(Me.tableBarang)
+ Me.tableJenisBarang = New JenisBarangDataTable()
+ MyBase.Tables.Add(Me.tableJenisBarang)
+ Me.tableLogin = New LoginDataTable()
+ MyBase.Tables.Add(Me.tableLogin)
+ Me.tablePenjualan = New PenjualanDataTable()
+ MyBase.Tables.Add(Me.tablePenjualan)
+ Me.tableTransactionTemp = New TransactionTempDataTable()
+ MyBase.Tables.Add(Me.tableTransactionTemp)
+ Me.relationFK_Barang_JenisBarang = New Global.System.Data.DataRelation("FK_Barang_JenisBarang", New Global.System.Data.DataColumn() {Me.tableJenisBarang.idJenisColumn}, New Global.System.Data.DataColumn() {Me.tableBarang.idJenisColumn}, false)
+ Me.Relations.Add(Me.relationFK_Barang_JenisBarang)
+ Me.relationFK_TransactionTemp_Barang = New Global.System.Data.DataRelation("FK_TransactionTemp_Barang", New Global.System.Data.DataColumn() {Me.tableBarang.idBarangColumn}, New Global.System.Data.DataColumn() {Me.tableTransactionTemp.idBarangColumn}, false)
+ Me.Relations.Add(Me.relationFK_TransactionTemp_Barang)
+ End Sub
+
+ _
+ Private Function ShouldSerializeBarang() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializeJenisBarang() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializeLogin() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializePenjualan() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Function ShouldSerializeTransactionTemp() As Boolean
+ Return false
+ End Function
+
+ _
+ Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
+ If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
+ Me.InitVars
+ End If
+ End Sub
+
+ _
+ Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim ds As TokoRotiDataSet = New TokoRotiDataSet()
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any.Namespace = ds.Namespace
+ sequence.Items.Add(any)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+
+ _
+ Public Delegate Sub BarangRowChangeEventHandler(ByVal sender As Object, ByVal e As BarangRowChangeEvent)
+
+ _
+ Public Delegate Sub JenisBarangRowChangeEventHandler(ByVal sender As Object, ByVal e As JenisBarangRowChangeEvent)
+
+ _
+ Public Delegate Sub LoginRowChangeEventHandler(ByVal sender As Object, ByVal e As LoginRowChangeEvent)
+
+ _
+ Public Delegate Sub PenjualanRowChangeEventHandler(ByVal sender As Object, ByVal e As PenjualanRowChangeEvent)
+
+ _
+ Public Delegate Sub TransactionTempRowChangeEventHandler(ByVal sender As Object, ByVal e As TransactionTempRowChangeEvent)
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class BarangDataTable
+ Inherits Global.System.Data.TypedTableBase(Of BarangRow)
+
+ Private columnidBarang As Global.System.Data.DataColumn
+
+ Private columnNama As Global.System.Data.DataColumn
+
+ Private columnJenis As Global.System.Data.DataColumn
+
+ Private columnHarga As Global.System.Data.DataColumn
+
+ Private columnDiskon As Global.System.Data.DataColumn
+
+ Private columnMinPembelian As Global.System.Data.DataColumn
+
+ Private columnidJenis As Global.System.Data.DataColumn
+
+ Private columnGambar As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "Barang"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property idBarangColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnidBarang
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property NamaColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnNama
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property JenisColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnJenis
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property HargaColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnHarga
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property DiskonColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnDiskon
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property MinPembelianColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnMinPembelian
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property idJenisColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnidJenis
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property GambarColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnGambar
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As BarangRow
+ Get
+ Return CType(Me.Rows(index),BarangRow)
+ End Get
+ End Property
+
+ _
+ Public Event BarangRowChanging As BarangRowChangeEventHandler
+
+ _
+ Public Event BarangRowChanged As BarangRowChangeEventHandler
+
+ _
+ Public Event BarangRowDeleting As BarangRowChangeEventHandler
+
+ _
+ Public Event BarangRowDeleted As BarangRowChangeEventHandler
+
+ _
+ Public Overloads Sub AddBarangRow(ByVal row As BarangRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function AddBarangRow(ByVal Nama As String, ByVal Jenis As String, ByVal Harga As String, ByVal Diskon As String, ByVal MinPembelian As String, ByVal parentJenisBarangRowByFK_Barang_JenisBarang As JenisBarangRow, ByVal Gambar() As Byte) As BarangRow
+ Dim rowBarangRow As BarangRow = CType(Me.NewRow,BarangRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, Nama, Jenis, Harga, Diskon, MinPembelian, Nothing, Gambar}
+ If (Not (parentJenisBarangRowByFK_Barang_JenisBarang) Is Nothing) Then
+ columnValuesArray(6) = parentJenisBarangRowByFK_Barang_JenisBarang(0)
+ End If
+ rowBarangRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowBarangRow)
+ Return rowBarangRow
+ End Function
+
+ _
+ Public Function FindByidBarang(ByVal idBarang As Integer) As BarangRow
+ Return CType(Me.Rows.Find(New Object() {idBarang}),BarangRow)
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As BarangDataTable = CType(MyBase.Clone,BarangDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New BarangDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnidBarang = MyBase.Columns("idBarang")
+ Me.columnNama = MyBase.Columns("Nama")
+ Me.columnJenis = MyBase.Columns("Jenis")
+ Me.columnHarga = MyBase.Columns("Harga")
+ Me.columnDiskon = MyBase.Columns("Diskon")
+ Me.columnMinPembelian = MyBase.Columns("MinPembelian")
+ Me.columnidJenis = MyBase.Columns("idJenis")
+ Me.columnGambar = MyBase.Columns("Gambar")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnidBarang = New Global.System.Data.DataColumn("idBarang", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnidBarang)
+ Me.columnNama = New Global.System.Data.DataColumn("Nama", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnNama)
+ Me.columnJenis = New Global.System.Data.DataColumn("Jenis", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnJenis)
+ Me.columnHarga = New Global.System.Data.DataColumn("Harga", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnHarga)
+ Me.columnDiskon = New Global.System.Data.DataColumn("Diskon", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnDiskon)
+ Me.columnMinPembelian = New Global.System.Data.DataColumn("MinPembelian", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnMinPembelian)
+ Me.columnidJenis = New Global.System.Data.DataColumn("idJenis", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnidJenis)
+ Me.columnGambar = New Global.System.Data.DataColumn("Gambar", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnGambar)
+ Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnidBarang}, true))
+ Me.columnidBarang.AutoIncrement = true
+ Me.columnidBarang.AutoIncrementSeed = -1
+ Me.columnidBarang.AutoIncrementStep = -1
+ Me.columnidBarang.AllowDBNull = false
+ Me.columnidBarang.ReadOnly = true
+ Me.columnidBarang.Unique = true
+ Me.columnNama.AllowDBNull = false
+ Me.columnNama.MaxLength = 50
+ Me.columnJenis.AllowDBNull = false
+ Me.columnJenis.MaxLength = 50
+ Me.columnHarga.AllowDBNull = false
+ Me.columnHarga.MaxLength = 50
+ Me.columnDiskon.MaxLength = 50
+ Me.columnMinPembelian.MaxLength = 50
+ End Sub
+
+ _
+ Public Function NewBarangRow() As BarangRow
+ Return CType(Me.NewRow,BarangRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New BarangRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(BarangRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.BarangRowChangedEvent) Is Nothing) Then
+ RaiseEvent BarangRowChanged(Me, New BarangRowChangeEvent(CType(e.Row,BarangRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.BarangRowChangingEvent) Is Nothing) Then
+ RaiseEvent BarangRowChanging(Me, New BarangRowChangeEvent(CType(e.Row,BarangRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.BarangRowDeletedEvent) Is Nothing) Then
+ RaiseEvent BarangRowDeleted(Me, New BarangRowChangeEvent(CType(e.Row,BarangRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.BarangRowDeletingEvent) Is Nothing) Then
+ RaiseEvent BarangRowDeleting(Me, New BarangRowChangeEvent(CType(e.Row,BarangRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub RemoveBarangRow(ByVal row As BarangRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As TokoRotiDataSet = New TokoRotiDataSet()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "BarangDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class JenisBarangDataTable
+ Inherits Global.System.Data.TypedTableBase(Of JenisBarangRow)
+
+ Private columnidJenis As Global.System.Data.DataColumn
+
+ Private columnJenis As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "JenisBarang"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property idJenisColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnidJenis
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property JenisColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnJenis
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As JenisBarangRow
+ Get
+ Return CType(Me.Rows(index),JenisBarangRow)
+ End Get
+ End Property
+
+ _
+ Public Event JenisBarangRowChanging As JenisBarangRowChangeEventHandler
+
+ _
+ Public Event JenisBarangRowChanged As JenisBarangRowChangeEventHandler
+
+ _
+ Public Event JenisBarangRowDeleting As JenisBarangRowChangeEventHandler
+
+ _
+ Public Event JenisBarangRowDeleted As JenisBarangRowChangeEventHandler
+
+ _
+ Public Overloads Sub AddJenisBarangRow(ByVal row As JenisBarangRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function AddJenisBarangRow(ByVal Jenis As String) As JenisBarangRow
+ Dim rowJenisBarangRow As JenisBarangRow = CType(Me.NewRow,JenisBarangRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, Jenis}
+ rowJenisBarangRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowJenisBarangRow)
+ Return rowJenisBarangRow
+ End Function
+
+ _
+ Public Function FindByidJenis(ByVal idJenis As Integer) As JenisBarangRow
+ Return CType(Me.Rows.Find(New Object() {idJenis}),JenisBarangRow)
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As JenisBarangDataTable = CType(MyBase.Clone,JenisBarangDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New JenisBarangDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnidJenis = MyBase.Columns("idJenis")
+ Me.columnJenis = MyBase.Columns("Jenis")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnidJenis = New Global.System.Data.DataColumn("idJenis", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnidJenis)
+ Me.columnJenis = New Global.System.Data.DataColumn("Jenis", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnJenis)
+ Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnidJenis}, true))
+ Me.columnidJenis.AutoIncrement = true
+ Me.columnidJenis.AutoIncrementSeed = -1
+ Me.columnidJenis.AutoIncrementStep = -1
+ Me.columnidJenis.AllowDBNull = false
+ Me.columnidJenis.ReadOnly = true
+ Me.columnidJenis.Unique = true
+ Me.columnJenis.AllowDBNull = false
+ Me.columnJenis.MaxLength = 50
+ End Sub
+
+ _
+ Public Function NewJenisBarangRow() As JenisBarangRow
+ Return CType(Me.NewRow,JenisBarangRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New JenisBarangRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(JenisBarangRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.JenisBarangRowChangedEvent) Is Nothing) Then
+ RaiseEvent JenisBarangRowChanged(Me, New JenisBarangRowChangeEvent(CType(e.Row,JenisBarangRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.JenisBarangRowChangingEvent) Is Nothing) Then
+ RaiseEvent JenisBarangRowChanging(Me, New JenisBarangRowChangeEvent(CType(e.Row,JenisBarangRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.JenisBarangRowDeletedEvent) Is Nothing) Then
+ RaiseEvent JenisBarangRowDeleted(Me, New JenisBarangRowChangeEvent(CType(e.Row,JenisBarangRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.JenisBarangRowDeletingEvent) Is Nothing) Then
+ RaiseEvent JenisBarangRowDeleting(Me, New JenisBarangRowChangeEvent(CType(e.Row,JenisBarangRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub RemoveJenisBarangRow(ByVal row As JenisBarangRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As TokoRotiDataSet = New TokoRotiDataSet()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "JenisBarangDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class LoginDataTable
+ Inherits Global.System.Data.TypedTableBase(Of LoginRow)
+
+ Private columnidPenjaga As Global.System.Data.DataColumn
+
+ Private columnusername As Global.System.Data.DataColumn
+
+ Private columnpassword As Global.System.Data.DataColumn
+
+ Private columnlevel As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "Login"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property idPenjagaColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnidPenjaga
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property usernameColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnusername
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property passwordColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnpassword
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property levelColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnlevel
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As LoginRow
+ Get
+ Return CType(Me.Rows(index),LoginRow)
+ End Get
+ End Property
+
+ _
+ Public Event LoginRowChanging As LoginRowChangeEventHandler
+
+ _
+ Public Event LoginRowChanged As LoginRowChangeEventHandler
+
+ _
+ Public Event LoginRowDeleting As LoginRowChangeEventHandler
+
+ _
+ Public Event LoginRowDeleted As LoginRowChangeEventHandler
+
+ _
+ Public Overloads Sub AddLoginRow(ByVal row As LoginRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function AddLoginRow(ByVal username As String, ByVal password As String, ByVal level As Integer) As LoginRow
+ Dim rowLoginRow As LoginRow = CType(Me.NewRow,LoginRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, username, password, level}
+ rowLoginRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowLoginRow)
+ Return rowLoginRow
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As LoginDataTable = CType(MyBase.Clone,LoginDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New LoginDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnidPenjaga = MyBase.Columns("idPenjaga")
+ Me.columnusername = MyBase.Columns("username")
+ Me.columnpassword = MyBase.Columns("password")
+ Me.columnlevel = MyBase.Columns("level")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnidPenjaga = New Global.System.Data.DataColumn("idPenjaga", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnidPenjaga)
+ Me.columnusername = New Global.System.Data.DataColumn("username", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnusername)
+ Me.columnpassword = New Global.System.Data.DataColumn("password", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnpassword)
+ Me.columnlevel = New Global.System.Data.DataColumn("level", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnlevel)
+ Me.columnidPenjaga.AutoIncrement = true
+ Me.columnidPenjaga.AutoIncrementSeed = -1
+ Me.columnidPenjaga.AutoIncrementStep = -1
+ Me.columnidPenjaga.AllowDBNull = false
+ Me.columnidPenjaga.ReadOnly = true
+ Me.columnusername.AllowDBNull = false
+ Me.columnusername.MaxLength = 50
+ Me.columnpassword.AllowDBNull = false
+ Me.columnpassword.MaxLength = 50
+ Me.columnlevel.AllowDBNull = false
+ End Sub
+
+ _
+ Public Function NewLoginRow() As LoginRow
+ Return CType(Me.NewRow,LoginRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New LoginRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(LoginRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.LoginRowChangedEvent) Is Nothing) Then
+ RaiseEvent LoginRowChanged(Me, New LoginRowChangeEvent(CType(e.Row,LoginRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.LoginRowChangingEvent) Is Nothing) Then
+ RaiseEvent LoginRowChanging(Me, New LoginRowChangeEvent(CType(e.Row,LoginRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.LoginRowDeletedEvent) Is Nothing) Then
+ RaiseEvent LoginRowDeleted(Me, New LoginRowChangeEvent(CType(e.Row,LoginRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.LoginRowDeletingEvent) Is Nothing) Then
+ RaiseEvent LoginRowDeleting(Me, New LoginRowChangeEvent(CType(e.Row,LoginRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub RemoveLoginRow(ByVal row As LoginRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As TokoRotiDataSet = New TokoRotiDataSet()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "LoginDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class PenjualanDataTable
+ Inherits Global.System.Data.TypedTableBase(Of PenjualanRow)
+
+ Private columnidPenjualan As Global.System.Data.DataColumn
+
+ Private columnNamaBarang As Global.System.Data.DataColumn
+
+ Private columnJumlah As Global.System.Data.DataColumn
+
+ Private columnHarga As Global.System.Data.DataColumn
+
+ Private columnDiskon As Global.System.Data.DataColumn
+
+ Private columnTotal As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "Penjualan"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property idPenjualanColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnidPenjualan
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property NamaBarangColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnNamaBarang
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property JumlahColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnJumlah
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property HargaColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnHarga
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property DiskonColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnDiskon
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property TotalColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnTotal
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As PenjualanRow
+ Get
+ Return CType(Me.Rows(index),PenjualanRow)
+ End Get
+ End Property
+
+ _
+ Public Event PenjualanRowChanging As PenjualanRowChangeEventHandler
+
+ _
+ Public Event PenjualanRowChanged As PenjualanRowChangeEventHandler
+
+ _
+ Public Event PenjualanRowDeleting As PenjualanRowChangeEventHandler
+
+ _
+ Public Event PenjualanRowDeleted As PenjualanRowChangeEventHandler
+
+ _
+ Public Overloads Sub AddPenjualanRow(ByVal row As PenjualanRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function AddPenjualanRow(ByVal NamaBarang As String, ByVal Jumlah As Integer, ByVal Harga As Integer, ByVal Diskon As String, ByVal Total As String) As PenjualanRow
+ Dim rowPenjualanRow As PenjualanRow = CType(Me.NewRow,PenjualanRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, NamaBarang, Jumlah, Harga, Diskon, Total}
+ rowPenjualanRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowPenjualanRow)
+ Return rowPenjualanRow
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As PenjualanDataTable = CType(MyBase.Clone,PenjualanDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New PenjualanDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnidPenjualan = MyBase.Columns("idPenjualan")
+ Me.columnNamaBarang = MyBase.Columns("NamaBarang")
+ Me.columnJumlah = MyBase.Columns("Jumlah")
+ Me.columnHarga = MyBase.Columns("Harga")
+ Me.columnDiskon = MyBase.Columns("Diskon")
+ Me.columnTotal = MyBase.Columns("Total")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnidPenjualan = New Global.System.Data.DataColumn("idPenjualan", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnidPenjualan)
+ Me.columnNamaBarang = New Global.System.Data.DataColumn("NamaBarang", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnNamaBarang)
+ Me.columnJumlah = New Global.System.Data.DataColumn("Jumlah", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnJumlah)
+ Me.columnHarga = New Global.System.Data.DataColumn("Harga", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnHarga)
+ Me.columnDiskon = New Global.System.Data.DataColumn("Diskon", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnDiskon)
+ Me.columnTotal = New Global.System.Data.DataColumn("Total", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnTotal)
+ Me.columnidPenjualan.AutoIncrement = true
+ Me.columnidPenjualan.AutoIncrementSeed = -1
+ Me.columnidPenjualan.AutoIncrementStep = -1
+ Me.columnidPenjualan.AllowDBNull = false
+ Me.columnidPenjualan.ReadOnly = true
+ Me.columnNamaBarang.AllowDBNull = false
+ Me.columnNamaBarang.MaxLength = 50
+ Me.columnJumlah.AllowDBNull = false
+ Me.columnHarga.AllowDBNull = false
+ Me.columnDiskon.MaxLength = 10
+ Me.columnTotal.AllowDBNull = false
+ Me.columnTotal.MaxLength = 10
+ End Sub
+
+ _
+ Public Function NewPenjualanRow() As PenjualanRow
+ Return CType(Me.NewRow,PenjualanRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New PenjualanRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(PenjualanRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.PenjualanRowChangedEvent) Is Nothing) Then
+ RaiseEvent PenjualanRowChanged(Me, New PenjualanRowChangeEvent(CType(e.Row,PenjualanRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.PenjualanRowChangingEvent) Is Nothing) Then
+ RaiseEvent PenjualanRowChanging(Me, New PenjualanRowChangeEvent(CType(e.Row,PenjualanRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.PenjualanRowDeletedEvent) Is Nothing) Then
+ RaiseEvent PenjualanRowDeleted(Me, New PenjualanRowChangeEvent(CType(e.Row,PenjualanRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.PenjualanRowDeletingEvent) Is Nothing) Then
+ RaiseEvent PenjualanRowDeleting(Me, New PenjualanRowChangeEvent(CType(e.Row,PenjualanRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub RemovePenjualanRow(ByVal row As PenjualanRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As TokoRotiDataSet = New TokoRotiDataSet()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "PenjualanDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class TransactionTempDataTable
+ Inherits Global.System.Data.TypedTableBase(Of TransactionTempRow)
+
+ Private columnidBarang As Global.System.Data.DataColumn
+
+ Private columnNamaBarang As Global.System.Data.DataColumn
+
+ Private columnHarga As Global.System.Data.DataColumn
+
+ Private columnJumlah As Global.System.Data.DataColumn
+
+ Private columnDiskon As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "TransactionTemp"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property idBarangColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnidBarang
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property NamaBarangColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnNamaBarang
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property HargaColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnHarga
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property JumlahColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnJumlah
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property DiskonColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnDiskon
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As TransactionTempRow
+ Get
+ Return CType(Me.Rows(index),TransactionTempRow)
+ End Get
+ End Property
+
+ _
+ Public Event TransactionTempRowChanging As TransactionTempRowChangeEventHandler
+
+ _
+ Public Event TransactionTempRowChanged As TransactionTempRowChangeEventHandler
+
+ _
+ Public Event TransactionTempRowDeleting As TransactionTempRowChangeEventHandler
+
+ _
+ Public Event TransactionTempRowDeleted As TransactionTempRowChangeEventHandler
+
+ _
+ Public Overloads Sub AddTransactionTempRow(ByVal row As TransactionTempRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function AddTransactionTempRow(ByVal parentBarangRowByFK_TransactionTemp_Barang As BarangRow, ByVal NamaBarang As String, ByVal Harga As Integer, ByVal Jumlah As Integer, ByVal Diskon As Integer) As TransactionTempRow
+ Dim rowTransactionTempRow As TransactionTempRow = CType(Me.NewRow,TransactionTempRow)
+ Dim columnValuesArray() As Object = New Object() {Nothing, NamaBarang, Harga, Jumlah, Diskon}
+ If (Not (parentBarangRowByFK_TransactionTemp_Barang) Is Nothing) Then
+ columnValuesArray(0) = parentBarangRowByFK_TransactionTemp_Barang(0)
+ End If
+ rowTransactionTempRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowTransactionTempRow)
+ Return rowTransactionTempRow
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As TransactionTempDataTable = CType(MyBase.Clone,TransactionTempDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New TransactionTempDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnidBarang = MyBase.Columns("idBarang")
+ Me.columnNamaBarang = MyBase.Columns("NamaBarang")
+ Me.columnHarga = MyBase.Columns("Harga")
+ Me.columnJumlah = MyBase.Columns("Jumlah")
+ Me.columnDiskon = MyBase.Columns("Diskon")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnidBarang = New Global.System.Data.DataColumn("idBarang", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnidBarang)
+ Me.columnNamaBarang = New Global.System.Data.DataColumn("NamaBarang", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnNamaBarang)
+ Me.columnHarga = New Global.System.Data.DataColumn("Harga", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnHarga)
+ Me.columnJumlah = New Global.System.Data.DataColumn("Jumlah", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnJumlah)
+ Me.columnDiskon = New Global.System.Data.DataColumn("Diskon", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnDiskon)
+ Me.columnidBarang.AllowDBNull = false
+ Me.columnNamaBarang.AllowDBNull = false
+ Me.columnNamaBarang.MaxLength = 50
+ Me.columnHarga.AllowDBNull = false
+ Me.columnJumlah.AllowDBNull = false
+ End Sub
+
+ _
+ Public Function NewTransactionTempRow() As TransactionTempRow
+ Return CType(Me.NewRow,TransactionTempRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New TransactionTempRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(TransactionTempRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.TransactionTempRowChangedEvent) Is Nothing) Then
+ RaiseEvent TransactionTempRowChanged(Me, New TransactionTempRowChangeEvent(CType(e.Row,TransactionTempRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.TransactionTempRowChangingEvent) Is Nothing) Then
+ RaiseEvent TransactionTempRowChanging(Me, New TransactionTempRowChangeEvent(CType(e.Row,TransactionTempRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.TransactionTempRowDeletedEvent) Is Nothing) Then
+ RaiseEvent TransactionTempRowDeleted(Me, New TransactionTempRowChangeEvent(CType(e.Row,TransactionTempRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.TransactionTempRowDeletingEvent) Is Nothing) Then
+ RaiseEvent TransactionTempRowDeleting(Me, New TransactionTempRowChangeEvent(CType(e.Row,TransactionTempRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub RemoveTransactionTempRow(ByVal row As TransactionTempRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As TokoRotiDataSet = New TokoRotiDataSet()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "TransactionTempDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
+ '''
+ '''Represents strongly named DataRow class.
+ '''
+ Partial Public Class BarangRow
+ Inherits Global.System.Data.DataRow
+
+ Private tableBarang As BarangDataTable
+
+ _
+ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
+ MyBase.New(rb)
+ Me.tableBarang = CType(Me.Table,BarangDataTable)
+ End Sub
+
+ _
+ Public Property idBarang() As Integer
+ Get
+ Return CType(Me(Me.tableBarang.idBarangColumn),Integer)
+ End Get
+ Set
+ Me(Me.tableBarang.idBarangColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property Nama() As String
+ Get
+ Return CType(Me(Me.tableBarang.NamaColumn),String)
+ End Get
+ Set
+ Me(Me.tableBarang.NamaColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property Jenis() As String
+ Get
+ Return CType(Me(Me.tableBarang.JenisColumn),String)
+ End Get
+ Set
+ Me(Me.tableBarang.JenisColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property Harga() As String
+ Get
+ Return CType(Me(Me.tableBarang.HargaColumn),String)
+ End Get
+ Set
+ Me(Me.tableBarang.HargaColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property Diskon() As String
+ Get
+ Try
+ Return CType(Me(Me.tableBarang.DiskonColumn),String)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("The value for column 'Diskon' in table 'Barang' is DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableBarang.DiskonColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property MinPembelian() As String
+ Get
+ Try
+ Return CType(Me(Me.tableBarang.MinPembelianColumn),String)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("The value for column 'MinPembelian' in table 'Barang' is DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableBarang.MinPembelianColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property idJenis() As Integer
+ Get
+ Try
+ Return CType(Me(Me.tableBarang.idJenisColumn),Integer)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("The value for column 'idJenis' in table 'Barang' is DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableBarang.idJenisColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property Gambar() As Byte()
+ Get
+ Try
+ Return CType(Me(Me.tableBarang.GambarColumn),Byte())
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("The value for column 'Gambar' in table 'Barang' is DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableBarang.GambarColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property JenisBarangRow() As JenisBarangRow
+ Get
+ Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_Barang_JenisBarang")),JenisBarangRow)
+ End Get
+ Set
+ Me.SetParentRow(value, Me.Table.ParentRelations("FK_Barang_JenisBarang"))
+ End Set
+ End Property
+
+ _
+ Public Function IsDiskonNull() As Boolean
+ Return Me.IsNull(Me.tableBarang.DiskonColumn)
+ End Function
+
+ _
+ Public Sub SetDiskonNull()
+ Me(Me.tableBarang.DiskonColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsMinPembelianNull() As Boolean
+ Return Me.IsNull(Me.tableBarang.MinPembelianColumn)
+ End Function
+
+ _
+ Public Sub SetMinPembelianNull()
+ Me(Me.tableBarang.MinPembelianColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsidJenisNull() As Boolean
+ Return Me.IsNull(Me.tableBarang.idJenisColumn)
+ End Function
+
+ _
+ Public Sub SetidJenisNull()
+ Me(Me.tableBarang.idJenisColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsGambarNull() As Boolean
+ Return Me.IsNull(Me.tableBarang.GambarColumn)
+ End Function
+
+ _
+ Public Sub SetGambarNull()
+ Me(Me.tableBarang.GambarColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function GetTransactionTempRows() As TransactionTempRow()
+ If (Me.Table.ChildRelations("FK_TransactionTemp_Barang") Is Nothing) Then
+ Return New TransactionTempRow(-1) {}
+ Else
+ Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_TransactionTemp_Barang")),TransactionTempRow())
+ End If
+ End Function
+ End Class
+
+ '''
+ '''Represents strongly named DataRow class.
+ '''
+ Partial Public Class JenisBarangRow
+ Inherits Global.System.Data.DataRow
+
+ Private tableJenisBarang As JenisBarangDataTable
+
+ _
+ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
+ MyBase.New(rb)
+ Me.tableJenisBarang = CType(Me.Table,JenisBarangDataTable)
+ End Sub
+
+ _
+ Public Property idJenis() As Integer
+ Get
+ Return CType(Me(Me.tableJenisBarang.idJenisColumn),Integer)
+ End Get
+ Set
+ Me(Me.tableJenisBarang.idJenisColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property Jenis() As String
+ Get
+ Return CType(Me(Me.tableJenisBarang.JenisColumn),String)
+ End Get
+ Set
+ Me(Me.tableJenisBarang.JenisColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Function GetBarangRows() As BarangRow()
+ If (Me.Table.ChildRelations("FK_Barang_JenisBarang") Is Nothing) Then
+ Return New BarangRow(-1) {}
+ Else
+ Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_Barang_JenisBarang")),BarangRow())
+ End If
+ End Function
+ End Class
+
+ '''