├── SalesInventorySystem.suo ├── SalesInventorySystem.v12.suo ├── Backup ├── SalesInventorySystem │ ├── SalesInventorySystem.vbproj.user │ ├── My Project │ │ ├── Settings.settings │ │ ├── Application.myapp │ │ ├── AssemblyInfo.vb │ │ ├── Application.Designer.vb │ │ ├── Resources.Designer.vb │ │ ├── Settings.Designer.vb │ │ └── Resources.resx │ ├── ModConVar.vb │ ├── frmAvailableStocks.vb │ ├── frmLogin.vb │ ├── frmReportStocksIn.vb │ ├── frmReportSoldItems.vb │ ├── frmPrintAvailableStocks.vb │ ├── frmPayment.vb │ ├── frmLoadItem.vb │ ├── frmLoadStaff.vb │ ├── frmLoadCustomer.vb │ ├── frmSoldItems.vb │ ├── frmReportStocksInPrint.vb │ ├── frmMain.vb │ ├── frmReportSoldItemsPrint.vb │ ├── frmUsers.vb │ ├── frmPayment.resx │ ├── frmPrintReceipt.vb │ ├── frmLoadCustomer.resx │ ├── frmLoadStaff.resx │ ├── frmCustomer.vb │ └── frmPayment.Designer.vb ├── SalesInventorySystem.suo └── SalesInventorySystem.sln ├── _UpgradeReport_Files ├── UpgradeReport_Plus.gif ├── UpgradeReport_Minus.gif └── UpgradeReport.css ├── SalesInventorySystem ├── bin │ └── Debug │ │ ├── Interop.MSDAOSP.dll │ │ ├── POSInventoryDB.mdb │ │ ├── SalesInventorySystem.exe │ │ ├── SalesInventorySystem.pdb │ │ ├── SalesInventorySystem.vshost.exe │ │ ├── SalesInventorySystem.vshost.exe.manifest │ │ └── SalesInventorySystem.xml ├── obj │ └── Debug │ │ ├── Interop.MSDAOSP.dll │ │ ├── SalesInventorySystem.exe │ │ ├── SalesInventorySystem.pdb │ │ ├── SalesInventorySystem.frmPOS.resources │ │ ├── SalesInventorySystem.frmItem.resources │ │ ├── SalesInventorySystem.frmLogin.resources │ │ ├── SalesInventorySystem.frmMain.resources │ │ ├── SalesInventorySystem.frmStaff.resources │ │ ├── SalesInventorySystem.frmUsers.resources │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── SalesInventorySystem.Resources.resources │ │ ├── SalesInventorySystem.frmCustomer.resources │ │ ├── SalesInventorySystem.frmLoadItem.resources │ │ ├── SalesInventorySystem.frmPayment.resources │ │ ├── SalesInventorySystem.frmLoadStaff.resources │ │ ├── SalesInventorySystem.frmSoldItems.resources │ │ ├── TempPE │ │ └── My Project.Resources.Designer.vb.dll │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── SalesInventorySystem.frmLoadCustomer.resources │ │ ├── SalesInventorySystem.frmPrintReceipt.resources │ │ ├── SalesInventorySystem.frmAvailableStocks.resources │ │ ├── SalesInventorySystem.frmReportSoldItems.resources │ │ ├── SalesInventorySystem.frmReportStocksIn.resources │ │ ├── SalesInventorySystem.vbproj.GenerateResource.Cache │ │ ├── SalesInventorySystem.frmPrintAvailableStocks.resources │ │ ├── SalesInventorySystem.frmReportSoldItemsPrint.resources │ │ ├── SalesInventorySystem.frmReportStocksInPrint.resources │ │ ├── SalesInventorySystem.vbproj.ResolveComReference.cache │ │ └── SalesInventorySystem.xml ├── Resources │ ├── 7_sunrise_logo_2016.png │ ├── IMG_20171018_165745.jpg │ └── 22228608_1672442186113233_9195088557503485724_n.png ├── My Project │ ├── Settings.settings │ ├── Application.myapp │ ├── AssemblyInfo.vb │ ├── Application.Designer.vb │ ├── Settings.Designer.vb │ └── Resources.Designer.vb ├── SalesInventorySystem.vbproj.user ├── ModConVar.vb ├── frmAvailableStocks.vb ├── frmLogin.vb ├── frmReportStocksIn.vb ├── frmReportSoldItems.vb ├── frmPrintAvailableStocks.vb ├── frmPayment.vb ├── frmLoadItem.vb ├── frmLoadStaff.vb ├── frmLoadCustomer.vb ├── frmSoldItems.vb ├── frmReportStocksInPrint.vb ├── frmReportSoldItemsPrint.vb ├── frmMain.vb ├── frmUsers.vb ├── frmPayment.resx ├── frmPrintReceipt.vb ├── frmLoadStaff.resx ├── frmLoadCustomer.resx ├── frmCustomer.vb ├── frmPayment.Designer.vb └── frmLoadItem.resx └── SalesInventorySystem.sln /SalesInventorySystem.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem.suo -------------------------------------------------------------------------------- /SalesInventorySystem.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem.v12.suo -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/SalesInventorySystem.vbproj.user: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/Backup/SalesInventorySystem.suo -------------------------------------------------------------------------------- /_UpgradeReport_Files/UpgradeReport_Plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/_UpgradeReport_Files/UpgradeReport_Plus.gif -------------------------------------------------------------------------------- /_UpgradeReport_Files/UpgradeReport_Minus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/_UpgradeReport_Files/UpgradeReport_Minus.gif -------------------------------------------------------------------------------- /SalesInventorySystem/bin/Debug/Interop.MSDAOSP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/bin/Debug/Interop.MSDAOSP.dll -------------------------------------------------------------------------------- /SalesInventorySystem/bin/Debug/POSInventoryDB.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/bin/Debug/POSInventoryDB.mdb -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/Interop.MSDAOSP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/Interop.MSDAOSP.dll -------------------------------------------------------------------------------- /SalesInventorySystem/Resources/7_sunrise_logo_2016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/Resources/7_sunrise_logo_2016.png -------------------------------------------------------------------------------- /SalesInventorySystem/Resources/IMG_20171018_165745.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/Resources/IMG_20171018_165745.jpg -------------------------------------------------------------------------------- /SalesInventorySystem/bin/Debug/SalesInventorySystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/bin/Debug/SalesInventorySystem.exe -------------------------------------------------------------------------------- /SalesInventorySystem/bin/Debug/SalesInventorySystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/bin/Debug/SalesInventorySystem.pdb -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.exe -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.pdb -------------------------------------------------------------------------------- /SalesInventorySystem/bin/Debug/SalesInventorySystem.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/bin/Debug/SalesInventorySystem.vshost.exe -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmPOS.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmPOS.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmItem.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmItem.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmLogin.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmLogin.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmMain.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmMain.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmStaff.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmStaff.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmUsers.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmUsers.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.Resources.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmCustomer.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmCustomer.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmLoadItem.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmLoadItem.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmPayment.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmPayment.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmLoadStaff.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmLoadStaff.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmSoldItems.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmSoldItems.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmLoadCustomer.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmLoadCustomer.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmPrintReceipt.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmPrintReceipt.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmAvailableStocks.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmAvailableStocks.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmReportSoldItems.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmReportSoldItems.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmReportStocksIn.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmReportStocksIn.resources -------------------------------------------------------------------------------- /SalesInventorySystem/Resources/22228608_1672442186113233_9195088557503485724_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/Resources/22228608_1672442186113233_9195088557503485724_n.png -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.vbproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.vbproj.GenerateResource.Cache -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmPrintAvailableStocks.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmPrintAvailableStocks.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmReportSoldItemsPrint.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmReportSoldItemsPrint.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.frmReportStocksInPrint.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.frmReportStocksInPrint.resources -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.vbproj.ResolveComReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isurutmv/POS-System-for-grocery-shop/HEAD/SalesInventorySystem/obj/Debug/SalesInventorySystem.vbproj.ResolveComReference.cache -------------------------------------------------------------------------------- /SalesInventorySystem/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SalesInventorySystem/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | frmMain 5 | false 6 | 0 7 | true 8 | 0 9 | true 10 | -------------------------------------------------------------------------------- /SalesInventorySystem/SalesInventorySystem.vbproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | en-US 11 | false 12 | 13 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | frmMain 5 | false 6 | 0 7 | true 8 | 0 9 | true 10 | -------------------------------------------------------------------------------- /SalesInventorySystem/bin/Debug/SalesInventorySystem.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /SalesInventorySystem/ModConVar.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Module ModConVar 4 | 5 | Public sqL As String 6 | Public cmd As OleDbCommand 7 | Public dr As OleDbDataReader 8 | 9 | Public conn As OleDbConnection 10 | Public connStr As String = System.Environment.CurrentDirectory.ToString & "\POSInventoryDB.mdb" 11 | 12 | Public Sub ConnDB() 13 | Try 14 | conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & connStr & "") 15 | conn.Open() 16 | Catch ex As Exception 17 | MsgBox(ex.Message) 18 | End Try 19 | End Sub 20 | 21 | End Module 22 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/ModConVar.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Module ModConVar 4 | 5 | Public sqL As String 6 | Public cmd As OleDbCommand 7 | Public dr As OleDbDataReader 8 | 9 | Public conn As OleDbConnection 10 | Public connStr As String = System.Environment.CurrentDirectory.ToString & "\POSInventoryDB.mdb" 11 | 12 | Public Sub ConnDB() 13 | Try 14 | conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & connStr & "") 15 | conn.Open() 16 | Catch ex As Exception 17 | MsgBox(ex.Message) 18 | End Try 19 | End Sub 20 | 21 | End Module 22 | -------------------------------------------------------------------------------- /SalesInventorySystem.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SalesInventorySystem", "SalesInventorySystem\SalesInventorySystem.vbproj", "{584D63A8-D444-4AA9-A628-1B881A4B9C3C}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {584D63A8-D444-4AA9-A628-1B881A4B9C3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {584D63A8-D444-4AA9-A628-1B881A4B9C3C}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {584D63A8-D444-4AA9-A628-1B881A4B9C3C}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {584D63A8-D444-4AA9-A628-1B881A4B9C3C}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SalesInventorySystem", "SalesInventorySystem\SalesInventorySystem.vbproj", "{584D63A8-D444-4AA9-A628-1B881A4B9C3C}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {584D63A8-D444-4AA9-A628-1B881A4B9C3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {584D63A8-D444-4AA9-A628-1B881A4B9C3C}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {584D63A8-D444-4AA9-A628-1B881A4B9C3C}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {584D63A8-D444-4AA9-A628-1B881A4B9C3C}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /SalesInventorySystem/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | ' General Information about an assembly is controlled through the following 6 | ' set of attributes. Change these attribute values to modify the information 7 | ' associated with an assembly. 8 | 9 | ' Review the values of the assembly attributes 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 21 | 22 | 23 | ' Version information for an assembly consists of the following four values: 24 | ' 25 | ' Major Version 26 | ' Minor Version 27 | ' Build Number 28 | ' Revision 29 | ' 30 | ' You can specify all the values or you can default the Build and Revision Numbers 31 | ' by using the '*' as shown below: 32 | ' 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | ' General Information about an assembly is controlled through the following 6 | ' set of attributes. Change these attribute values to modify the information 7 | ' associated with an assembly. 8 | 9 | ' Review the values of the assembly attributes 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 21 | 22 | 23 | ' Version information for an assembly consists of the following four values: 24 | ' 25 | ' Major Version 26 | ' Minor Version 27 | ' Build Number 28 | ' Revision 29 | ' 30 | ' You can specify all the values or you can default the Build and Revision Numbers 31 | ' by using the '*' as shown below: 32 | ' 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmAvailableStocks.vb: -------------------------------------------------------------------------------- 1 | 2 | 3 | Imports System.Data.OleDb 4 | Public Class frmAvailableStocks 5 | 6 | Private Sub LoadItems() 7 | Dim totalItems As Integer 8 | Try 9 | sqL = "SELECT IDescription, UnitPrice, StocksOnHand FROM ITEM Where StocksOnHand > 0 Order By IDescription" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | 14 | dgw.Rows.Clear() 15 | Do While dr.Read = True 16 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 17 | totalItems += dr(2) 18 | Loop 19 | lblTotalStocks.Text = totalItems 20 | Catch ex As Exception 21 | MsgBox(ex.Message) 22 | Finally 23 | cmd.Dispose() 24 | conn.Close() 25 | End Try 26 | End Sub 27 | 28 | Private Sub frmAvailableStocks_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 29 | LoadItems() 30 | End Sub 31 | 32 | Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click 33 | Me.Close() 34 | End Sub 35 | 36 | Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click 37 | frmPrintAvailableStocks.Show() 38 | End Sub 39 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/bin/Debug/SalesInventorySystem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SalesInventorySystem 6 | 7 | 8 | 9 | 10 | 11 | Returns the cached ResourceManager instance used by this class. 12 | 13 | 14 | 15 | Overrides the current thread's CurrentUICulture property for all 16 | resource lookups using this strongly typed resource class. 17 | 18 | 19 | 20 | Looks up a localized resource of type System.Drawing.Bitmap. 21 | 22 | 23 | 24 | Looks up a localized resource of type System.Drawing.Bitmap. 25 | 26 | 27 | 28 | Looks up a localized resource of type System.Drawing.Bitmap. 29 | 30 | 31 | 32 | A strongly-typed resource class, for looking up localized strings, etc. 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /SalesInventorySystem/obj/Debug/SalesInventorySystem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SalesInventorySystem 6 | 7 | 8 | 9 | 10 | 11 | Returns the cached ResourceManager instance used by this class. 12 | 13 | 14 | 15 | Overrides the current thread's CurrentUICulture property for all 16 | resource lookups using this strongly typed resource class. 17 | 18 | 19 | 20 | Looks up a localized resource of type System.Drawing.Bitmap. 21 | 22 | 23 | 24 | Looks up a localized resource of type System.Drawing.Bitmap. 25 | 26 | 27 | 28 | Looks up a localized resource of type System.Drawing.Bitmap. 29 | 30 | 31 | 32 | A strongly-typed resource class, for looking up localized strings, etc. 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmAvailableStocks.vb: -------------------------------------------------------------------------------- 1 | 2 | 3 | Imports System.Data.OleDb 4 | Public Class frmAvailableStocks 5 | 6 | Private Sub LoadItems() 7 | Dim totalItems As Integer 8 | Try 9 | sqL = "SELECT IDescription, UnitPrice, StocksOnHand FROM ITEM Where StocksOnHand > 0 Order By IDescription" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | 14 | dgw.Rows.Clear() 15 | Do While dr.Read = True 16 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 17 | totalItems += dr(2) 18 | Loop 19 | lblTotalStocks.Text = totalItems 20 | Catch ex As Exception 21 | MsgBox(ex.Message) 22 | Finally 23 | cmd.Dispose() 24 | conn.Close() 25 | End Try 26 | End Sub 27 | 28 | Private Sub frmAvailableStocks_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 29 | LoadItems() 30 | End Sub 31 | 32 | Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click 33 | Me.Close() 34 | End Sub 35 | 36 | Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click 37 | frmPrintAvailableStocks.Show() 38 | End Sub 39 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | 'NOTE: This file is auto-generated; do not modify it directly. To make changes, 18 | ' or if you encounter build errors in this file, go to the Project Designer 19 | ' (go to Project Properties or double-click the My Project node in 20 | ' Solution Explorer), and make changes on the Application tab. 21 | ' 22 | Partial Friend Class MyApplication 23 | 24 | _ 25 | Public Sub New() 26 | MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) 27 | Me.IsSingleInstance = false 28 | Me.EnableVisualStyles = true 29 | Me.SaveMySettingsOnExit = true 30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses 31 | End Sub 32 | 33 | _ 34 | Protected Overrides Sub OnCreateMainForm() 35 | Me.MainForm = Global.SalesInventorySystem.frmMain 36 | End Sub 37 | End Class 38 | End Namespace 39 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:2.0.50727.4927 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | 'NOTE: This file is auto-generated; do not modify it directly. To make changes, 18 | ' or if you encounter build errors in this file, go to the Project Designer 19 | ' (go to Project Properties or double-click the My Project node in 20 | ' Solution Explorer), and make changes on the Application tab. 21 | ' 22 | Partial Friend Class MyApplication 23 | 24 | _ 25 | Public Sub New() 26 | MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) 27 | Me.IsSingleInstance = false 28 | Me.EnableVisualStyles = true 29 | Me.SaveMySettingsOnExit = true 30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses 31 | End Sub 32 | 33 | _ 34 | Protected Overrides Sub OnCreateMainForm() 35 | Me.MainForm = Global.SalesInventorySystem.frmMain 36 | End Sub 37 | End Class 38 | End Namespace 39 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmLogin.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmLogin 4 | 5 | 6 | Private Sub Login() 7 | Try 8 | sqL = "SELECT * FROM Users WHERE Username = '" & txtUser.Text & "' AND pwd = '" & txtPwd.Text & "'" 9 | ConnDB() 10 | cmd = New OleDbCommand(sqL, conn) 11 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 12 | If dr.Read = True Then 13 | frmMain.lblEmployeeNo.Text = dr("StaffID") 14 | txtUser.Text = "" 15 | txtPwd.Text = "" 16 | Me.Close() 17 | Else 18 | MsgBox("Incorrect username or password!", MsgBoxStyle.Critical, "Login") 19 | txtPwd.Focus() 20 | End If 21 | Catch ex As Exception 22 | MsgBox(ex.Message) 23 | Finally 24 | cmd.Dispose() 25 | conn.Close() 26 | End Try 27 | End Sub 28 | 29 | 30 | 31 | Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click 32 | Login() 33 | End Sub 34 | 35 | Private Sub txtUser_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtUser.GotFocus 36 | AcceptButton = btnLogin 37 | End Sub 38 | 39 | 40 | Private Sub txtPwd_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPwd.GotFocus 41 | AcceptButton = btnLogin 42 | End Sub 43 | 44 | Private Sub btncancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncancel.Click 45 | 46 | If MsgBox("Are you sure you want to close?", MsgBoxStyle.YesNo, "Close Window") = MsgBoxResult.Yes Then 47 | End 48 | End If 49 | txtUser.Focus() 50 | End Sub 51 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmLogin.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmLogin 4 | 5 | 6 | Private Sub Login() 7 | Try 8 | sqL = "SELECT * FROM Users WHERE Username = '" & txtUser.Text & "' AND pwd = '" & txtPwd.Text & "'" 9 | ConnDB() 10 | cmd = New OleDbCommand(sqL, conn) 11 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 12 | If dr.Read = True Then 13 | frmMain.lblEmployeeNo.Text = dr("StaffID") 14 | txtUser.Text = "" 15 | txtPwd.Text = "" 16 | Me.Close() 17 | Else 18 | MsgBox("Incorrect username or password!", MsgBoxStyle.Critical, "Login") 19 | txtPwd.Focus() 20 | End If 21 | Catch ex As Exception 22 | MsgBox(ex.Message) 23 | Finally 24 | cmd.Dispose() 25 | conn.Close() 26 | End Try 27 | End Sub 28 | 29 | 30 | 31 | Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click 32 | Login() 33 | End Sub 34 | 35 | Private Sub txtUser_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtUser.GotFocus 36 | AcceptButton = btnLogin 37 | End Sub 38 | 39 | 40 | Private Sub txtPwd_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtPwd.GotFocus 41 | AcceptButton = btnLogin 42 | End Sub 43 | 44 | Private Sub btncancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncancel.Click 45 | 46 | If MsgBox("Are you sure you want to close?", MsgBoxStyle.YesNo, "Close Window") = MsgBoxResult.Yes Then 47 | End 48 | End If 49 | txtUser.Focus() 50 | End Sub 51 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmReportStocksIn.vb: -------------------------------------------------------------------------------- 1 | 2 | 3 | Imports System.Data.OleDb 4 | Public Class frmReportStocksIn 5 | 6 | Private Sub LoadStocksIn() 7 | Dim totalQuantity As Integer 8 | Dim totalStocks As Integer 9 | Try 10 | sqL = "SELECT SIDate, IDescription, ItemQuantity, CurrentStocks FROM Item as I, StocksIn as S WHERE I.ItemNo = S.ItemNo AND SIDate >= #" & dtpFrom.Text & "# AND SIDate <=#" & dtpTo.Text & "# Order By SIDate, IDescription" 11 | ConnDB() 12 | cmd = New OleDbCommand(sqL, conn) 13 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 14 | dgw.Rows.Clear() 15 | totalQuantity = 0 16 | totalStocks = 0 17 | Do While dr.Read = True 18 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(3)) 19 | totalQuantity += dr(2) 20 | totalStocks += dr(2) 21 | Loop 22 | lblQuantity.Text = Format(totalQuantity, "#,##0") 23 | 'lblTotal.Text = Format(totalStocks, "#,##0") 24 | Catch ex As Exception 25 | MsgBox(ex.Message) 26 | Finally 27 | cmd.Dispose() 28 | conn.Close() 29 | End Try 30 | End Sub 31 | 32 | 33 | Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 34 | Me.Close() 35 | End Sub 36 | 37 | Private Sub frmReportStocksIn_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 38 | 39 | End Sub 40 | 41 | Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 42 | LoadStocksIn() 43 | End Sub 44 | 45 | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 46 | frmReportStocksInPrint.Show() 47 | End Sub 48 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmReportStocksIn.vb: -------------------------------------------------------------------------------- 1 | 2 | 3 | Imports System.Data.OleDb 4 | Public Class frmReportStocksIn 5 | 6 | Private Sub LoadStocksIn() 7 | Dim totalQuantity As Integer 8 | Dim totalStocks As Integer 9 | Try 10 | sqL = "SELECT SIDate, IDescription, ItemQuantity, CurrentStocks FROM Item as I, StocksIn as S WHERE I.ItemNo = S.ItemNo AND SIDate >= #" & dtpFrom.Text & "# AND SIDate <=#" & dtpTo.Text & "# Order By SIDate, IDescription" 11 | ConnDB() 12 | cmd = New OleDbCommand(sqL, conn) 13 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 14 | dgw.Rows.Clear() 15 | totalQuantity = 0 16 | totalStocks = 0 17 | Do While dr.Read = True 18 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(3)) 19 | totalQuantity += dr(2) 20 | totalStocks += dr(2) 21 | Loop 22 | lblQuantity.Text = Format(totalQuantity, "#,##0") 23 | 'lblTotal.Text = Format(totalStocks, "#,##0") 24 | Catch ex As Exception 25 | MsgBox(ex.Message) 26 | Finally 27 | cmd.Dispose() 28 | conn.Close() 29 | End Try 30 | End Sub 31 | 32 | 33 | Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 34 | Me.Close() 35 | End Sub 36 | 37 | Private Sub frmReportStocksIn_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 38 | 39 | End Sub 40 | 41 | Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 42 | LoadStocksIn() 43 | End Sub 44 | 45 | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 46 | frmReportStocksInPrint.Show() 47 | End Sub 48 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmReportSoldItems.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmReportSoldItems 4 | 5 | Private Sub LoadSoldItemsReport() 6 | Dim totalAmount As Double 7 | Dim totalQuantity As Integer 8 | Try 9 | sqL = "SELECT IDescription, UnitPrice, SUM([Quantity]) as ItemQuantity, POSDate, (UnitPrice * SUM([Quantity])) As TotalAmount FROM Item as I, POS as P, POSDetail as PD WHERE I.ItemNo = PD.ItemNo AND PD.InvoiceNo=P.InvoiceNo AND POSDate >= #" & dtpFrom.Text & "# AND POSDate <=#" & dtpTo.Text & "# Group By IDescription, UnitPrice, [Quantity], POSDate ORder By IDescription" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | dgw.Rows.Clear() 14 | 15 | totalAmount = 0 16 | totalQuantity = 0 17 | Do While dr.Read = True 18 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(4)) 19 | totalAmount += dr(4) 20 | totalQuantity += dr(2) 21 | Loop 22 | 23 | lblQuantity.Text = totalQuantity 24 | lblTotal.Text = Format(totalAmount, "#,##0.00") 25 | Catch ex As Exception 26 | MsgBox(ex.Message) 27 | Finally 28 | cmd.Dispose() 29 | conn.Close() 30 | End Try 31 | End Sub 32 | 33 | Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 34 | LoadSoldItemsReport() 35 | End Sub 36 | 37 | Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 38 | Me.Close() 39 | End Sub 40 | 41 | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 42 | frmReportSoldItemsPrint.Show() 43 | End Sub 44 | 45 | Private Sub frmReportSoldItems_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 46 | lblQuantity.Text = "" 47 | lblTotal.Text = "" 48 | dgw.Rows.Clear() 49 | End Sub 50 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmReportSoldItems.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmReportSoldItems 4 | 5 | Private Sub LoadSoldItemsReport() 6 | Dim totalAmount As Double 7 | Dim totalQuantity As Integer 8 | Try 9 | sqL = "SELECT IDescription, UnitPrice, SUM([Quantity]) as ItemQuantity, POSDate, (UnitPrice * SUM([Quantity])) As TotalAmount FROM Item as I, POS as P, POSDetail as PD WHERE I.ItemNo = PD.ItemNo AND PD.InvoiceNo=P.InvoiceNo AND POSDate >= #" & dtpFrom.Text & "# AND POSDate <=#" & dtpTo.Text & "# Group By IDescription, UnitPrice, [Quantity], POSDate ORder By IDescription" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | dgw.Rows.Clear() 14 | 15 | totalAmount = 0 16 | totalQuantity = 0 17 | Do While dr.Read = True 18 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(4)) 19 | totalAmount += dr(4) 20 | totalQuantity += dr(2) 21 | Loop 22 | 23 | lblQuantity.Text = totalQuantity 24 | lblTotal.Text = Format(totalAmount, "#,##0.00") 25 | Catch ex As Exception 26 | MsgBox(ex.Message) 27 | Finally 28 | cmd.Dispose() 29 | conn.Close() 30 | End Try 31 | End Sub 32 | 33 | Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 34 | LoadSoldItemsReport() 35 | End Sub 36 | 37 | Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 38 | Me.Close() 39 | End Sub 40 | 41 | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 42 | frmReportSoldItemsPrint.Show() 43 | End Sub 44 | 45 | Private Sub frmReportSoldItems_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 46 | lblQuantity.Text = "" 47 | lblTotal.Text = "" 48 | dgw.Rows.Clear() 49 | End Sub 50 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmPrintAvailableStocks.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmPrintAvailableStocks 4 | 5 | Private Sub LoadItems() 6 | Dim totalItems As Integer 7 | Dim y As Integer 8 | Try 9 | sqL = "SELECT IDescription, UnitPrice, StocksOnHand FROM ITEM Where StocksOnHand > 0 Order By IDescription" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | 14 | dgw.Rows.Clear() 15 | Do While dr.Read = True 16 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 17 | totalItems += dr(2) 18 | y += 19 19 | 20 | Loop 21 | Me.Height = Me.Height + y 22 | Me.Panel1.Height = Me.Panel1.Height + y 23 | Me.dgw.Height = Me.dgw.Height + y 24 | 25 | Me.Panel4.Location = New Point(1, 132 + y) 26 | Me.Panel3.Location = New Point(0, 172 + y) 27 | lblTotalStocks.Text = totalItems 28 | Catch ex As Exception 29 | MsgBox(ex.Message) 30 | Finally 31 | cmd.Dispose() 32 | conn.Close() 33 | End Try 34 | End Sub 35 | 36 | Private Sub frmPrintAvailableStocks_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 37 | LoadItems() 38 | PrintDialog1.Document = Me.PrintDocument1 39 | 40 | Dim ButtonPressed As DialogResult = PrintDialog1.ShowDialog() 41 | If (ButtonPressed = DialogResult.OK) Then 42 | PrintDocument1.Print() 43 | End If 44 | Me.Close() 45 | End Sub 46 | 47 | Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 48 | Dim bm As New Bitmap(Me.Panel1.Width, Me.Panel1.Height) 49 | 50 | Panel1.DrawToBitmap(bm, New Rectangle(0, 0, Me.Panel1.Width, Me.Panel1.Height)) 51 | 52 | e.Graphics.DrawImage(bm, 0, 0) 53 | Dim aPS As New PageSetupDialog 54 | aPS.Document = PrintDocument1 55 | End Sub 56 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmPrintAvailableStocks.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmPrintAvailableStocks 4 | 5 | Private Sub LoadItems() 6 | Dim totalItems As Integer 7 | Dim y As Integer 8 | Try 9 | sqL = "SELECT IDescription, UnitPrice, StocksOnHand FROM ITEM Where StocksOnHand > 0 Order By IDescription" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | 14 | dgw.Rows.Clear() 15 | Do While dr.Read = True 16 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 17 | totalItems += dr(2) 18 | y += 19 19 | 20 | Loop 21 | Me.Height = Me.Height + y 22 | Me.Panel1.Height = Me.Panel1.Height + y 23 | Me.dgw.Height = Me.dgw.Height + y 24 | 25 | Me.Panel4.Location = New Point(1, 132 + y) 26 | Me.Panel3.Location = New Point(0, 172 + y) 27 | lblTotalStocks.Text = totalItems 28 | Catch ex As Exception 29 | MsgBox(ex.Message) 30 | Finally 31 | cmd.Dispose() 32 | conn.Close() 33 | End Try 34 | End Sub 35 | 36 | Private Sub frmPrintAvailableStocks_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 37 | LoadItems() 38 | PrintDialog1.Document = Me.PrintDocument1 39 | 40 | Dim ButtonPressed As DialogResult = PrintDialog1.ShowDialog() 41 | If (ButtonPressed = DialogResult.OK) Then 42 | PrintDocument1.Print() 43 | End If 44 | Me.Close() 45 | End Sub 46 | 47 | Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 48 | Dim bm As New Bitmap(Me.Panel1.Width, Me.Panel1.Height) 49 | 50 | Panel1.DrawToBitmap(bm, New Rectangle(0, 0, Me.Panel1.Width, Me.Panel1.Height)) 51 | 52 | e.Graphics.DrawImage(bm, 0, 0) 53 | Dim aPS As New PageSetupDialog 54 | aPS.Document = PrintDocument1 55 | End Sub 56 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmPayment.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmPayment 4 | 5 | 6 | 7 | Private Sub AddPayment() 8 | txtCash.Text = txtCash.Text.Replace(",", "") 9 | Try 10 | sqL = "INSERT INTO PAYMENT(InvoiceNo,[Cash],[Change]) VALUES('" & frmPOS.lblInvoiceNo.Text & "','" & txtCash.Text & "', '" & txtChange.Text & "')" 11 | ConnDB() 12 | cmd = New OleDbCommand(sqL, conn) 13 | cmd.ExecuteNonQuery() 14 | 15 | Catch ex As Exception 16 | MsgBox(ex.Message) 17 | Finally 18 | cmd.Dispose() 19 | conn.Close() 20 | End Try 21 | End Sub 22 | 23 | Private Sub txtCash_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCash.KeyPress 24 | If e.KeyChar = ControlChars.Cr Then 25 | 26 | If txtCash.Text = "" Then 27 | MsgBox("Please Enter Amount! ", MsgBoxStyle.Information, "Payment") 28 | txtCash.Focus() 29 | Exit Sub 30 | End If 31 | 32 | If Val(txtCash.Text) < Val(txtTA.Text) Then 33 | MsgBox("The Amount is Lower than the Cost", MsgBoxStyle.Exclamation, "Payment") 34 | txtCash.SelectAll() 35 | txtCash.Focus() 36 | Exit Sub 37 | End If 38 | 39 | frmPOS.AddPOS() 40 | AddPayment() 41 | MsgBox("printing receipt...", MsgBoxStyle.Information, "Receipt") 42 | frmPrintReceipt.Show() 43 | frmPOS.NewTransaction() 44 | frmPOS.txtSearch.Focus() 45 | Me.Close() 46 | End If 47 | End Sub 48 | 49 | Private Sub txtCash_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtCash.TextChanged 50 | txtChange.Text = Format(Val(txtCash.Text.Replace(",", "")) - Val(txtTA.Text.Replace(",", "")), "0.00") 51 | End Sub 52 | 53 | Private Sub frmPayment_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 54 | txtTA.Text = frmPOS.lblTotalCost.Text 55 | End Sub 56 | 57 | 58 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmPayment.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmPayment 4 | 5 | 6 | 7 | Private Sub AddPayment() 8 | txtCash.Text = txtCash.Text.Replace(",", "") 9 | Try 10 | sqL = "INSERT INTO PAYMENT(InvoiceNo,[Cash],[Change]) VALUES('" & frmPOS.lblInvoiceNo.Text & "','" & txtCash.Text & "', '" & txtChange.Text & "')" 11 | ConnDB() 12 | cmd = New OleDbCommand(sqL, conn) 13 | cmd.ExecuteNonQuery() 14 | 15 | Catch ex As Exception 16 | MsgBox(ex.Message) 17 | Finally 18 | cmd.Dispose() 19 | conn.Close() 20 | End Try 21 | End Sub 22 | 23 | Private Sub txtCash_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCash.KeyPress 24 | If e.KeyChar = ControlChars.Cr Then 25 | 26 | If txtCash.Text = "" Then 27 | MsgBox("Please Enter Amount! ", MsgBoxStyle.Information, "Payment") 28 | txtCash.Focus() 29 | Exit Sub 30 | End If 31 | 32 | If Val(txtCash.Text) < Val(txtTA.Text) Then 33 | MsgBox("The Amount is Lower than the Cost", MsgBoxStyle.Exclamation, "Payment") 34 | txtCash.SelectAll() 35 | txtCash.Focus() 36 | Exit Sub 37 | End If 38 | 39 | frmPOS.AddPOS() 40 | AddPayment() 41 | MsgBox("printing receipt...", MsgBoxStyle.Information, "Receipt") 42 | frmPrintReceipt.Show() 43 | frmPOS.NewTransaction() 44 | frmPOS.txtSearch.Focus() 45 | Me.Close() 46 | End If 47 | End Sub 48 | 49 | Private Sub txtCash_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtCash.TextChanged 50 | txtChange.Text = Format(Val(txtCash.Text.Replace(",", "")) - Val(txtTA.Text.Replace(",", "")), "0.00") 51 | End Sub 52 | 53 | Private Sub frmPayment_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 54 | txtTA.Text = frmPOS.lblTotalCost.Text 55 | End Sub 56 | 57 | 58 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmLoadItem.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmLoadItem 4 | 5 | Private Sub LoadItem() 6 | Try 7 | sqL = "SELECT ItemNo, itemCode, iDescription, StocksOnHand FROM Item Order By iDescription" 8 | ConnDB() 9 | cmd = New OleDbCommand(sqL, conn) 10 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 11 | dgw.Rows.Clear() 12 | Do While dr.Read = True 13 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(3)) 14 | Loop 15 | Catch ex As Exception 16 | MsgBox(ex.Message) 17 | Finally 18 | cmd.Dispose() 19 | conn.Close() 20 | End Try 21 | End Sub 22 | 23 | Private Sub Search() 24 | Try 25 | sqL = "SELECT ItemNo, itemCode, iDescription, StocksOnHand FROM Item WHERE iDescription LIKE '" & TextBox1.Text & "%' Order By iDescription" 26 | ConnDB() 27 | cmd = New OleDbCommand(sqL, conn) 28 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 29 | dgw.Rows.Clear() 30 | Do While dr.Read = True 31 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(3)) 32 | Loop 33 | Catch ex As Exception 34 | MsgBox(ex.Message) 35 | Finally 36 | cmd.Dispose() 37 | conn.Close() 38 | End Try 39 | End Sub 40 | 41 | Private Sub frmLoadItem_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 42 | LoadItem() 43 | End Sub 44 | 45 | Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged 46 | Search() 47 | End Sub 48 | 49 | Private Sub dgw_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgw.CellDoubleClick 50 | If frmItem.search = True Then 51 | frmItem.txtItemNo.Text = dgw.CurrentRow.Cells(0).Value 52 | frmItem.search = False 53 | Me.Close() 54 | End If 55 | 56 | If frmPOS.posSearch = True Then 57 | frmPOS.txtSearch.Text = dgw.CurrentRow.Cells(0).Value 58 | frmPOS.posSearch = False 59 | Me.Close() 60 | End If 61 | 62 | End Sub 63 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmLoadItem.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmLoadItem 4 | 5 | Private Sub LoadItem() 6 | Try 7 | sqL = "SELECT ItemNo, itemCode, iDescription, StocksOnHand FROM Item Order By iDescription" 8 | ConnDB() 9 | cmd = New OleDbCommand(sqL, conn) 10 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 11 | dgw.Rows.Clear() 12 | Do While dr.Read = True 13 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(3)) 14 | Loop 15 | Catch ex As Exception 16 | MsgBox(ex.Message) 17 | Finally 18 | cmd.Dispose() 19 | conn.Close() 20 | End Try 21 | End Sub 22 | 23 | Private Sub Search() 24 | Try 25 | sqL = "SELECT ItemNo, itemCode, iDescription, StocksOnHand FROM Item WHERE iDescription LIKE '" & TextBox1.Text & "%' Order By iDescription" 26 | ConnDB() 27 | cmd = New OleDbCommand(sqL, conn) 28 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 29 | dgw.Rows.Clear() 30 | Do While dr.Read = True 31 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(3)) 32 | Loop 33 | Catch ex As Exception 34 | MsgBox(ex.Message) 35 | Finally 36 | cmd.Dispose() 37 | conn.Close() 38 | End Try 39 | End Sub 40 | 41 | Private Sub frmLoadItem_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 42 | LoadItem() 43 | End Sub 44 | 45 | Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged 46 | Search() 47 | End Sub 48 | 49 | Private Sub dgw_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgw.CellDoubleClick 50 | If frmItem.search = True Then 51 | frmItem.txtItemNo.Text = dgw.CurrentRow.Cells(0).Value 52 | frmItem.search = False 53 | Me.Close() 54 | End If 55 | 56 | If frmPOS.posSearch = True Then 57 | frmPOS.txtSearch.Text = dgw.CurrentRow.Cells(0).Value 58 | frmPOS.posSearch = False 59 | Me.Close() 60 | End If 61 | 62 | End Sub 63 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmLoadStaff.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmLoadStaff 4 | 5 | Private Sub LoadStaff() 6 | Try 7 | sqL = "SELECT StaffID, Lastname & ', ' & Firstname & ' ' & mi as StaffName, [Position] FROM STAFF Order by Lastname" 8 | ConnDB() 9 | cmd = New OleDbCommand(sqL, conn) 10 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 11 | dgw.Rows.Clear() 12 | Do While dr.Read = True 13 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 14 | 15 | Loop 16 | Catch ex As Exception 17 | MsgBox(ex.Message) 18 | Finally 19 | cmd.Dispose() 20 | conn.Close() 21 | End Try 22 | End Sub 23 | 24 | Private Sub SearchStaff() 25 | Try 26 | sqL = "SELECT StaffID, Lastname & ', ' & Firstname & ' ' & mi as StaffName, [Position] FROM STAFF WHERE Lastname LIKE '" & TextBox1.Text & "%' Order by Lastname" 27 | ConnDB() 28 | cmd = New OleDbCommand(sqL, conn) 29 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 30 | dgw.Rows.Clear() 31 | Do While dr.Read = True 32 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 33 | 34 | Loop 35 | Catch ex As Exception 36 | MsgBox(ex.Message) 37 | Finally 38 | cmd.Dispose() 39 | conn.Close() 40 | End Try 41 | End Sub 42 | 43 | Private Sub frmLoadStaff_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 44 | 45 | LoadStaff() 46 | End Sub 47 | 48 | Private Sub dgw_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgw.CellDoubleClick 49 | If frmStaff.search = True Then 50 | frmStaff.txtStaffID.Text = dgw.CurrentRow.Cells(0).Value 51 | Me.Close() 52 | End If 53 | If frmUsers.uSearch = True Then 54 | frmUsers.txtStaffID.Text = dgw.CurrentRow.Cells(0).Value 55 | frmUsers.uSearch = False 56 | Me.Close() 57 | End If 58 | End Sub 59 | 60 | Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged 61 | SearchStaff() 62 | End Sub 63 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmLoadStaff.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmLoadStaff 4 | 5 | Private Sub LoadStaff() 6 | Try 7 | sqL = "SELECT StaffID, Lastname & ', ' & Firstname & ' ' & mi as StaffName, [Position] FROM STAFF Order by Lastname" 8 | ConnDB() 9 | cmd = New OleDbCommand(sqL, conn) 10 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 11 | dgw.Rows.Clear() 12 | Do While dr.Read = True 13 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 14 | 15 | Loop 16 | Catch ex As Exception 17 | MsgBox(ex.Message) 18 | Finally 19 | cmd.Dispose() 20 | conn.Close() 21 | End Try 22 | End Sub 23 | 24 | Private Sub SearchStaff() 25 | Try 26 | sqL = "SELECT StaffID, Lastname & ', ' & Firstname & ' ' & mi as StaffName, [Position] FROM STAFF WHERE Lastname LIKE '" & TextBox1.Text & "%' Order by Lastname" 27 | ConnDB() 28 | cmd = New OleDbCommand(sqL, conn) 29 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 30 | dgw.Rows.Clear() 31 | Do While dr.Read = True 32 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 33 | 34 | Loop 35 | Catch ex As Exception 36 | MsgBox(ex.Message) 37 | Finally 38 | cmd.Dispose() 39 | conn.Close() 40 | End Try 41 | End Sub 42 | 43 | Private Sub frmLoadStaff_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 44 | 45 | LoadStaff() 46 | End Sub 47 | 48 | Private Sub dgw_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgw.CellDoubleClick 49 | If frmStaff.search = True Then 50 | frmStaff.txtStaffID.Text = dgw.CurrentRow.Cells(0).Value 51 | Me.Close() 52 | End If 53 | If frmUsers.uSearch = True Then 54 | frmUsers.txtStaffID.Text = dgw.CurrentRow.Cells(0).Value 55 | frmUsers.uSearch = False 56 | Me.Close() 57 | End If 58 | End Sub 59 | 60 | Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged 61 | SearchStaff() 62 | End Sub 63 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmLoadCustomer.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmLoadCustomer 4 | 5 | Private Sub LoadCustomer() 6 | Try 7 | sqL = "SELECT CustomerNo, CustName, Address FROM Customer Order By CustName" 8 | ConnDB() 9 | cmd = New OleDbCommand(sqL, conn) 10 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 11 | dgw.Rows.Clear() 12 | Do While dr.Read = True 13 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 14 | Loop 15 | Catch ex As Exception 16 | MsgBox(ex.Message) 17 | Finally 18 | cmd.Dispose() 19 | conn.Close() 20 | End Try 21 | End Sub 22 | 23 | Private Sub SearchCustomer() 24 | Try 25 | sqL = "SELECT CustomerNo, CustName, Address FROM Customer WHERE CustName LIKE '" & TextBox1.Text & "%' Order By CustName" 26 | ConnDB() 27 | cmd = New OleDbCommand(sqL, conn) 28 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 29 | dgw.Rows.Clear() 30 | Do While dr.Read = True 31 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 32 | Loop 33 | Catch ex As Exception 34 | MsgBox(ex.Message) 35 | Finally 36 | cmd.Dispose() 37 | conn.Close() 38 | End Try 39 | End Sub 40 | 41 | 42 | Private Sub dgw_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgw.CellDoubleClick 43 | If frmCustomer.search = True Then 44 | frmCustomer.txtCustNo.Text = dgw.CurrentRow.Cells(0).Value 45 | Me.Close() 46 | End If 47 | 48 | If frmPOS.isSearchCust = True Then 49 | frmPOS.lblCustomerNo.Text = dgw.CurrentRow.Cells(0).Value 50 | frmPOS.lblCustomerName.Text = dgw.CurrentRow.Cells(1).Value 51 | frmPOS.isSearchCust = False 52 | Me.Close() 53 | End If 54 | End Sub 55 | 56 | Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged 57 | SearchCustomer() 58 | End Sub 59 | 60 | Private Sub frmLoadCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 61 | LoadCustomer() 62 | End Sub 63 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmLoadCustomer.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmLoadCustomer 4 | 5 | Private Sub LoadCustomer() 6 | Try 7 | sqL = "SELECT CustomerNo, CustName, Address FROM Customer Order By CustName" 8 | ConnDB() 9 | cmd = New OleDbCommand(sqL, conn) 10 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 11 | dgw.Rows.Clear() 12 | Do While dr.Read = True 13 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 14 | Loop 15 | Catch ex As Exception 16 | MsgBox(ex.Message) 17 | Finally 18 | cmd.Dispose() 19 | conn.Close() 20 | End Try 21 | End Sub 22 | 23 | Private Sub SearchCustomer() 24 | Try 25 | sqL = "SELECT CustomerNo, CustName, Address FROM Customer WHERE CustName LIKE '" & TextBox1.Text & "%' Order By CustName" 26 | ConnDB() 27 | cmd = New OleDbCommand(sqL, conn) 28 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 29 | dgw.Rows.Clear() 30 | Do While dr.Read = True 31 | dgw.Rows.Add(dr(0), dr(1), dr(2)) 32 | Loop 33 | Catch ex As Exception 34 | MsgBox(ex.Message) 35 | Finally 36 | cmd.Dispose() 37 | conn.Close() 38 | End Try 39 | End Sub 40 | 41 | 42 | Private Sub dgw_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgw.CellDoubleClick 43 | If frmCustomer.search = True Then 44 | frmCustomer.txtCustNo.Text = dgw.CurrentRow.Cells(0).Value 45 | Me.Close() 46 | End If 47 | 48 | If frmPOS.isSearchCust = True Then 49 | frmPOS.lblCustomerNo.Text = dgw.CurrentRow.Cells(0).Value 50 | frmPOS.lblCustomerName.Text = dgw.CurrentRow.Cells(1).Value 51 | frmPOS.isSearchCust = False 52 | Me.Close() 53 | End If 54 | End Sub 55 | 56 | Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged 57 | SearchCustomer() 58 | End Sub 59 | 60 | Private Sub frmLoadCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 61 | LoadCustomer() 62 | End Sub 63 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:2.0.50727.4927 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | Imports System 15 | 16 | Namespace My.Resources 17 | 18 | 'This class was auto-generated by the StronglyTypedResourceBuilder 19 | 'class via a tool like ResGen or Visual Studio. 20 | 'To add or remove a member, edit your .ResX file then rerun ResGen 21 | 'with the /str option, or rebuild your VS project. 22 | ''' 23 | ''' A strongly-typed resource class, for looking up localized strings, etc. 24 | ''' 25 | _ 29 | Friend Module Resources 30 | 31 | Private resourceMan As Global.System.Resources.ResourceManager 32 | 33 | Private resourceCulture As Global.System.Globalization.CultureInfo 34 | 35 | ''' 36 | ''' Returns the cached ResourceManager instance used by this class. 37 | ''' 38 | _ 39 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 40 | Get 41 | If Object.ReferenceEquals(resourceMan, Nothing) Then 42 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("SalesInventorySystem.Resources", GetType(Resources).Assembly) 43 | resourceMan = temp 44 | End If 45 | Return resourceMan 46 | End Get 47 | End Property 48 | 49 | ''' 50 | ''' Overrides the current thread's CurrentUICulture property for all 51 | ''' resource lookups using this strongly typed resource class. 52 | ''' 53 | _ 54 | Friend Property Culture() As Global.System.Globalization.CultureInfo 55 | Get 56 | Return resourceCulture 57 | End Get 58 | Set 59 | resourceCulture = value 60 | End Set 61 | End Property 62 | End Module 63 | End Namespace 64 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmSoldItems.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmSoldItems 4 | 5 | Private Sub LoadSoldItems() 6 | Dim totalAmount As Double 7 | Dim totalQuantity As Integer 8 | 9 | If chkDaily.CheckState = CheckState.Checked Then 10 | sqL = "SELECT IDescription, UnitPrice, SUM([Quantity]) as ItemQuantity, POSDate, (UnitPrice * SUM([Quantity])) As TotalAmount FROM Item as I, POS as P, POSDetail as PD WHERE I.ItemNo = PD.ItemNo AND PD.InvoiceNo=P.InvoiceNo AND DAY(POSDate) =" & Format(DateTimePicker1.Value, "dd") & " Group By IDescription, UnitPrice, [Quantity], POSDate ORder By IDescription" 11 | End If 12 | If chkMonthly.CheckState = CheckState.Checked Then 13 | sqL = "SELECT IDescription, UnitPrice, SUM([Quantity]) as ItemQuantity, POSDate, (UnitPrice * SUM([Quantity])) As TotalAmount FROM Item as I, POS as P, POSDetail as PD WHERE I.ItemNo = PD.ItemNo AND PD.InvoiceNo=P.InvoiceNo AND MONTH(POSDate) =" & Format(DateTimePicker1.Value, "MM") & " Group By IDescription, UnitPrice, [Quantity], POSDate ORder By IDescription" 14 | End If 15 | 16 | Try 17 | ConnDB() 18 | cmd = New OleDbCommand(sqL, conn) 19 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 20 | dgw.Rows.Clear() 21 | totalAmount = 0 22 | totalQuantity = 0 23 | Do While dr.Read = True 24 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(4)) 25 | totalQuantity += dr(2) 26 | totalAmount += dr(4) 27 | Loop 28 | lblQuantity.Text = totalQuantity 29 | lblTotal.Text = Format(totalAmount, "#,##0.00") 30 | Catch ex As Exception 31 | MsgBox(ex.Message) 32 | Finally 33 | cmd.Dispose() 34 | conn.Close() 35 | End Try 36 | End Sub 37 | 38 | Private Sub frmSoldItems_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 39 | lblQuantity.Text = "" 40 | lblTotal.Text = "" 41 | dgw.Rows.Clear() 42 | End Sub 43 | 44 | Private Sub chkDaily_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkDaily.CheckedChanged 45 | If chkDaily.CheckState = CheckState.Checked Then 46 | chkMonthly.CheckState = CheckState.Unchecked 47 | End If 48 | End Sub 49 | 50 | Private Sub chkMonthly_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkMonthly.CheckedChanged 51 | If chkMonthly.CheckState = CheckState.Checked Then 52 | chkDaily.CheckState = CheckState.Unchecked 53 | End If 54 | End Sub 55 | 56 | Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 57 | If chkDaily.CheckState = CheckState.Unchecked And chkMonthly.CheckState = CheckState.Unchecked Then 58 | MsgBox("Please select either daily or monthly", MsgBoxStyle.Critical, "Select") 59 | Exit Sub 60 | End If 61 | LoadSoldItems() 62 | End Sub 63 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmSoldItems.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmSoldItems 4 | 5 | Private Sub LoadSoldItems() 6 | Dim totalAmount As Double 7 | Dim totalQuantity As Integer 8 | 9 | If chkDaily.CheckState = CheckState.Checked Then 10 | sqL = "SELECT IDescription, UnitPrice, SUM([Quantity]) as ItemQuantity, POSDate, (UnitPrice * SUM([Quantity])) As TotalAmount FROM Item as I, POS as P, POSDetail as PD WHERE I.ItemNo = PD.ItemNo AND PD.InvoiceNo=P.InvoiceNo AND DAY(POSDate) =" & Format(DateTimePicker1.Value, "dd") & " Group By IDescription, UnitPrice, [Quantity], POSDate ORder By IDescription" 11 | End If 12 | If chkMonthly.CheckState = CheckState.Checked Then 13 | sqL = "SELECT IDescription, UnitPrice, SUM([Quantity]) as ItemQuantity, POSDate, (UnitPrice * SUM([Quantity])) As TotalAmount FROM Item as I, POS as P, POSDetail as PD WHERE I.ItemNo = PD.ItemNo AND PD.InvoiceNo=P.InvoiceNo AND MONTH(POSDate) =" & Format(DateTimePicker1.Value, "MM") & " Group By IDescription, UnitPrice, [Quantity], POSDate ORder By IDescription" 14 | End If 15 | 16 | Try 17 | ConnDB() 18 | cmd = New OleDbCommand(sqL, conn) 19 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 20 | dgw.Rows.Clear() 21 | totalAmount = 0 22 | totalQuantity = 0 23 | Do While dr.Read = True 24 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(4)) 25 | totalQuantity += dr(2) 26 | totalAmount += dr(4) 27 | Loop 28 | lblQuantity.Text = totalQuantity 29 | lblTotal.Text = Format(totalAmount, "#,##0.00") 30 | Catch ex As Exception 31 | MsgBox(ex.Message) 32 | Finally 33 | cmd.Dispose() 34 | conn.Close() 35 | End Try 36 | End Sub 37 | 38 | Private Sub frmSoldItems_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 39 | lblQuantity.Text = "" 40 | lblTotal.Text = "" 41 | dgw.Rows.Clear() 42 | End Sub 43 | 44 | Private Sub chkDaily_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkDaily.CheckedChanged 45 | If chkDaily.CheckState = CheckState.Checked Then 46 | chkMonthly.CheckState = CheckState.Unchecked 47 | End If 48 | End Sub 49 | 50 | Private Sub chkMonthly_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkMonthly.CheckedChanged 51 | If chkMonthly.CheckState = CheckState.Checked Then 52 | chkDaily.CheckState = CheckState.Unchecked 53 | End If 54 | End Sub 55 | 56 | Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 57 | If chkDaily.CheckState = CheckState.Unchecked And chkMonthly.CheckState = CheckState.Unchecked Then 58 | MsgBox("Please select either daily or monthly", MsgBoxStyle.Critical, "Select") 59 | Exit Sub 60 | End If 61 | LoadSoldItems() 62 | End Sub 63 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | _ 20 | Partial Friend NotInheritable Class MySettings 21 | Inherits Global.System.Configuration.ApplicationSettingsBase 22 | 23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) 24 | 25 | #Region "My.Settings Auto-Save Functionality" 26 | #If _MyType = "WindowsForms" Then 27 | Private Shared addedHandler As Boolean 28 | 29 | Private Shared addedHandlerLockObject As New Object 30 | 31 | _ 32 | Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) 33 | If My.Application.SaveMySettingsOnExit Then 34 | My.Settings.Save() 35 | End If 36 | End Sub 37 | #End If 38 | #End Region 39 | 40 | Public Shared ReadOnly Property [Default]() As MySettings 41 | Get 42 | 43 | #If _MyType = "WindowsForms" Then 44 | If Not addedHandler Then 45 | SyncLock addedHandlerLockObject 46 | If Not addedHandler Then 47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings 48 | addedHandler = True 49 | End If 50 | End SyncLock 51 | End If 52 | #End If 53 | Return defaultInstance 54 | End Get 55 | End Property 56 | End Class 57 | End Namespace 58 | 59 | Namespace My 60 | 61 | _ 64 | Friend Module MySettingsProperty 65 | 66 | _ 67 | Friend ReadOnly Property Settings() As Global.SalesInventorySystem.My.MySettings 68 | Get 69 | Return Global.SalesInventorySystem.My.MySettings.Default 70 | End Get 71 | End Property 72 | End Module 73 | End Namespace 74 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:2.0.50727.4927 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | _ 20 | Partial Friend NotInheritable Class MySettings 21 | Inherits Global.System.Configuration.ApplicationSettingsBase 22 | 23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings),MySettings) 24 | 25 | #Region "My.Settings Auto-Save Functionality" 26 | #If _MyType = "WindowsForms" Then 27 | Private Shared addedHandler As Boolean 28 | 29 | Private Shared addedHandlerLockObject As New Object 30 | 31 | _ 32 | Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) 33 | If My.Application.SaveMySettingsOnExit Then 34 | My.Settings.Save() 35 | End If 36 | End Sub 37 | #End If 38 | #End Region 39 | 40 | Public Shared ReadOnly Property [Default]() As MySettings 41 | Get 42 | 43 | #If _MyType = "WindowsForms" Then 44 | If Not addedHandler Then 45 | SyncLock addedHandlerLockObject 46 | If Not addedHandler Then 47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings 48 | addedHandler = True 49 | End If 50 | End SyncLock 51 | End If 52 | #End If 53 | Return defaultInstance 54 | End Get 55 | End Property 56 | End Class 57 | End Namespace 58 | 59 | Namespace My 60 | 61 | _ 64 | Friend Module MySettingsProperty 65 | 66 | _ 67 | Friend ReadOnly Property Settings() As Global.SalesInventorySystem.My.MySettings 68 | Get 69 | Return Global.SalesInventorySystem.My.MySettings.Default 70 | End Get 71 | End Property 72 | End Module 73 | End Namespace 74 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmReportStocksInPrint.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmReportStocksInPrint 4 | Dim fromMonth As String 5 | Dim toMonth As String 6 | Dim days As Integer 7 | Dim totalAmount As Double 8 | Dim y As Integer 9 | 10 | Private Sub LoadStocksIn() 11 | Dim totalQuantity As Integer 12 | Dim totalStocks As Integer 13 | Try 14 | sqL = "SELECT SIDate, IDescription, ItemQuantity, CurrentStocks FROM Item as I, StocksIn as S WHERE I.ItemNo = S.ItemNo AND SIDate >= #" & frmReportStocksIn.dtpFrom.Text & "# AND SIDate <=#" & frmReportStocksIn.dtpTo.Text & "# Order By SIDate, IDescription" 15 | ConnDB() 16 | cmd = New OleDbCommand(sqL, conn) 17 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 18 | dgw.Rows.Clear() 19 | totalQuantity = 0 20 | totalStocks = 0 21 | y = 0 22 | Do While dr.Read = True 23 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(3)) 24 | totalQuantity += dr(2) 25 | y += 19 26 | 27 | Loop 28 | lblStocksin.Text = totalQuantity 29 | Me.Height = Me.Height + y 30 | Me.Panel2.Height = Me.Panel2.Height + y 31 | Panel4.Location = New Point(8, 227 + y) 32 | Panel1.Location = New Point(7, 185 + y) 33 | dgw.Height = dgw.Height + y 34 | Catch ex As Exception 35 | MsgBox(ex.Message) 36 | Finally 37 | cmd.Dispose() 38 | conn.Close() 39 | End Try 40 | End Sub 41 | 42 | 43 | 44 | Private Sub frmReportStocksInPrint_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 45 | lblDate.Text = Date.Now.ToString("MM/dd/yyyy") 46 | Dim d1 As Date = Format(frmReportStocksIn.dtpFrom.Value, "Short Date") 47 | Dim d2 As Date = Format(frmReportStocksIn.dtpTo.Value, "Short Date") 48 | 49 | fromMonth = frmReportStocksIn.dtpFrom.Value.ToString("MMMM") 50 | toMonth = frmReportStocksIn.dtpTo.Value.ToString("MMMM") 51 | 52 | days = DateDiff(DateInterval.Day, d1, d2) 53 | If days <= 7 Then 54 | lblreport.Text = "Weekly Inventory" 55 | Else 56 | lblreport.Text = "Monthly Inventory" 57 | End If 58 | 59 | If fromMonth = "January" And toMonth = "March" Then 60 | lblreport.Text = "First Quarter of the Year Inventory" 61 | ElseIf fromMonth = "April" And toMonth = "June" Then 62 | lblreport.Text = "Second Quarter of the Year Inventory" 63 | ElseIf fromMonth = "July" And toMonth = "September" Then 64 | lblreport.Text = "Third Quarter of the Year Inventory" 65 | ElseIf fromMonth = "October" And toMonth = "December" Then 66 | lblreport.Text = "Fourth Quarter of the Year Inventory" 67 | ElseIf fromMonth = "January" And toMonth = "December" Then 68 | lblreport.Text = "Inventory for the Year of " & frmReportStocksIn.dtpFrom.Value.ToString("yyyy") 69 | 70 | End If 71 | 72 | LoadStocksIn() 73 | PrintDialog1.Document = Me.PrintDocument1 74 | 75 | Dim ButtonPressed As DialogResult = PrintDialog1.ShowDialog() 76 | If (ButtonPressed = DialogResult.OK) Then 77 | PrintDocument1.Print() 78 | End If 79 | Me.Close() 80 | End Sub 81 | 82 | Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 83 | Dim bm As New Bitmap(Me.Panel2.Width, Me.Panel2.Height) 84 | 85 | Panel2.DrawToBitmap(bm, New Rectangle(0, 0, Me.Panel2.Width, Me.Panel2.Height)) 86 | 87 | e.Graphics.DrawImage(bm, 0, 0) 88 | Dim aPS As New PageSetupDialog 89 | aPS.Document = PrintDocument1 90 | End Sub 91 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmReportStocksInPrint.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmReportStocksInPrint 4 | Dim fromMonth As String 5 | Dim toMonth As String 6 | Dim days As Integer 7 | Dim totalAmount As Double 8 | Dim y As Integer 9 | 10 | Private Sub LoadStocksIn() 11 | Dim totalQuantity As Integer 12 | Dim totalStocks As Integer 13 | Try 14 | sqL = "SELECT SIDate, IDescription, ItemQuantity, CurrentStocks FROM Item as I, StocksIn as S WHERE I.ItemNo = S.ItemNo AND SIDate >= #" & frmReportStocksIn.dtpFrom.Text & "# AND SIDate <=#" & frmReportStocksIn.dtpTo.Text & "# Order By SIDate, IDescription" 15 | ConnDB() 16 | cmd = New OleDbCommand(sqL, conn) 17 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 18 | dgw.Rows.Clear() 19 | totalQuantity = 0 20 | totalStocks = 0 21 | y = 0 22 | Do While dr.Read = True 23 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(3)) 24 | totalQuantity += dr(2) 25 | y += 19 26 | 27 | Loop 28 | lblStocksin.Text = totalQuantity 29 | Me.Height = Me.Height + y 30 | Me.Panel2.Height = Me.Panel2.Height + y 31 | Panel4.Location = New Point(8, 227 + y) 32 | Panel1.Location = New Point(7, 185 + y) 33 | dgw.Height = dgw.Height + y 34 | Catch ex As Exception 35 | MsgBox(ex.Message) 36 | Finally 37 | cmd.Dispose() 38 | conn.Close() 39 | End Try 40 | End Sub 41 | 42 | 43 | 44 | Private Sub frmReportStocksInPrint_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 45 | lblDate.Text = Date.Now.ToString("MM/dd/yyyy") 46 | Dim d1 As Date = Format(frmReportStocksIn.dtpFrom.Value, "Short Date") 47 | Dim d2 As Date = Format(frmReportStocksIn.dtpTo.Value, "Short Date") 48 | 49 | fromMonth = frmReportStocksIn.dtpFrom.Value.ToString("MMMM") 50 | toMonth = frmReportStocksIn.dtpTo.Value.ToString("MMMM") 51 | 52 | days = DateDiff(DateInterval.Day, d1, d2) 53 | If days <= 7 Then 54 | lblreport.Text = "Weekly Inventory" 55 | Else 56 | lblreport.Text = "Monthly Inventory" 57 | End If 58 | 59 | If fromMonth = "January" And toMonth = "March" Then 60 | lblreport.Text = "First Quarter of the Year Inventory" 61 | ElseIf fromMonth = "April" And toMonth = "June" Then 62 | lblreport.Text = "Second Quarter of the Year Inventory" 63 | ElseIf fromMonth = "July" And toMonth = "September" Then 64 | lblreport.Text = "Third Quarter of the Year Inventory" 65 | ElseIf fromMonth = "October" And toMonth = "December" Then 66 | lblreport.Text = "Fourth Quarter of the Year Inventory" 67 | ElseIf fromMonth = "January" And toMonth = "December" Then 68 | lblreport.Text = "Inventory for the Year of " & frmReportStocksIn.dtpFrom.Value.ToString("yyyy") 69 | 70 | End If 71 | 72 | LoadStocksIn() 73 | PrintDialog1.Document = Me.PrintDocument1 74 | 75 | Dim ButtonPressed As DialogResult = PrintDialog1.ShowDialog() 76 | If (ButtonPressed = DialogResult.OK) Then 77 | PrintDocument1.Print() 78 | End If 79 | Me.Close() 80 | End Sub 81 | 82 | Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 83 | Dim bm As New Bitmap(Me.Panel2.Width, Me.Panel2.Height) 84 | 85 | Panel2.DrawToBitmap(bm, New Rectangle(0, 0, Me.Panel2.Width, Me.Panel2.Height)) 86 | 87 | e.Graphics.DrawImage(bm, 0, 0) 88 | Dim aPS As New PageSetupDialog 89 | aPS.Document = PrintDocument1 90 | End Sub 91 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmMain.vb: -------------------------------------------------------------------------------- 1 | Public Class frmMain 2 | 3 | Private Sub ProductsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductsToolStripMenuItem.Click 4 | frmItem.ShowDialog() 5 | End Sub 6 | 7 | Private Sub StaffToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StaffToolStripMenuItem.Click 8 | frmStaff.ShowDialog() 9 | End Sub 10 | 11 | Private Sub CustomersToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomersToolStripMenuItem.Click 12 | frmCustomer.ShowDialog() 13 | End Sub 14 | 15 | Private Sub PointOfSaleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PointOfSaleToolStripMenuItem.Click 16 | frmPOS.ShowDialog() 17 | End Sub 18 | 19 | Private Sub AvailableStocksToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AvailableStocksToolStripMenuItem.Click 20 | frmAvailableStocks.ShowDialog() 21 | End Sub 22 | 23 | Private Sub SoldItemsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SoldItemsToolStripMenuItem.Click 24 | frmSoldItems.ShowDialog() 25 | End Sub 26 | 27 | Private Sub SoldItemsToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SoldItemsToolStripMenuItem1.Click 28 | frmReportSoldItems.ShowDialog() 29 | End Sub 30 | 31 | Private Sub StocksInToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StocksInToolStripMenuItem.Click 32 | frmReportStocksIn.ShowDialog() 33 | End Sub 34 | 35 | Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click 36 | frmStaff.ShowDialog() 37 | End Sub 38 | 39 | Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click 40 | frmItem.ShowDialog() 41 | End Sub 42 | 43 | Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click 44 | frmCustomer.ShowDialog() 45 | End Sub 46 | 47 | Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click 48 | frmPOS.ShowDialog() 49 | End Sub 50 | 51 | Private Sub ToolStripButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton6.Click 52 | frmAvailableStocks.ShowDialog() 53 | End Sub 54 | 55 | Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton5.Click 56 | frmSoldItems.ShowDialog() 57 | End Sub 58 | 59 | Private Sub ToolStripButton7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton7.Click 60 | frmReportSoldItems.ShowDialog() 61 | End Sub 62 | 63 | Private Sub ToolStripButton8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton8.Click 64 | frmReportStocksIn.ShowDialog() 65 | End Sub 66 | 67 | Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 68 | lblDate.Text = Date.Now.ToString("dddd") & " - " & Date.Now.ToString("MMM dd, yyyy") 69 | frmLogin.ShowDialog() 70 | End Sub 71 | 72 | Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick 73 | lblTIme.Text = Format(Date.Now, "Long Time") 74 | End Sub 75 | 76 | Private Sub UsersToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UsersToolStripMenuItem.Click 77 | frmUsers.ShowDialog() 78 | End Sub 79 | End Class 80 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmReportSoldItemsPrint.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmReportSoldItemsPrint 4 | 5 | Dim fromMonth As String 6 | Dim toMonth As String 7 | Dim days As Integer 8 | Dim totalAmount As Double 9 | Dim y As Integer 10 | 11 | Private Sub LoadReportSoldItems() 12 | 13 | Try 14 | sqL = "SELECT IDescription, UnitPrice, SUM([Quantity]) as ItemQuantity, POSDate, (UnitPrice * SUM([Quantity])) As TotalAmount FROM Item as I, POS as P, POSDetail as PD WHERE I.ItemNo = PD.ItemNo AND PD.InvoiceNo=P.InvoiceNo AND POSDate >= #" & frmReportSoldItems.dtpFrom.Text & "# AND POSDate <=#" & frmReportSoldItems.dtpTo.Text & "# Group By IDescription, UnitPrice, [Quantity], POSDate ORder By IDescription" 15 | ConnDB() 16 | cmd = New OleDbCommand(sqL, conn) 17 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 18 | dgw.Rows.Clear() 19 | Do While dr.Read = True 20 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(4)) 21 | y += 19 22 | totalAmount += dr(4) 23 | Loop 24 | lblAmount.Text = Format(totalAmount, "#,##0.00") 25 | Me.Height = Me.Height + y 26 | Me.Panel2.Height = Me.Panel2.Height + y 27 | Panel4.Location = New Point(8, 227 + y) 28 | Panel1.Location = New Point(7, 185 + y) 29 | dgw.Height = dgw.Height + y 30 | 31 | Catch ex As Exception 32 | MsgBox(ex.Message) 33 | Finally 34 | cmd.Dispose() 35 | conn.Close() 36 | End Try 37 | End Sub 38 | 39 | 40 | Private Sub frmReportSoldItemsPrint_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 41 | lblDate.Text = Date.Now.ToString("MM/dd/yyyy") 42 | 43 | Dim d1 As Date = Format(frmReportSoldItems.dtpFrom.Value, "Short Date") 44 | Dim d2 As Date = Format(frmReportSoldItems.dtpTo.Value, "Short Date") 45 | 46 | fromMonth = frmReportSoldItems.dtpFrom.Value.ToString("MMMM") 47 | toMonth = frmReportSoldItems.dtpTo.Value.ToString("MMMM") 48 | 49 | days = DateDiff(DateInterval.Day, d1, d2) 50 | If days <= 7 Then 51 | lblreport.Text = "Weekly Inventory" 52 | Else 53 | lblreport.Text = "Monthly Inventory" 54 | End If 55 | 56 | If fromMonth = "January" And toMonth = "March" Then 57 | lblreport.Text = "First Quarter of the Year Inventory" 58 | ElseIf fromMonth = "April" And toMonth = "June" Then 59 | lblreport.Text = "Second Quarter of the Year Inventory" 60 | ElseIf fromMonth = "July" And toMonth = "September" Then 61 | lblreport.Text = "Third Quarter of the Year Inventory" 62 | ElseIf fromMonth = "October" And toMonth = "December" Then 63 | lblreport.Text = "Fourth Quarter of the Year Inventory" 64 | ElseIf fromMonth = "January" And toMonth = "December" Then 65 | lblreport.Text = "Inventory for the Year of " & frmReportSoldItems.dtpFrom.Value.ToString("yyyy") 66 | 67 | End If 68 | 69 | LoadReportSoldItems() 70 | PrintDialog1.Document = Me.PrintDocument1 71 | 72 | Dim ButtonPressed As DialogResult = PrintDialog1.ShowDialog() 73 | If (ButtonPressed = DialogResult.OK) Then 74 | PrintDocument1.Print() 75 | End If 76 | Me.Close() 77 | End Sub 78 | 79 | Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 80 | Dim bm As New Bitmap(Me.Panel2.Width, Me.Panel2.Height) 81 | 82 | Panel2.DrawToBitmap(bm, New Rectangle(0, 0, Me.Panel2.Width, Me.Panel2.Height)) 83 | 84 | e.Graphics.DrawImage(bm, 0, 0) 85 | Dim aPS As New PageSetupDialog 86 | aPS.Document = PrintDocument1 87 | End Sub 88 | 89 | 90 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmReportSoldItemsPrint.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmReportSoldItemsPrint 4 | 5 | Dim fromMonth As String 6 | Dim toMonth As String 7 | Dim days As Integer 8 | Dim totalAmount As Double 9 | Dim y As Integer 10 | 11 | Private Sub LoadReportSoldItems() 12 | 13 | Try 14 | sqL = "SELECT IDescription, UnitPrice, SUM([Quantity]) as ItemQuantity, POSDate, (UnitPrice * SUM([Quantity])) As TotalAmount FROM Item as I, POS as P, POSDetail as PD WHERE I.ItemNo = PD.ItemNo AND PD.InvoiceNo=P.InvoiceNo AND POSDate >= #" & frmReportSoldItems.dtpFrom.Text & "# AND POSDate <=#" & frmReportSoldItems.dtpTo.Text & "# Group By IDescription, UnitPrice, [Quantity], POSDate ORder By IDescription" 15 | ConnDB() 16 | cmd = New OleDbCommand(sqL, conn) 17 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 18 | dgw.Rows.Clear() 19 | Do While dr.Read = True 20 | dgw.Rows.Add(dr(0), dr(1), dr(2), dr(4)) 21 | y += 19 22 | totalAmount += dr(4) 23 | Loop 24 | lblAmount.Text = Format(totalAmount, "#,##0.00") 25 | Me.Height = Me.Height + y 26 | Me.Panel2.Height = Me.Panel2.Height + y 27 | Panel4.Location = New Point(8, 227 + y) 28 | Panel1.Location = New Point(7, 185 + y) 29 | dgw.Height = dgw.Height + y 30 | 31 | Catch ex As Exception 32 | MsgBox(ex.Message) 33 | Finally 34 | cmd.Dispose() 35 | conn.Close() 36 | End Try 37 | End Sub 38 | 39 | 40 | Private Sub frmReportSoldItemsPrint_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 41 | lblDate.Text = Date.Now.ToString("MM/dd/yyyy") 42 | 43 | Dim d1 As Date = Format(frmReportSoldItems.dtpFrom.Value, "Short Date") 44 | Dim d2 As Date = Format(frmReportSoldItems.dtpTo.Value, "Short Date") 45 | 46 | fromMonth = frmReportSoldItems.dtpFrom.Value.ToString("MMMM") 47 | toMonth = frmReportSoldItems.dtpTo.Value.ToString("MMMM") 48 | 49 | days = DateDiff(DateInterval.Day, d1, d2) 50 | If days <= 7 Then 51 | lblreport.Text = "Weekly Inventory" 52 | Else 53 | lblreport.Text = "Monthly Inventory" 54 | End If 55 | 56 | If fromMonth = "January" And toMonth = "March" Then 57 | lblreport.Text = "First Quarter of the Year Inventory" 58 | ElseIf fromMonth = "April" And toMonth = "June" Then 59 | lblreport.Text = "Second Quarter of the Year Inventory" 60 | ElseIf fromMonth = "July" And toMonth = "September" Then 61 | lblreport.Text = "Third Quarter of the Year Inventory" 62 | ElseIf fromMonth = "October" And toMonth = "December" Then 63 | lblreport.Text = "Fourth Quarter of the Year Inventory" 64 | ElseIf fromMonth = "January" And toMonth = "December" Then 65 | lblreport.Text = "Inventory for the Year of " & frmReportSoldItems.dtpFrom.Value.ToString("yyyy") 66 | 67 | End If 68 | 69 | LoadReportSoldItems() 70 | PrintDialog1.Document = Me.PrintDocument1 71 | 72 | Dim ButtonPressed As DialogResult = PrintDialog1.ShowDialog() 73 | If (ButtonPressed = DialogResult.OK) Then 74 | PrintDocument1.Print() 75 | End If 76 | Me.Close() 77 | End Sub 78 | 79 | Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 80 | Dim bm As New Bitmap(Me.Panel2.Width, Me.Panel2.Height) 81 | 82 | Panel2.DrawToBitmap(bm, New Rectangle(0, 0, Me.Panel2.Width, Me.Panel2.Height)) 83 | 84 | e.Graphics.DrawImage(bm, 0, 0) 85 | Dim aPS As New PageSetupDialog 86 | aPS.Document = PrintDocument1 87 | End Sub 88 | 89 | 90 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmMain.vb: -------------------------------------------------------------------------------- 1 | Public Class frmMain 2 | 3 | Private Sub ProductsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductsToolStripMenuItem.Click 4 | frmItem.ShowDialog() 5 | End Sub 6 | 7 | Private Sub StaffToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StaffToolStripMenuItem.Click 8 | frmStaff.ShowDialog() 9 | End Sub 10 | 11 | Private Sub CustomersToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomersToolStripMenuItem.Click 12 | frmCustomer.ShowDialog() 13 | End Sub 14 | 15 | Private Sub PointOfSaleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PointOfSaleToolStripMenuItem.Click 16 | frmPOS.ShowDialog() 17 | End Sub 18 | 19 | Private Sub AvailableStocksToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AvailableStocksToolStripMenuItem.Click 20 | frmAvailableStocks.ShowDialog() 21 | End Sub 22 | 23 | Private Sub SoldItemsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SoldItemsToolStripMenuItem.Click 24 | frmSoldItems.ShowDialog() 25 | End Sub 26 | 27 | Private Sub SoldItemsToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SoldItemsToolStripMenuItem1.Click 28 | frmReportSoldItems.ShowDialog() 29 | End Sub 30 | 31 | Private Sub StocksInToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StocksInToolStripMenuItem.Click 32 | frmReportStocksIn.ShowDialog() 33 | End Sub 34 | 35 | Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click 36 | frmStaff.ShowDialog() 37 | End Sub 38 | 39 | Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click 40 | frmItem.ShowDialog() 41 | End Sub 42 | 43 | Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click 44 | frmCustomer.ShowDialog() 45 | End Sub 46 | 47 | Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click 48 | frmPOS.ShowDialog() 49 | End Sub 50 | 51 | Private Sub ToolStripButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton6.Click 52 | frmAvailableStocks.ShowDialog() 53 | End Sub 54 | 55 | Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton5.Click 56 | frmSoldItems.ShowDialog() 57 | End Sub 58 | 59 | Private Sub ToolStripButton7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton7.Click 60 | frmReportSoldItems.ShowDialog() 61 | End Sub 62 | 63 | Private Sub ToolStripButton8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton8.Click 64 | frmReportStocksIn.ShowDialog() 65 | End Sub 66 | 67 | Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 68 | lblDate.Text = Date.Now.ToString("dddd") & " - " & Date.Now.ToString("MMM dd, yyyy") 69 | frmLogin.ShowDialog() 70 | End Sub 71 | 72 | Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick 73 | lblTIme.Text = Format(Date.Now, "Long Time") 74 | End Sub 75 | 76 | Private Sub UsersToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UsersToolStripMenuItem.Click 77 | frmUsers.ShowDialog() 78 | End Sub 79 | 80 | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 81 | frmPOS.ShowDialog() 82 | End Sub 83 | End Class 84 | -------------------------------------------------------------------------------- /_UpgradeReport_Files/UpgradeReport.css: -------------------------------------------------------------------------------- 1 | BODY 2 | { 3 | BACKGROUND-COLOR: white; 4 | FONT-FAMILY: "Verdana", sans-serif; 5 | FONT-SIZE: 100%; 6 | MARGIN-LEFT: 0px; 7 | MARGIN-TOP: 0px 8 | } 9 | P 10 | { 11 | FONT-FAMILY: "Verdana", sans-serif; 12 | FONT-SIZE: 70%; 13 | LINE-HEIGHT: 12pt; 14 | MARGIN-BOTTOM: 0px; 15 | MARGIN-LEFT: 10px; 16 | MARGIN-TOP: 10px 17 | } 18 | .note 19 | { 20 | BACKGROUND-COLOR: #ffffff; 21 | COLOR: #336699; 22 | FONT-FAMILY: "Verdana", sans-serif; 23 | FONT-SIZE: 100%; 24 | MARGIN-BOTTOM: 0px; 25 | MARGIN-LEFT: 0px; 26 | MARGIN-TOP: 0px; 27 | PADDING-RIGHT: 10px 28 | } 29 | .infotable 30 | { 31 | BACKGROUND-COLOR: #f0f0e0; 32 | BORDER-BOTTOM: #ffffff 0px solid; 33 | BORDER-COLLAPSE: collapse; 34 | BORDER-LEFT: #ffffff 0px solid; 35 | BORDER-RIGHT: #ffffff 0px solid; 36 | BORDER-TOP: #ffffff 0px solid; 37 | FONT-SIZE: 70%; 38 | MARGIN-LEFT: 10px 39 | } 40 | .issuetable 41 | { 42 | BACKGROUND-COLOR: #ffffe8; 43 | BORDER-COLLAPSE: collapse; 44 | COLOR: #000000; 45 | FONT-SIZE: 100%; 46 | MARGIN-BOTTOM: 10px; 47 | MARGIN-LEFT: 13px; 48 | MARGIN-TOP: 0px 49 | } 50 | .issuetitle 51 | { 52 | BACKGROUND-COLOR: #ffffff; 53 | BORDER-BOTTOM: #dcdcdc 1px solid; 54 | BORDER-TOP: #dcdcdc 1px; 55 | COLOR: #003366; 56 | FONT-WEIGHT: normal 57 | } 58 | .header 59 | { 60 | BACKGROUND-COLOR: #cecf9c; 61 | BORDER-BOTTOM: #ffffff 1px solid; 62 | BORDER-LEFT: #ffffff 1px solid; 63 | BORDER-RIGHT: #ffffff 1px solid; 64 | BORDER-TOP: #ffffff 1px solid; 65 | COLOR: #000000; 66 | FONT-WEIGHT: bold 67 | } 68 | .issuehdr 69 | { 70 | BACKGROUND-COLOR: #E0EBF5; 71 | BORDER-BOTTOM: #dcdcdc 1px solid; 72 | BORDER-TOP: #dcdcdc 1px solid; 73 | COLOR: #000000; 74 | FONT-WEIGHT: normal 75 | } 76 | .issuenone 77 | { 78 | BACKGROUND-COLOR: #ffffff; 79 | BORDER-BOTTOM: 0px; 80 | BORDER-LEFT: 0px; 81 | BORDER-RIGHT: 0px; 82 | BORDER-TOP: 0px; 83 | COLOR: #000000; 84 | FONT-WEIGHT: normal 85 | } 86 | .content 87 | { 88 | BACKGROUND-COLOR: #e7e7ce; 89 | BORDER-BOTTOM: #ffffff 1px solid; 90 | BORDER-LEFT: #ffffff 1px solid; 91 | BORDER-RIGHT: #ffffff 1px solid; 92 | BORDER-TOP: #ffffff 1px solid; 93 | PADDING-LEFT: 3px 94 | } 95 | .issuecontent 96 | { 97 | BACKGROUND-COLOR: #ffffff; 98 | BORDER-BOTTOM: #dcdcdc 1px solid; 99 | BORDER-TOP: #dcdcdc 1px solid; 100 | PADDING-LEFT: 3px 101 | } 102 | A:link 103 | { 104 | COLOR: #cc6633; 105 | TEXT-DECORATION: underline 106 | } 107 | A:visited 108 | { 109 | COLOR: #cc6633; 110 | } 111 | A:active 112 | { 113 | COLOR: #cc6633; 114 | } 115 | A:hover 116 | { 117 | COLOR: #cc3300; 118 | TEXT-DECORATION: underline 119 | } 120 | H1 121 | { 122 | BACKGROUND-COLOR: #003366; 123 | BORDER-BOTTOM: #336699 6px solid; 124 | COLOR: #ffffff; 125 | FONT-SIZE: 130%; 126 | FONT-WEIGHT: normal; 127 | MARGIN: 0em 0em 0em -20px; 128 | PADDING-BOTTOM: 8px; 129 | PADDING-LEFT: 30px; 130 | PADDING-TOP: 16px 131 | } 132 | H2 133 | { 134 | COLOR: #000000; 135 | FONT-SIZE: 80%; 136 | FONT-WEIGHT: bold; 137 | MARGIN-BOTTOM: 3px; 138 | MARGIN-LEFT: 10px; 139 | MARGIN-TOP: 20px; 140 | PADDING-LEFT: 0px 141 | } 142 | H3 143 | { 144 | COLOR: #000000; 145 | FONT-SIZE: 80%; 146 | FONT-WEIGHT: bold; 147 | MARGIN-BOTTOM: -5px; 148 | MARGIN-LEFT: 10px; 149 | MARGIN-TOP: 20px 150 | } 151 | H4 152 | { 153 | COLOR: #000000; 154 | FONT-SIZE: 70%; 155 | FONT-WEIGHT: bold; 156 | MARGIN-BOTTOM: 0px; 157 | MARGIN-TOP: 15px; 158 | PADDING-BOTTOM: 0px 159 | } 160 | UL 161 | { 162 | COLOR: #000000; 163 | FONT-SIZE: 70%; 164 | LIST-STYLE: square; 165 | MARGIN-BOTTOM: 0pt; 166 | MARGIN-TOP: 0pt 167 | } 168 | OL 169 | { 170 | COLOR: #000000; 171 | FONT-SIZE: 70%; 172 | LIST-STYLE: square; 173 | MARGIN-BOTTOM: 0pt; 174 | MARGIN-TOP: 0pt 175 | } 176 | LI 177 | { 178 | LIST-STYLE: square; 179 | MARGIN-LEFT: 0px 180 | } 181 | .expandable 182 | { 183 | CURSOR: hand 184 | } 185 | .expanded 186 | { 187 | color: black 188 | } 189 | .collapsed 190 | { 191 | DISPLAY: none 192 | } 193 | .foot 194 | { 195 | BACKGROUND-COLOR: #ffffff; 196 | BORDER-BOTTOM: #cecf9c 1px solid; 197 | BORDER-TOP: #cecf9c 2px solid 198 | } 199 | .settings 200 | { 201 | MARGIN-LEFT: 25PX; 202 | } 203 | .help 204 | { 205 | TEXT-ALIGN: right; 206 | margin-right: 10px; 207 | } 208 | -------------------------------------------------------------------------------- /SalesInventorySystem/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | Imports System 15 | 16 | Namespace My.Resources 17 | 18 | 'This class was auto-generated by the StronglyTypedResourceBuilder 19 | 'class via a tool like ResGen or Visual Studio. 20 | 'To add or remove a member, edit your .ResX file then rerun ResGen 21 | 'with the /str option, or rebuild your VS project. 22 | ''' 23 | ''' A strongly-typed resource class, for looking up localized strings, etc. 24 | ''' 25 | _ 29 | Friend Module Resources 30 | 31 | Private resourceMan As Global.System.Resources.ResourceManager 32 | 33 | Private resourceCulture As Global.System.Globalization.CultureInfo 34 | 35 | ''' 36 | ''' Returns the cached ResourceManager instance used by this class. 37 | ''' 38 | _ 39 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 40 | Get 41 | If Object.ReferenceEquals(resourceMan, Nothing) Then 42 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("SalesInventorySystem.Resources", GetType(Resources).Assembly) 43 | resourceMan = temp 44 | End If 45 | Return resourceMan 46 | End Get 47 | End Property 48 | 49 | ''' 50 | ''' Overrides the current thread's CurrentUICulture property for all 51 | ''' resource lookups using this strongly typed resource class. 52 | ''' 53 | _ 54 | Friend Property Culture() As Global.System.Globalization.CultureInfo 55 | Get 56 | Return resourceCulture 57 | End Get 58 | Set 59 | resourceCulture = value 60 | End Set 61 | End Property 62 | 63 | ''' 64 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 65 | ''' 66 | Friend ReadOnly Property _22228608_1672442186113233_9195088557503485724_n() As System.Drawing.Bitmap 67 | Get 68 | Dim obj As Object = ResourceManager.GetObject("22228608_1672442186113233_9195088557503485724_n", resourceCulture) 69 | Return CType(obj,System.Drawing.Bitmap) 70 | End Get 71 | End Property 72 | 73 | ''' 74 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 75 | ''' 76 | Friend ReadOnly Property _7_sunrise_logo_2016() As System.Drawing.Bitmap 77 | Get 78 | Dim obj As Object = ResourceManager.GetObject("7_sunrise_logo_2016", resourceCulture) 79 | Return CType(obj,System.Drawing.Bitmap) 80 | End Get 81 | End Property 82 | 83 | ''' 84 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 85 | ''' 86 | Friend ReadOnly Property IMG_20171018_165745() As System.Drawing.Bitmap 87 | Get 88 | Dim obj As Object = ResourceManager.GetObject("IMG_20171018_165745", resourceCulture) 89 | Return CType(obj,System.Drawing.Bitmap) 90 | End Get 91 | End Property 92 | End Module 93 | End Namespace 94 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmUsers.vb: -------------------------------------------------------------------------------- 1 | 2 | 3 | Imports System.Data.OleDb 4 | 5 | Public Class frmUsers 6 | Dim adding As Boolean 7 | Public uSearch As Boolean 8 | 9 | Private Sub AddUser() 10 | Try 11 | sqL = "INSERT INTO USERS VALUES('" & txtUser.Text & "','" & txtCpwd.Text & "','" & cmbRole.Text & "', '" & txtStaffID.Text & "')" 12 | ConnDB() 13 | cmd = New OleDbCommand(sqL, conn) 14 | Dim i As Integer 15 | i = cmd.ExecuteNonQuery 16 | If i > 0 Then 17 | MsgBox("User Added Successfully", MsgBoxStyle.Information, "Add User") 18 | Else 19 | MsgBox("Failed in Adding User", MsgBoxStyle.Exclamation, "Add User") 20 | End If 21 | Catch ex As Exception 22 | MsgBox(ex.Message) 23 | Finally 24 | cmd.Dispose() 25 | conn.Close() 26 | End Try 27 | End Sub 28 | 29 | Private Sub DeleteUser() 30 | Try 31 | sqL = "DELETE FROM USERS Where username = '" & ListBox1.SelectedItem & "'" 32 | ConnDB() 33 | cmd = New OledbCommand(sqL, conn) 34 | Dim i As Integer 35 | i = cmd.ExecuteNonQuery 36 | If i > 0 Then 37 | MsgBox("User Deleted", MsgBoxStyle.Information, "Delete User") 38 | Else 39 | MsgBox("Failed in Deleting User") 40 | End If 41 | Catch ex As Exception 42 | MsgBox(ex.Message) 43 | Finally 44 | cmd.Dispose() 45 | conn.Close() 46 | End Try 47 | End Sub 48 | 49 | Private Sub Loadusers() 50 | Try 51 | sqL = "SELECT username from Users order by username" 52 | ConnDB() 53 | cmd = New OledbCommand(sqL, conn) 54 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 55 | 56 | ListBox1.Items.Clear() 57 | Do While dr.Read = True 58 | ListBox1.Items.Add(dr(0)) 59 | Loop 60 | Catch ex As Exception 61 | MsgBox(ex.Message) 62 | Finally 63 | cmd.Dispose() 64 | conn.Close() 65 | End Try 66 | End Sub 67 | 68 | Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click 69 | 70 | If ListBox1.SelectedItem = "" Then 71 | MsgBox("Please select username to delete", MsgBoxStyle.Exclamation, "Delete user") 72 | Else 73 | If MsgBox("Are you sure you want delete user?", MsgBoxStyle.YesNo, "Delete User") = MsgBoxResult.Yes Then 74 | DeleteUser() 75 | Loadusers() 76 | Else 77 | Exit Sub 78 | End If 79 | 80 | 81 | End If 82 | End Sub 83 | 84 | Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click 85 | txtUser.Enabled = True 86 | txtCpwd.Enabled = True 87 | txtpwd.Enabled = True 88 | txtStaffID.Enabled = True 89 | cmbRole.Enabled = True 90 | adding = True 91 | txtUser.Focus() 92 | End Sub 93 | 94 | Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click 95 | 96 | If txtPwd.Text <> txtCpwd.Text Then 97 | MsgBox("Password Not Match", MsgBoxStyle.Exclamation, "Add user") 98 | txtPwd.SelectAll() 99 | txtCpwd.SelectAll() 100 | txtPwd.Focus() 101 | Exit Sub 102 | 103 | End If 104 | If adding = True Then 105 | AddUser() 106 | Loadusers() 107 | txtUser.Enabled = False 108 | txtCpwd.Enabled = False 109 | txtPwd.Enabled = False 110 | txtStaffID.Enabled = False 111 | cmbRole.Enabled = False 112 | txtCpwd.Text = "" 113 | txtPwd.Text = "" 114 | txtUser.Text = "" 115 | txtStaffID.Text = "" 116 | cmbRole.Text = "" 117 | adding = False 118 | Else 119 | MsgBox("Nothing to Save: Click [Add Button] to Add User", MsgBoxStyle.Information, "Add User") 120 | End If 121 | 122 | 123 | End Sub 124 | 125 | Private Sub frmUsers_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 126 | txtUser.Enabled = False 127 | txtCpwd.Enabled = False 128 | txtpwd.Enabled = False 129 | txtStaffID.Enabled = False 130 | cmbRole.Enabled = False 131 | txtCpwd.Text = "" 132 | txtPwd.Text = "" 133 | txtUser.Text = "" 134 | txtStaffID.Text = "" 135 | cmbRole.Text = "" 136 | Loadusers() 137 | End Sub 138 | 139 | Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click 140 | Me.Close() 141 | End Sub 142 | 143 | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 144 | uSearch = True 145 | frmLoadStaff.ShowDialog() 146 | End Sub 147 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmUsers.vb: -------------------------------------------------------------------------------- 1 | 2 | 3 | Imports System.Data.OleDb 4 | 5 | Public Class frmUsers 6 | Dim adding As Boolean 7 | Public uSearch As Boolean 8 | 9 | Private Sub AddUser() 10 | Try 11 | sqL = "INSERT INTO USERS VALUES('" & txtUser.Text & "','" & txtCpwd.Text & "','" & cmbRole.Text & "', '" & txtStaffID.Text & "')" 12 | ConnDB() 13 | cmd = New OleDbCommand(sqL, conn) 14 | Dim i As Integer 15 | i = cmd.ExecuteNonQuery 16 | If i > 0 Then 17 | MsgBox("User Added Successfully", MsgBoxStyle.Information, "Add User") 18 | Else 19 | MsgBox("Failed in Adding User", MsgBoxStyle.Exclamation, "Add User") 20 | End If 21 | Catch ex As Exception 22 | MsgBox(ex.Message) 23 | Finally 24 | cmd.Dispose() 25 | conn.Close() 26 | End Try 27 | End Sub 28 | 29 | Private Sub DeleteUser() 30 | Try 31 | sqL = "DELETE FROM USERS Where username = '" & ListBox1.SelectedItem & "'" 32 | ConnDB() 33 | cmd = New OledbCommand(sqL, conn) 34 | Dim i As Integer 35 | i = cmd.ExecuteNonQuery 36 | If i > 0 Then 37 | MsgBox("User Deleted", MsgBoxStyle.Information, "Delete User") 38 | Else 39 | MsgBox("Failed in Deleting User") 40 | End If 41 | Catch ex As Exception 42 | MsgBox(ex.Message) 43 | Finally 44 | cmd.Dispose() 45 | conn.Close() 46 | End Try 47 | End Sub 48 | 49 | Private Sub Loadusers() 50 | Try 51 | sqL = "SELECT username from Users order by username" 52 | ConnDB() 53 | cmd = New OledbCommand(sqL, conn) 54 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 55 | 56 | ListBox1.Items.Clear() 57 | Do While dr.Read = True 58 | ListBox1.Items.Add(dr(0)) 59 | Loop 60 | Catch ex As Exception 61 | MsgBox(ex.Message) 62 | Finally 63 | cmd.Dispose() 64 | conn.Close() 65 | End Try 66 | End Sub 67 | 68 | Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click 69 | 70 | If ListBox1.SelectedItem = "" Then 71 | MsgBox("Please select username to delete", MsgBoxStyle.Exclamation, "Delete user") 72 | Else 73 | If MsgBox("Are you sure you want delete user?", MsgBoxStyle.YesNo, "Delete User") = MsgBoxResult.Yes Then 74 | DeleteUser() 75 | Loadusers() 76 | Else 77 | Exit Sub 78 | End If 79 | 80 | 81 | End If 82 | End Sub 83 | 84 | Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click 85 | txtUser.Enabled = True 86 | txtCpwd.Enabled = True 87 | txtpwd.Enabled = True 88 | txtStaffID.Enabled = True 89 | cmbRole.Enabled = True 90 | adding = True 91 | txtUser.Focus() 92 | End Sub 93 | 94 | Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click 95 | 96 | If txtPwd.Text <> txtCpwd.Text Then 97 | MsgBox("Password Not Match", MsgBoxStyle.Exclamation, "Add user") 98 | txtPwd.SelectAll() 99 | txtCpwd.SelectAll() 100 | txtPwd.Focus() 101 | Exit Sub 102 | 103 | End If 104 | If adding = True Then 105 | AddUser() 106 | Loadusers() 107 | txtUser.Enabled = False 108 | txtCpwd.Enabled = False 109 | txtPwd.Enabled = False 110 | txtStaffID.Enabled = False 111 | cmbRole.Enabled = False 112 | txtCpwd.Text = "" 113 | txtPwd.Text = "" 114 | txtUser.Text = "" 115 | txtStaffID.Text = "" 116 | cmbRole.Text = "" 117 | adding = False 118 | Else 119 | MsgBox("Nothing to Save: Click [Add Button] to Add User", MsgBoxStyle.Information, "Add User") 120 | End If 121 | 122 | 123 | End Sub 124 | 125 | Private Sub frmUsers_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 126 | txtUser.Enabled = False 127 | txtCpwd.Enabled = False 128 | txtpwd.Enabled = False 129 | txtStaffID.Enabled = False 130 | cmbRole.Enabled = False 131 | txtCpwd.Text = "" 132 | txtPwd.Text = "" 133 | txtUser.Text = "" 134 | txtStaffID.Text = "" 135 | cmbRole.Text = "" 136 | Loadusers() 137 | End Sub 138 | 139 | Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click 140 | Me.Close() 141 | End Sub 142 | 143 | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 144 | uSearch = True 145 | frmLoadStaff.ShowDialog() 146 | End Sub 147 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/My Project/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmPayment.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmPayment.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmPrintReceipt.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmPrintReceipt 4 | Dim getTotal As Double 5 | Dim getQuantity As Double 6 | 7 | Private Sub LoadCustomer() 8 | Try 9 | sqL = "SELECT CustName FROM Customer As C, POS as P WHERE C.CustomerNo = P.CustomerNo AND P.InvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "'" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | 14 | If dr.Read = True Then 15 | lblCustomer.Text = "Customer : " & dr("CustName") 16 | Else 17 | MsgBox("Customer not found") 18 | End If 19 | Catch ex As Exception 20 | MsgBox(ex.Message) 21 | Finally 22 | cmd.Dispose() 23 | conn.Close() 24 | End Try 25 | End Sub 26 | 27 | Private Sub GetVatNonVat() 28 | Try 29 | sqL = "Select VatAmount, NonVatAmount FROM POS WHERE InvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "'" 30 | ConnDB() 31 | cmd = New OleDbCommand(sqL, conn) 32 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 33 | If dr.Read = True Then 34 | lblVat.Text = Format(dr("VatAmount"), "#,##0.00") 35 | lblSubtotal.Text = Format(dr("NonVatAmount"), "#,##0.00") 36 | End If 37 | Catch ex As Exception 38 | MsgBox(ex.Message) 39 | Finally 40 | cmd.Dispose() 41 | conn.Close() 42 | End Try 43 | End Sub 44 | 45 | 46 | Private Sub getCashChange() 47 | Try 48 | sqL = "SELECT * FROM PAYMENT WHERE INvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "'" 49 | ConnDB() 50 | cmd = New OleDbCommand(sqL, conn) 51 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 52 | 53 | If dr.Read = True Then 54 | lblCash.Text = Format(dr("Cash"), "#,##0.00") 55 | lblChange.Text = Format(dr("Change"), "#,##0.00") 56 | End If 57 | Catch ex As Exception 58 | MsgBox(ex.Message) 59 | Finally 60 | cmd.Dispose() 61 | conn.Close() 62 | End Try 63 | End Sub 64 | 65 | Private Sub getEmployee() 66 | Try 67 | sqL = "SELECT S.StaffID, LastName, FirstName FROM STaff as S, POS as P WHERE S.StaffID = P.StaffID AND InvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "'" 68 | ConnDB() 69 | cmd = New OleDbCommand(sqL, conn) 70 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 71 | 72 | If dr.Read = True Then 73 | lblEmpName.Text = dr("FirstName") & " " & dr("LastName") 74 | End If 75 | Catch ex As Exception 76 | MsgBox(ex.Message) 77 | Finally 78 | cmd.Dispose() 79 | conn.Close() 80 | End Try 81 | End Sub 82 | 83 | 84 | 85 | Private Sub LoadReceipt() 86 | Dim x As Integer = 0 87 | Dim Y As Integer = 0 88 | Try 89 | sqL = "SELECT IDescription, itemprice, [Quantity], POSDATE, (itemPrice * [Quantity]) as TotalPrice FROM [Item] as I, POSDetail as PD, POS as P WHERE I.ItemNo = PD.itemNo And PD.InvoiceNO = P.InvoiceNo AND P.InvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "' ORDER By iDescription" 90 | ConnDB() 91 | cmd = New OleDbCommand(sqL, conn) 92 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 93 | dgw.Rows.Clear() 94 | getTotal = 0.0 95 | getQuantity = 0.0 96 | Do While dr.Read = True 97 | dgw.Rows.Add(dr("Quantity"), dr("iDescription"), dr("Itemprice"), dr("TotalPrice")) 98 | getTotal += dr("TotalPrice") 99 | getQuantity += dr(2) 100 | dgw.Height += 19 101 | x += 19 102 | Loop 103 | Y = x - 30 104 | dgw.Height = dgw.Height - 20 105 | lblTotal.Text = Format(getTotal, "#,##0.00") 106 | lblVat.Location = New Point(204, 212 + Y) 107 | vat.Location = New Point(4, 212 + Y) 108 | subTotal.Location = New Point(3, 227 + Y) 109 | lblSubtotal.Location = New Point(203, 227 + Y) 110 | TotalAmount.Location = New Point(3, 245 + Y) 111 | lblTotal.Location = New Point(203, 245 + Y) 112 | Cash.Location = New Point(3, 262 + Y) 113 | lblCash.Location = New Point(203, 262 + Y) 114 | change.Location = New Point(3, 280 + Y) 115 | lblChange.Location = New Point(203, 280 + Y) 116 | lblLine.Location = New Point(4, 299 + Y) 117 | lblOR.Location = New Point(46, 315 + Y) 118 | lblThank.Location = New Point(62, 331 + Y) 119 | Panel1.Height = Panel1.Height + Y 120 | Me.Height = Me.Height + Y 121 | Catch ex As Exception 122 | MsgBox(ex.Message) 123 | Finally 124 | cmd.Dispose() 125 | conn.Close() 126 | End Try 127 | End Sub 128 | Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 129 | Dim bm As New Bitmap(Me.Panel1.Width, Me.Panel1.Height) 130 | 131 | Panel1.DrawToBitmap(bm, New Rectangle(0, 0, Me.Panel1.Width, Me.Panel1.Height)) 132 | 133 | e.Graphics.DrawImage(bm, 0, 0) 134 | Dim aPS As New PageSetupDialog 135 | aPS.Document = PrintDocument1 136 | End Sub 137 | 138 | 139 | Private Sub frmPrintReceipt_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 140 | Label7.Text = Format(Date.Now, "Short Date") 141 | Label9.Text = Format(Date.Now, "Long Time") 142 | lblInvoice.Text = frmPOS.lblInvoiceNo.Text 143 | LoadCustomer() 144 | GetVatNonVat() 145 | getCashChange() 146 | getEmployee() 147 | LoadReceipt() 148 | PrintDocument1.Print() 149 | frmPOS.txtSearch.Focus() 150 | Me.Close() 151 | End Sub 152 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmPrintReceipt.vb: -------------------------------------------------------------------------------- 1 | 2 | Imports System.Data.OleDb 3 | Public Class frmPrintReceipt 4 | Dim getTotal As Double 5 | Dim getQuantity As Double 6 | 7 | Private Sub LoadCustomer() 8 | Try 9 | sqL = "SELECT CustName FROM Customer As C, POS as P WHERE C.CustomerNo = P.CustomerNo AND P.InvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "'" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | 14 | If dr.Read = True Then 15 | lblCustomer.Text = "Customer : " & dr("CustName") 16 | Else 17 | MsgBox("Customer not found") 18 | End If 19 | Catch ex As Exception 20 | MsgBox(ex.Message) 21 | Finally 22 | cmd.Dispose() 23 | conn.Close() 24 | End Try 25 | End Sub 26 | 27 | Private Sub GetVatNonVat() 28 | Try 29 | sqL = "Select VatAmount, NonVatAmount FROM POS WHERE InvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "'" 30 | ConnDB() 31 | cmd = New OleDbCommand(sqL, conn) 32 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 33 | If dr.Read = True Then 34 | lblVat.Text = Format(dr("VatAmount"), "#,##0.00") 35 | lblSubtotal.Text = Format(dr("NonVatAmount"), "#,##0.00") 36 | End If 37 | Catch ex As Exception 38 | MsgBox(ex.Message) 39 | Finally 40 | cmd.Dispose() 41 | conn.Close() 42 | End Try 43 | End Sub 44 | 45 | 46 | Private Sub getCashChange() 47 | Try 48 | sqL = "SELECT * FROM PAYMENT WHERE INvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "'" 49 | ConnDB() 50 | cmd = New OleDbCommand(sqL, conn) 51 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 52 | 53 | If dr.Read = True Then 54 | lblCash.Text = Format(dr("Cash"), "#,##0.00") 55 | lblChange.Text = Format(dr("Change"), "#,##0.00") 56 | End If 57 | Catch ex As Exception 58 | MsgBox(ex.Message) 59 | Finally 60 | cmd.Dispose() 61 | conn.Close() 62 | End Try 63 | End Sub 64 | 65 | Private Sub getEmployee() 66 | Try 67 | sqL = "SELECT S.StaffID, LastName, FirstName FROM STaff as S, POS as P WHERE S.StaffID = P.StaffID AND InvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "'" 68 | ConnDB() 69 | cmd = New OleDbCommand(sqL, conn) 70 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 71 | 72 | If dr.Read = True Then 73 | lblEmpName.Text = dr("FirstName") & " " & dr("LastName") 74 | End If 75 | Catch ex As Exception 76 | MsgBox(ex.Message) 77 | Finally 78 | cmd.Dispose() 79 | conn.Close() 80 | End Try 81 | End Sub 82 | 83 | 84 | 85 | Private Sub LoadReceipt() 86 | Dim x As Integer = 0 87 | Dim Y As Integer = 0 88 | Try 89 | sqL = "SELECT IDescription, itemprice, [Quantity], POSDATE, (itemPrice * [Quantity]) as TotalPrice FROM [Item] as I, POSDetail as PD, POS as P WHERE I.ItemNo = PD.itemNo And PD.InvoiceNO = P.InvoiceNo AND P.InvoiceNo = '" & frmPOS.lblInvoiceNo.Text & "' ORDER By iDescription" 90 | ConnDB() 91 | cmd = New OleDbCommand(sqL, conn) 92 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 93 | dgw.Rows.Clear() 94 | getTotal = 0.0 95 | getQuantity = 0.0 96 | Do While dr.Read = True 97 | dgw.Rows.Add(dr("Quantity"), dr("iDescription"), dr("Itemprice"), dr("TotalPrice")) 98 | getTotal += dr("TotalPrice") 99 | getQuantity += dr(2) 100 | dgw.Height += 19 101 | x += 19 102 | Loop 103 | Y = x - 30 104 | dgw.Height = dgw.Height - 20 105 | lblTotal.Text = Format(getTotal, "#,##0.00") 106 | lblVat.Location = New Point(204, 212 + Y) 107 | vat.Location = New Point(4, 212 + Y) 108 | subTotal.Location = New Point(3, 227 + Y) 109 | lblSubtotal.Location = New Point(203, 227 + Y) 110 | TotalAmount.Location = New Point(3, 245 + Y) 111 | lblTotal.Location = New Point(203, 245 + Y) 112 | Cash.Location = New Point(3, 262 + Y) 113 | lblCash.Location = New Point(203, 262 + Y) 114 | change.Location = New Point(3, 280 + Y) 115 | lblChange.Location = New Point(203, 280 + Y) 116 | lblLine.Location = New Point(4, 299 + Y) 117 | lblOR.Location = New Point(46, 315 + Y) 118 | lblThank.Location = New Point(62, 331 + Y) 119 | Panel1.Height = Panel1.Height + Y 120 | Me.Height = Me.Height + Y 121 | Catch ex As Exception 122 | MsgBox(ex.Message) 123 | Finally 124 | cmd.Dispose() 125 | conn.Close() 126 | End Try 127 | End Sub 128 | Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage 129 | Dim bm As New Bitmap(Me.Panel1.Width, Me.Panel1.Height) 130 | 131 | Panel1.DrawToBitmap(bm, New Rectangle(0, 0, Me.Panel1.Width, Me.Panel1.Height)) 132 | 133 | e.Graphics.DrawImage(bm, 0, 0) 134 | Dim aPS As New PageSetupDialog 135 | aPS.Document = PrintDocument1 136 | End Sub 137 | 138 | 139 | Private Sub frmPrintReceipt_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 140 | Label7.Text = Format(Date.Now, "Short Date") 141 | Label9.Text = Format(Date.Now, "Long Time") 142 | lblInvoice.Text = frmPOS.lblInvoiceNo.Text 143 | LoadCustomer() 144 | GetVatNonVat() 145 | getCashChange() 146 | getEmployee() 147 | LoadReceipt() 148 | PrintDocument1.Print() 149 | frmPOS.txtSearch.Focus() 150 | Me.Close() 151 | End Sub 152 | 153 | Private Sub dgw_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgw.CellContentClick 154 | 155 | End Sub 156 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmLoadStaff.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | True 122 | 123 | 124 | True 125 | 126 | 127 | True 128 | 129 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmLoadCustomer.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | True 122 | 123 | 124 | True 125 | 126 | 127 | True 128 | 129 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmLoadCustomer.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | True 122 | 123 | 124 | True 125 | 126 | 127 | True 128 | 129 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmLoadStaff.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | True 122 | 123 | 124 | True 125 | 126 | 127 | True 128 | 129 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmCustomer.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.OleDb 2 | Public Class frmCustomer 3 | Dim adding As Boolean 4 | Dim updating As Boolean 5 | Public search As Boolean 6 | 7 | Private Sub GetCustomerNo() 8 | Try 9 | sqL = "SELECT CustomerNo FROM Customer Order By CustomerNo Desc" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | If dr.Read = True Then 14 | txtCustNo.Text = dr(0) + 1 15 | Else 16 | txtCustNo.Text = 1 17 | End If 18 | Catch ex As Exception 19 | MsgBox(ex.Message) 20 | Finally 21 | cmd.Dispose() 22 | conn.Close() 23 | End Try 24 | End Sub 25 | 26 | 27 | Private Sub AddCustomer() 28 | Try 29 | sqL = "INSERT INTO Customer(Custname, Address, ContactNo) Values('" & txtName.Text & "', '" & txtAddress.Text & "', '" & txtContactNo.Text & "')" 30 | ConnDB() 31 | cmd = New OleDbCommand(sqL, conn) 32 | Dim i As Integer 33 | i = cmd.ExecuteNonQuery 34 | If i > 0 Then 35 | MsgBox("Customer Added", MsgBoxStyle.Information, "Add Customer") 36 | Else 37 | MsgBox("Failed to add customer", MsgBoxStyle.Critical, "Add Customer") 38 | 39 | End If 40 | Catch ex As Exception 41 | MsgBox(ex.Message) 42 | Finally 43 | cmd.Dispose() 44 | conn.Close() 45 | End Try 46 | End Sub 47 | 48 | Private Sub UpdateCustomer() 49 | Try 50 | sqL = "Update Customer SET Custname ='" & txtName.Text & "', Address ='" & txtAddress.Text & "', ContactNo = '" & txtContactNo.Text & "' WHERE CustomerNo = " & txtCustNo.Text & "" 51 | ConnDB() 52 | cmd = New OleDbCommand(sqL, conn) 53 | Dim i As Integer 54 | i = cmd.ExecuteNonQuery 55 | If i > 0 Then 56 | MsgBox("Customer Updated", MsgBoxStyle.Information, "Update Customer") 57 | Else 58 | MsgBox("Failed to update customer", MsgBoxStyle.Critical, "Update Customer") 59 | End If 60 | Catch ex As Exception 61 | MsgBox(ex.Message) 62 | Finally 63 | cmd.Dispose() 64 | conn.Close() 65 | End Try 66 | End Sub 67 | 68 | Private Sub GetCustomerRecord() 69 | Try 70 | sqL = "SELECT CustName, Address, ContactNo FROM Customer WHERE CustomerNo = " & txtCustNo.Text & "" 71 | ConnDB() 72 | cmd = New OleDbCommand(sqL, conn) 73 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 74 | If dr.Read = True Then 75 | txtName.Text = dr(0) 76 | txtAddress.Text = dr(1) 77 | txtContactNo.Text = dr(2) 78 | End If 79 | Catch ex As Exception 80 | MsgBox(ex.Message) 81 | Finally 82 | cmd.Dispose() 83 | conn.Close() 84 | End Try 85 | End Sub 86 | 87 | 88 | Private Sub ClearFields() 89 | txtCustNo.Text = "" 90 | txtName.Text = "" 91 | txtContactNo.Text = "" 92 | txtAddress.Text = "" 93 | End Sub 94 | 95 | Private Sub EnabledText() 96 | txtCustNo.Enabled = True 97 | txtName.Enabled = True 98 | txtAddress.Enabled = True 99 | txtContactNo.Enabled = True 100 | End Sub 101 | 102 | Private Sub DisabledText() 103 | txtCustNo.Enabled = False 104 | txtName.Enabled = False 105 | txtAddress.Enabled = False 106 | txtContactNo.Enabled = False 107 | End Sub 108 | 109 | 110 | Private Sub EnabledButton() 111 | btnAdd.Enabled = True 112 | btnUpdate.Enabled = True 113 | btnSearch.Enabled = True 114 | btnClose.Enabled = True 115 | 116 | btnSave.Enabled = False 117 | btnCancel.Enabled = False 118 | End Sub 119 | 120 | Private Sub DisabledButton() 121 | btnAdd.Enabled = False 122 | btnUpdate.Enabled = False 123 | btnSearch.Enabled = False 124 | btnClose.Enabled = False 125 | 126 | btnSave.Enabled = True 127 | btnCancel.Enabled = True 128 | End Sub 129 | 130 | Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click 131 | DisabledButton() 132 | ClearFields() 133 | EnabledText() 134 | GetCustomerNo() 135 | 136 | adding = True 137 | updating = False 138 | txtName.Focus() 139 | txtCustNo.Enabled = False 140 | End Sub 141 | 142 | Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click 143 | If txtCustNo.Text = "" Then 144 | MsgBox("Please select record to update", MsgBoxStyle.Critical, "Update Record") 145 | Exit Sub 146 | End If 147 | 148 | EnabledText() 149 | DisabledButton() 150 | 151 | adding = False 152 | updating = True 153 | txtName.Focus() 154 | txtCustNo.Enabled = False 155 | 156 | End Sub 157 | 158 | Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click 159 | search = True 160 | frmLoadCustomer.ShowDialog() 161 | End Sub 162 | 163 | Private Sub txtCustNo_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCustNo.TextChanged 164 | If search = True Then 165 | GetCustomerRecord() 166 | search = False 167 | End If 168 | End Sub 169 | 170 | Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click 171 | Me.Close() 172 | End Sub 173 | 174 | Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click 175 | If adding = True Then 176 | AddCustomer() 177 | DisabledText() 178 | EnabledButton() 179 | ClearFields() 180 | Else 181 | UpdateCustomer() 182 | DisabledText() 183 | EnabledButton() 184 | ClearFields() 185 | End If 186 | End Sub 187 | 188 | Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click 189 | DisabledText() 190 | EnabledButton() 191 | ClearFields() 192 | End Sub 193 | 194 | Private Sub frmCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 195 | EnabledButton() 196 | DisabledText() 197 | End Sub 198 | End Class -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmCustomer.vb: -------------------------------------------------------------------------------- 1 | Imports System.Data.OleDb 2 | Public Class frmCustomer 3 | Dim adding As Boolean 4 | Dim updating As Boolean 5 | Public search As Boolean 6 | 7 | Private Sub GetCustomerNo() 8 | Try 9 | sqL = "SELECT CustomerNo FROM Customer Order By CustomerNo Desc" 10 | ConnDB() 11 | cmd = New OleDbCommand(sqL, conn) 12 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 13 | If dr.Read = True Then 14 | txtCustNo.Text = dr(0) + 1 15 | Else 16 | txtCustNo.Text = 1 17 | End If 18 | Catch ex As Exception 19 | MsgBox(ex.Message) 20 | Finally 21 | cmd.Dispose() 22 | conn.Close() 23 | End Try 24 | End Sub 25 | 26 | 27 | Private Sub AddCustomer() 28 | Try 29 | sqL = "INSERT INTO Customer(Custname, Address, ContactNo) Values('" & txtName.Text & "', '" & txtAddress.Text & "', '" & txtContactNo.Text & "')" 30 | ConnDB() 31 | cmd = New OleDbCommand(sqL, conn) 32 | Dim i As Integer 33 | i = cmd.ExecuteNonQuery 34 | If i > 0 Then 35 | MsgBox("Customer Added", MsgBoxStyle.Information, "Add Customer") 36 | Else 37 | MsgBox("Failed to add customer", MsgBoxStyle.Critical, "Add Customer") 38 | 39 | End If 40 | Catch ex As Exception 41 | MsgBox(ex.Message) 42 | Finally 43 | cmd.Dispose() 44 | conn.Close() 45 | End Try 46 | End Sub 47 | 48 | Private Sub UpdateCustomer() 49 | Try 50 | sqL = "Update Customer SET Custname ='" & txtName.Text & "', Address ='" & txtAddress.Text & "', ContactNo = '" & txtContactNo.Text & "' WHERE CustomerNo = " & txtCustNo.Text & "" 51 | ConnDB() 52 | cmd = New OleDbCommand(sqL, conn) 53 | Dim i As Integer 54 | i = cmd.ExecuteNonQuery 55 | If i > 0 Then 56 | MsgBox("Customer Updated", MsgBoxStyle.Information, "Update Customer") 57 | Else 58 | MsgBox("Failed to update customer", MsgBoxStyle.Critical, "Update Customer") 59 | End If 60 | Catch ex As Exception 61 | MsgBox(ex.Message) 62 | Finally 63 | cmd.Dispose() 64 | conn.Close() 65 | End Try 66 | End Sub 67 | 68 | Private Sub GetCustomerRecord() 69 | Try 70 | sqL = "SELECT CustName, Address, ContactNo FROM Customer WHERE CustomerNo = " & txtCustNo.Text & "" 71 | ConnDB() 72 | cmd = New OleDbCommand(sqL, conn) 73 | dr = cmd.ExecuteReader(CommandBehavior.CloseConnection) 74 | If dr.Read = True Then 75 | txtName.Text = dr(0) 76 | txtAddress.Text = dr(1) 77 | txtContactNo.Text = dr(2) 78 | End If 79 | Catch ex As Exception 80 | MsgBox(ex.Message) 81 | Finally 82 | cmd.Dispose() 83 | conn.Close() 84 | End Try 85 | End Sub 86 | 87 | 88 | Private Sub ClearFields() 89 | txtCustNo.Text = "" 90 | txtName.Text = "" 91 | txtContactNo.Text = "" 92 | txtAddress.Text = "" 93 | End Sub 94 | 95 | Private Sub EnabledText() 96 | txtCustNo.Enabled = True 97 | txtName.Enabled = True 98 | txtAddress.Enabled = True 99 | txtContactNo.Enabled = True 100 | End Sub 101 | 102 | Private Sub DisabledText() 103 | txtCustNo.Enabled = False 104 | txtName.Enabled = False 105 | txtAddress.Enabled = False 106 | txtContactNo.Enabled = False 107 | End Sub 108 | 109 | 110 | Private Sub EnabledButton() 111 | btnAdd.Enabled = True 112 | btnUpdate.Enabled = True 113 | btnSearch.Enabled = True 114 | btnClose.Enabled = True 115 | 116 | btnSave.Enabled = False 117 | btnCancel.Enabled = False 118 | End Sub 119 | 120 | Private Sub DisabledButton() 121 | btnAdd.Enabled = False 122 | btnUpdate.Enabled = False 123 | btnSearch.Enabled = False 124 | btnClose.Enabled = False 125 | 126 | btnSave.Enabled = True 127 | btnCancel.Enabled = True 128 | End Sub 129 | 130 | Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click 131 | DisabledButton() 132 | ClearFields() 133 | EnabledText() 134 | GetCustomerNo() 135 | 136 | adding = True 137 | updating = False 138 | txtName.Focus() 139 | txtCustNo.Enabled = False 140 | End Sub 141 | 142 | Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click 143 | If txtCustNo.Text = "" Then 144 | MsgBox("Please select record to update", MsgBoxStyle.Critical, "Update Record") 145 | Exit Sub 146 | End If 147 | 148 | EnabledText() 149 | DisabledButton() 150 | 151 | adding = False 152 | updating = True 153 | txtName.Focus() 154 | txtCustNo.Enabled = False 155 | 156 | End Sub 157 | 158 | Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click 159 | search = True 160 | frmLoadCustomer.ShowDialog() 161 | End Sub 162 | 163 | Private Sub txtCustNo_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCustNo.TextChanged 164 | If search = True Then 165 | GetCustomerRecord() 166 | search = False 167 | End If 168 | End Sub 169 | 170 | Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click 171 | Me.Close() 172 | End Sub 173 | 174 | Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click 175 | If adding = True Then 176 | AddCustomer() 177 | DisabledText() 178 | EnabledButton() 179 | ClearFields() 180 | Else 181 | UpdateCustomer() 182 | DisabledText() 183 | EnabledButton() 184 | ClearFields() 185 | End If 186 | End Sub 187 | 188 | Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click 189 | DisabledText() 190 | EnabledButton() 191 | ClearFields() 192 | End Sub 193 | 194 | Private Sub frmCustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 195 | EnabledButton() 196 | DisabledText() 197 | End Sub 198 | End Class -------------------------------------------------------------------------------- /SalesInventorySystem/frmPayment.Designer.vb: -------------------------------------------------------------------------------- 1 | _ 2 | Partial Class frmPayment 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form overrides dispose to clean up the component list. 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Required by the Windows Form Designer 18 | Private components As System.ComponentModel.IContainer 19 | 20 | 'NOTE: The following procedure is required by the Windows Form Designer 21 | 'It can be modified using the Windows Form Designer. 22 | 'Do not modify it using the code editor. 23 | _ 24 | Private Sub InitializeComponent() 25 | Me.Panel1 = New System.Windows.Forms.Panel 26 | Me.GroupBox1 = New System.Windows.Forms.GroupBox 27 | Me.txtCash = New System.Windows.Forms.MaskedTextBox 28 | Me.txtChange = New System.Windows.Forms.TextBox 29 | Me.Label3 = New System.Windows.Forms.Label 30 | Me.Label2 = New System.Windows.Forms.Label 31 | Me.txtTA = New System.Windows.Forms.TextBox 32 | Me.Label1 = New System.Windows.Forms.Label 33 | Me.Panel1.SuspendLayout() 34 | Me.GroupBox1.SuspendLayout() 35 | Me.SuspendLayout() 36 | ' 37 | 'Panel1 38 | ' 39 | Me.Panel1.BackColor = System.Drawing.Color.White 40 | Me.Panel1.Controls.Add(Me.GroupBox1) 41 | Me.Panel1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 42 | Me.Panel1.Location = New System.Drawing.Point(7, 7) 43 | Me.Panel1.Name = "Panel1" 44 | Me.Panel1.Size = New System.Drawing.Size(228, 174) 45 | Me.Panel1.TabIndex = 2 46 | ' 47 | 'GroupBox1 48 | ' 49 | Me.GroupBox1.Controls.Add(Me.txtCash) 50 | Me.GroupBox1.Controls.Add(Me.txtChange) 51 | Me.GroupBox1.Controls.Add(Me.Label3) 52 | Me.GroupBox1.Controls.Add(Me.Label2) 53 | Me.GroupBox1.Controls.Add(Me.txtTA) 54 | Me.GroupBox1.Controls.Add(Me.Label1) 55 | Me.GroupBox1.Location = New System.Drawing.Point(8, 4) 56 | Me.GroupBox1.Name = "GroupBox1" 57 | Me.GroupBox1.Size = New System.Drawing.Size(212, 163) 58 | Me.GroupBox1.TabIndex = 0 59 | Me.GroupBox1.TabStop = False 60 | Me.GroupBox1.Text = "Payment" 61 | ' 62 | 'txtCash 63 | ' 64 | Me.txtCash.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 65 | Me.txtCash.Location = New System.Drawing.Point(95, 54) 66 | Me.txtCash.Name = "txtCash" 67 | Me.txtCash.Size = New System.Drawing.Size(110, 31) 68 | Me.txtCash.TabIndex = 0 69 | Me.txtCash.TextAlign = System.Windows.Forms.HorizontalAlignment.Right 70 | ' 71 | 'txtChange 72 | ' 73 | Me.txtChange.BackColor = System.Drawing.Color.White 74 | Me.txtChange.Enabled = False 75 | Me.txtChange.Font = New System.Drawing.Font("Microsoft Sans Serif", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 76 | Me.txtChange.Location = New System.Drawing.Point(95, 91) 77 | Me.txtChange.Name = "txtChange" 78 | Me.txtChange.Size = New System.Drawing.Size(111, 38) 79 | Me.txtChange.TabIndex = 1 80 | Me.txtChange.TextAlign = System.Windows.Forms.HorizontalAlignment.Right 81 | ' 82 | 'Label3 83 | ' 84 | Me.Label3.AutoSize = True 85 | Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 86 | Me.Label3.Location = New System.Drawing.Point(6, 100) 87 | Me.Label3.Name = "Label3" 88 | Me.Label3.Size = New System.Drawing.Size(81, 20) 89 | Me.Label3.TabIndex = 0 90 | Me.Label3.Text = "Change :" 91 | ' 92 | 'Label2 93 | ' 94 | Me.Label2.AutoSize = True 95 | Me.Label2.Location = New System.Drawing.Point(6, 64) 96 | Me.Label2.Name = "Label2" 97 | Me.Label2.Size = New System.Drawing.Size(41, 15) 98 | Me.Label2.TabIndex = 0 99 | Me.Label2.Text = "Cash :" 100 | ' 101 | 'txtTA 102 | ' 103 | Me.txtTA.BackColor = System.Drawing.Color.White 104 | Me.txtTA.Enabled = False 105 | Me.txtTA.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 106 | Me.txtTA.Location = New System.Drawing.Point(95, 19) 107 | Me.txtTA.Name = "txtTA" 108 | Me.txtTA.Size = New System.Drawing.Size(111, 31) 109 | Me.txtTA.TabIndex = 0 110 | Me.txtTA.TextAlign = System.Windows.Forms.HorizontalAlignment.Right 111 | ' 112 | 'Label1 113 | ' 114 | Me.Label1.AutoSize = True 115 | Me.Label1.Location = New System.Drawing.Point(6, 27) 116 | Me.Label1.Name = "Label1" 117 | Me.Label1.Size = New System.Drawing.Size(85, 15) 118 | Me.Label1.TabIndex = 0 119 | Me.Label1.Text = "Total Amount :" 120 | ' 121 | 'frmPayment 122 | ' 123 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 124 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 125 | Me.BackColor = System.Drawing.SystemColors.ActiveCaption 126 | Me.ClientSize = New System.Drawing.Size(241, 187) 127 | Me.Controls.Add(Me.Panel1) 128 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow 129 | Me.Name = "frmPayment" 130 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen 131 | Me.Panel1.ResumeLayout(False) 132 | Me.GroupBox1.ResumeLayout(False) 133 | Me.GroupBox1.PerformLayout() 134 | Me.ResumeLayout(False) 135 | 136 | End Sub 137 | Friend WithEvents Panel1 As System.Windows.Forms.Panel 138 | Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox 139 | Friend WithEvents txtCash As System.Windows.Forms.MaskedTextBox 140 | Friend WithEvents txtChange As System.Windows.Forms.TextBox 141 | Friend WithEvents Label3 As System.Windows.Forms.Label 142 | Friend WithEvents Label2 As System.Windows.Forms.Label 143 | Friend WithEvents txtTA As System.Windows.Forms.TextBox 144 | Friend WithEvents Label1 As System.Windows.Forms.Label 145 | End Class 146 | -------------------------------------------------------------------------------- /Backup/SalesInventorySystem/frmPayment.Designer.vb: -------------------------------------------------------------------------------- 1 | _ 2 | Partial Class frmPayment 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form overrides dispose to clean up the component list. 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Required by the Windows Form Designer 18 | Private components As System.ComponentModel.IContainer 19 | 20 | 'NOTE: The following procedure is required by the Windows Form Designer 21 | 'It can be modified using the Windows Form Designer. 22 | 'Do not modify it using the code editor. 23 | _ 24 | Private Sub InitializeComponent() 25 | Me.Panel1 = New System.Windows.Forms.Panel 26 | Me.GroupBox1 = New System.Windows.Forms.GroupBox 27 | Me.txtCash = New System.Windows.Forms.MaskedTextBox 28 | Me.txtChange = New System.Windows.Forms.TextBox 29 | Me.Label3 = New System.Windows.Forms.Label 30 | Me.Label2 = New System.Windows.Forms.Label 31 | Me.txtTA = New System.Windows.Forms.TextBox 32 | Me.Label1 = New System.Windows.Forms.Label 33 | Me.Panel1.SuspendLayout() 34 | Me.GroupBox1.SuspendLayout() 35 | Me.SuspendLayout() 36 | ' 37 | 'Panel1 38 | ' 39 | Me.Panel1.BackColor = System.Drawing.Color.White 40 | Me.Panel1.Controls.Add(Me.GroupBox1) 41 | Me.Panel1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 42 | Me.Panel1.Location = New System.Drawing.Point(7, 7) 43 | Me.Panel1.Name = "Panel1" 44 | Me.Panel1.Size = New System.Drawing.Size(228, 174) 45 | Me.Panel1.TabIndex = 2 46 | ' 47 | 'GroupBox1 48 | ' 49 | Me.GroupBox1.Controls.Add(Me.txtCash) 50 | Me.GroupBox1.Controls.Add(Me.txtChange) 51 | Me.GroupBox1.Controls.Add(Me.Label3) 52 | Me.GroupBox1.Controls.Add(Me.Label2) 53 | Me.GroupBox1.Controls.Add(Me.txtTA) 54 | Me.GroupBox1.Controls.Add(Me.Label1) 55 | Me.GroupBox1.Location = New System.Drawing.Point(8, 4) 56 | Me.GroupBox1.Name = "GroupBox1" 57 | Me.GroupBox1.Size = New System.Drawing.Size(212, 163) 58 | Me.GroupBox1.TabIndex = 0 59 | Me.GroupBox1.TabStop = False 60 | Me.GroupBox1.Text = "Payment" 61 | ' 62 | 'txtCash 63 | ' 64 | Me.txtCash.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 65 | Me.txtCash.Location = New System.Drawing.Point(95, 54) 66 | Me.txtCash.Name = "txtCash" 67 | Me.txtCash.Size = New System.Drawing.Size(110, 31) 68 | Me.txtCash.TabIndex = 0 69 | Me.txtCash.TextAlign = System.Windows.Forms.HorizontalAlignment.Right 70 | ' 71 | 'txtChange 72 | ' 73 | Me.txtChange.BackColor = System.Drawing.Color.White 74 | Me.txtChange.Enabled = False 75 | Me.txtChange.Font = New System.Drawing.Font("Microsoft Sans Serif", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 76 | Me.txtChange.Location = New System.Drawing.Point(95, 91) 77 | Me.txtChange.Name = "txtChange" 78 | Me.txtChange.Size = New System.Drawing.Size(111, 38) 79 | Me.txtChange.TabIndex = 1 80 | Me.txtChange.TextAlign = System.Windows.Forms.HorizontalAlignment.Right 81 | ' 82 | 'Label3 83 | ' 84 | Me.Label3.AutoSize = True 85 | Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 86 | Me.Label3.Location = New System.Drawing.Point(6, 100) 87 | Me.Label3.Name = "Label3" 88 | Me.Label3.Size = New System.Drawing.Size(81, 20) 89 | Me.Label3.TabIndex = 0 90 | Me.Label3.Text = "Change :" 91 | ' 92 | 'Label2 93 | ' 94 | Me.Label2.AutoSize = True 95 | Me.Label2.Location = New System.Drawing.Point(6, 64) 96 | Me.Label2.Name = "Label2" 97 | Me.Label2.Size = New System.Drawing.Size(41, 15) 98 | Me.Label2.TabIndex = 0 99 | Me.Label2.Text = "Cash :" 100 | ' 101 | 'txtTA 102 | ' 103 | Me.txtTA.BackColor = System.Drawing.Color.White 104 | Me.txtTA.Enabled = False 105 | Me.txtTA.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 106 | Me.txtTA.Location = New System.Drawing.Point(95, 19) 107 | Me.txtTA.Name = "txtTA" 108 | Me.txtTA.Size = New System.Drawing.Size(111, 31) 109 | Me.txtTA.TabIndex = 0 110 | Me.txtTA.TextAlign = System.Windows.Forms.HorizontalAlignment.Right 111 | ' 112 | 'Label1 113 | ' 114 | Me.Label1.AutoSize = True 115 | Me.Label1.Location = New System.Drawing.Point(6, 27) 116 | Me.Label1.Name = "Label1" 117 | Me.Label1.Size = New System.Drawing.Size(85, 15) 118 | Me.Label1.TabIndex = 0 119 | Me.Label1.Text = "Total Amount :" 120 | ' 121 | 'frmPayment 122 | ' 123 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 124 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 125 | Me.BackColor = System.Drawing.SystemColors.ActiveCaption 126 | Me.ClientSize = New System.Drawing.Size(241, 187) 127 | Me.Controls.Add(Me.Panel1) 128 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow 129 | Me.Name = "frmPayment" 130 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen 131 | Me.Panel1.ResumeLayout(False) 132 | Me.GroupBox1.ResumeLayout(False) 133 | Me.GroupBox1.PerformLayout() 134 | Me.ResumeLayout(False) 135 | 136 | End Sub 137 | Friend WithEvents Panel1 As System.Windows.Forms.Panel 138 | Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox 139 | Friend WithEvents txtCash As System.Windows.Forms.MaskedTextBox 140 | Friend WithEvents txtChange As System.Windows.Forms.TextBox 141 | Friend WithEvents Label3 As System.Windows.Forms.Label 142 | Friend WithEvents Label2 As System.Windows.Forms.Label 143 | Friend WithEvents txtTA As System.Windows.Forms.TextBox 144 | Friend WithEvents Label1 As System.Windows.Forms.Label 145 | End Class 146 | -------------------------------------------------------------------------------- /SalesInventorySystem/frmLoadItem.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | True 122 | 123 | 124 | True 125 | 126 | 127 | True 128 | 129 | 130 | True 131 | 132 | --------------------------------------------------------------------------------