Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I want to know that in a POS how all the purchased items are grouped into one invoice or receipt no with the Qty * Unit Price as the Unit Total and collective of all the Unit Totals as the Grand Total.

I cannot understand that do I need to add this data first to a List like structure or not? I am using C# Net. So can someone help me to solve this matter?

Thank you,'
Chiranthaka
Posted
Comments
BillWoodruff 20-Dec-14 10:00am    
How you "group" would depend on the database being used, and whether you can tell the database to return you the "grouped" data by SQL Query, or whether you need to use Linq, and so on.

Without details about the data, and how you access it, how can we help you ?
Chiranthaka Sampath 20-Dec-14 10:22am    
Hi Bill,

Lets assume that a person come to the grocery and buys some groceries and the cashier add all the purchased groceries into one bill. This data should pas to a Database but how can I organize the tables to sore these info and show them in the UI? That's where I stuck.
BillWoodruff 20-Dec-14 10:47am    
It would be useful to know a little about what level of experience you have with C#, .NET, and WinForms. Are you using Linq ? For this project: have you started "modeling" ... sketching out interfaces and classes ? Have you selected a database type ? Is this homework, or work for a client, or something you are doing for your own self-education ?

I think you need to focus on the "how" of the groceries getting "collected" into one shopping cart, and brought to the cashier. And, how the cashier scans the items ... so each item must have some ID ... and each item has its price looked-up, unit quantities are calculated, and all that data is added to the final bill in structured form.

So, do you have a database now ? Usually you would create a database first, and then have Tables of Types of Items, Tables of Items, Tables of current Item prices ... of course how those tables are organized will be related to the type of database you use ... relational ? flat-file ? noSQL ?

I think to assist you we need to get ... details.
Chiranthaka Sampath 30-Dec-14 21:57pm    
Hi Bill,

Sorry for the delayed response. I did not want to ruin your holiday. Actually this thing is for my research because we usually Normalize RDBMS databases. So we cannot use redundant data. So how we suppose to insert several data parts grouped into one invoice no? I have an Access Database and planning to use MS SQL or MySQL.
Chiranthaka Sampath 5-Jan-15 0:36am    
Sorry for the delayed response. I did not want to ruin your holiday. Actually this thing is for my research because we usually Normalize RDBMS databases. So we cannot use redundant data. So how we suppose to insert several data parts grouped into one invoice no? I have an Access Database and planning to use MS SQL or MySQL.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900