Get dynamic input from user - c#

I'm trying to create a simple project, an Inventory management system.
We have a set of items for sale in our inventory (defined in the database) and we dispatch items in the quantity that the customer order.
The issue I have is, a user may order just 1 item, or they may order a 100 items, in whatever quantities they prefer (assume the user of this system gets this info through an email).
So I have some trouble creating the "Sales Order" GUI.
I tried using a ListBox / ListView. There I can select all the items they want and generate a sales order, but I can't enter the corresponding quantity.
It is not practical to have like 20 text boxes in the form.

If I understand your question correctly, it seems as if a good approach would be to have a means of selecting the specific product you want to quantify first. Supermarket POS systems do this through PLU (Price Look Up) codes that identify the product name and price. You could alternately have a search box that combs through your database for product names matching the search query.
After that you can have one text box (I would recommend a number spinner) to select the quantity.
Finally have a button that submits that order of that specific product and move on to the next. You could wait to submit all the quantities needed until the order is completed to signify that it is one unique order if that information is important to you.

Related

How to display different data in Datagrid based on some criteria? C#

I am currently breaking my head over a school project where i have to simulate a smart-shopping bag (datagridview) where customers log in and put various products in it (fruit,chocolates, etc...) and buy them.
They cam insert product into the bag, change it or remove it.
The problem is that i am simulating it with DatagridView, where users see the products that other users selected to buy, since DataGrid only shows the table in the database as a whole. Is there any way to display the products that the specific UserID have put into the datagridview?

How to add unique information to a row in a gridview using winforms?

I am working on designing a small POS system using C# and Winforms. I am using grid view to add scanned item to a transaction (items being sold.) I am looking to collect some tracking information for some items depending of item type.
For example, if a customer is buying a speaker, head phone and a new cell phone. I would need to obtain additional tracking information for the cell phone. I need to know
If the phone was sold as "New Activation" or "Phone Upgrade"
Phone number for that phone
A serial number
The new phone carrier
The carrier's Plan that was selected.
Each item in the database have a type. I could display another form when item if a certain type is added to the transaction (just before it is added.) and then the user will be promoted to fill before the item is actually added to the transaction.
I am struggling with how to add the additional information to the transaction. I could add hidden column with that additional information to the gridview (one column for, phone number, carrier, plan, serial. But there could be so many different hidden column, and I am not sure if the is my only option?
For the back-end, there are three approaches (possibly more) that could be used.
The first approach is to have your database table have 20 additional columns, e.g. CustomName1, CustomValue1, CustomName2, CustomValue2, etc. I've seen this approach used in a couple systems, personally I don't like it because it's limited in the number of fields and it's hard to query.
The second approach is to generalize the first approach into a separate table. E.g. The columns will be POSID, FieldName, FieldValue.
The third approach is to have predefined tables for each particular type of sold product.
The UI design is a separate issue. A simple approach is to provide a "More..." button that is only enabled when a single item in the DGV is selected. When clicked, it will open a form that contains additional input fields.
Another approach is that when the type of product is selected, the additional columns are added to the DGV.

list large numbers of items in dropdown asp.net c#

I have currently implemented a drop-down which displays all the products name from database. On selection of product name from drop down my edit product form will get populated and user can update selected record successfully.
Now my problem is that i have 5000 products in my database.In this case its very difficult for end user to select particular product in drop-down and also populating drop down with large number of records server side takes more time.
What approach should i use to make selection user friendly.Any ideas or help is greatly appreciated
Thanks!!!!
You should use an editable combo box with auto complete feature and load the data depending on user input. Refer this: http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/ComboBox/ComboBox.aspx
This way you dont need to worry about the amount of data, it gets filtered as the user inputs some string.

Complex Sorting of DataTable in c#

I have a datatable, the first five columns of which contain static information, and the rest of which are dynamically built based on some user selections. The dynamic columns are actually groups of 3 columns - such as:
Shop Name (user will enter quantity in this column)
Shop Sale
Shop Stock
These would appear per row, of course, but each user might select a different set of 3 columns to display.
The above already works. The requirement I am trying to solve for now is to SORT the grid based on the Shop Sale column, keeping the sets of three intact. As an example, the shop with most sales will come left-most, and so on...
I resolved this issue, I sorted shops list at an earlier stage, using datatable.defaultview.sort method, issue resolved.

How to retrieve bill information for a check in Quickbooks

I want to get the list of all the bills for which a particular check has been generated.
Consider I have 2 grids on a form. 1st grid (gridChecks) displays all the checks in Quickbooks and when user selects a check, all the bills that are linked to that check should be displayed in the second grid i.e. gridBills which will have columns Date, Type, ReferenceNumber, OriginalAmount, Balance, Paid Amount.
I am not able to find how to use IBillPaymentCheckRet or which interface to use and how to use.
The bills to which a check has been applied are referenced in the AppliedToTxnRet element (QBFC: AppliedToTxnRetList). In order to populate this element you'll have to specify it in the IncludeRetElement list for your BillPaymentCheck query request.

Categories

Resources