| | |
How do you do a simple POS in VB .net
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2005
Posts: 4
Reputation:
Solved Threads: 0
I need a voice of experience. I am working on a project for school. My project is a small B&M store. I am coding in VB .net I have an Access database with 3 tables - Inventory, SoldInventory and Sales. I need to create a simple POS.
I would like an experienced programmer to tell me if what I envision can be done or if I should look at something different. I have never seen any coding for a POS so I am not sure how they function.
On my form I have a datagrid, a few textboxes and 2 button. When I enter the Inventory Number in the first textbox - hit the first button. The system retrieves the appropriate record from the dataset and enters it into the datagrid. I then enter another Inventory Number and hit submit - a second record is now added to the datagrid. If I dont want an item in the datagrid - I click on that record and hit the first button - that record is now removed from the datagrid. Bascially the first button functionality is Update the datagrid.
I also have 2 more textboxes that take the price of each item and calculate tax and total sales. This information is pulled from the Price field in the datagrid.
The last button has several functions. It will print a receipt created in crystal. It will delete the chosen records from the Inventory table in Access. It will take the tax and total sales and add it to the Sales Table. It will take the information in the datagrid and add it to the SoldInventory Table. And it will clear the datagrid and dataset.
I have not figured out how to code the datagrid - I have tried several things including using the data wizard.
So the question is - Can I add one record at a time into the datagrid or am I reaching beyond Net's ability. Obviously I am reaching beyond mine
I have googled and can not find anything.
Any advice would be greatly appreciated.
I would like an experienced programmer to tell me if what I envision can be done or if I should look at something different. I have never seen any coding for a POS so I am not sure how they function.
On my form I have a datagrid, a few textboxes and 2 button. When I enter the Inventory Number in the first textbox - hit the first button. The system retrieves the appropriate record from the dataset and enters it into the datagrid. I then enter another Inventory Number and hit submit - a second record is now added to the datagrid. If I dont want an item in the datagrid - I click on that record and hit the first button - that record is now removed from the datagrid. Bascially the first button functionality is Update the datagrid.
I also have 2 more textboxes that take the price of each item and calculate tax and total sales. This information is pulled from the Price field in the datagrid.
The last button has several functions. It will print a receipt created in crystal. It will delete the chosen records from the Inventory table in Access. It will take the tax and total sales and add it to the Sales Table. It will take the information in the datagrid and add it to the SoldInventory Table. And it will clear the datagrid and dataset.
I have not figured out how to code the datagrid - I have tried several things including using the data wizard.
So the question is - Can I add one record at a time into the datagrid or am I reaching beyond Net's ability. Obviously I am reaching beyond mine
I have googled and can not find anything. Any advice would be greatly appreciated.
•
•
Join Date: Apr 2005
Posts: 4
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by Anine
I need a voice of experience. I am working on a project for school. My project is a small B&M store. I am coding in VB .net I have an Access database with 3 tables - Inventory, SoldInventory and Sales. I need to create a simple POS.
I would like an experienced programmer to tell me if what I envision can be done or if I should look at something different. I have never seen any coding for a POS so I am not sure how they function.
On my form I have a datagrid, a few textboxes and 2 button. When I enter the Inventory Number in the first textbox - hit the first button. The system retrieves the appropriate record from the dataset and enters it into the datagrid. I then enter another Inventory Number and hit submit - a second record is now added to the datagrid. If I dont want an item in the datagrid - I click on that record and hit the first button - that record is now removed from the datagrid. Bascially the first button functionality is Update the datagrid.
I also have 2 more textboxes that take the price of each item and calculate tax and total sales. This information is pulled from the Price field in the datagrid.
The last button has several functions. It will print a receipt created in crystal. It will delete the chosen records from the Inventory table in Access. It will take the tax and total sales and add it to the Sales Table. It will take the information in the datagrid and add it to the SoldInventory Table. And it will clear the datagrid and dataset.
I have not figured out how to code the datagrid - I have tried several things including using the data wizard.
So the question is - Can I add one record at a time into the datagrid or am I reaching beyond Net's ability. Obviously I am reaching beyond mineI have googled and can not find anything.
Any advice would be greatly appreciated.
Well I have solved part of this dilemma. I can bring in one record at a time into the datagrid.
Private Sub btnSKU_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSKU.Click
OleDbDataAdapter1.SelectCommand.Parameters("InvItemID").Value = txtSKU.Text
OleDbDataAdapter1.Fill(DsSales1)
grdSalesView.SetDataBinding(DsSales1, "Inventory")
End Sub
DsSales1 = the dataset name.
InvItemID = the key in the table
Inventory = table Name
grdSalesView = datagrid Name
OleDbDataAdapter1 = data adapter Name
txtSKU.Text = textbox that you enter the InvItemID
I should add that I used the Wizard to add connection, adapter and dataset.
This coding works fine. Every time I enter a InvItemID into the txtSKU.text - I hit the btnSKU and the record is added to the datagrid.
I am still working on taking the prices that are listed in data grid - adding them together and putting them into Label for total price. And that last button that updates tables and prints the receipt.
•
•
Join Date: Apr 2005
Posts: 4
Reputation:
Solved Threads: 0
Here some more of the solution: This code follows the code above - It basically grabs the data from the the datagrid in the column I specified and sends back the total. I called it subtotal because I am doing a sales application with taxes calculated.
'Calculates the changing subtotal as items are added.
Dim SubTotal
Dim j As Integer
If grdSalesView.CurrentCell.ColumnNumber = 0 Then
For j = 0 To grdSalesView.VisibleRowCount - 2
SubTotal = ((SubTotal) + CDec(grdSalesView.Item(j, 2)))
If IsDBNull(grdSalesView.Item(j, 2)) Then
grdSalesView.Item(j, 2) = 0
End If
Next
End If
'Calculates amounts for textboxes
txtSubtotal.Text = SubTotal
CurrentTax = 0.06
Tax = CDec(SubTotal * (CurrentTax))
txtTax.Text = (Tax)
TotalDue = (SubTotal + (Tax))
txtTotal.Text = (TotalDue)
'clears text box so the user can enter a new number
txtSKU.Clear()
Still trying to figure how to take the information in the datagrid and put it into a different table that is declared in the dataset. I also need to take the information in the textboxes and put that into a third table declared in the dataset.
(sigh) - I graduate next week..and I have to get this done or no Pom and Circumstance for me!
'Calculates the changing subtotal as items are added.
Dim SubTotal
Dim j As Integer
If grdSalesView.CurrentCell.ColumnNumber = 0 Then
For j = 0 To grdSalesView.VisibleRowCount - 2
SubTotal = ((SubTotal) + CDec(grdSalesView.Item(j, 2)))
If IsDBNull(grdSalesView.Item(j, 2)) Then
grdSalesView.Item(j, 2) = 0
End If
Next
End If
'Calculates amounts for textboxes
txtSubtotal.Text = SubTotal
CurrentTax = 0.06
Tax = CDec(SubTotal * (CurrentTax))
txtTax.Text = (Tax)
TotalDue = (SubTotal + (Tax))
txtTotal.Text = (TotalDue)
'clears text box so the user can enter a new number
txtSKU.Clear()
Still trying to figure how to take the information in the datagrid and put it into a different table that is declared in the dataset. I also need to take the information in the textboxes and put that into a third table declared in the dataset.
(sigh) - I graduate next week..and I have to get this done or no Pom and Circumstance for me!
![]() |
Similar Threads
- Simple ASP.Net Login Page using C# (C#)
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
Other Threads in the VB.NET Forum
- Previous Thread: editing registry over network
- Next Thread: Where do my programs reside?
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account arithmetic array basic beginner bing browser button buttons center check code crystalreport cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel fade file-dialog filter forms ftp generatetags google hardcopy html images input insert intel internet mobile monitor net networking objects open output panel passingparameters pdf picturebox picturebox1 port position print printing problem save searchbox searchvb.net select serial settings shutdown soap sqlserver survey table tcp temperature text textbox timer timespan toolbox transparency trim update user vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode year





