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 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.

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.

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!

You are trying to hijack a thread that has been dead for more than 8 years. Please start a new thread and provide more details.

This article has been dead for over six months. Start a new discussion instead.