I would like to display a list of items and cost from an XML data source and allow the user to select items. When the user selects items I want to calculate if the user selected item total cost(s) exceeds their allowable credit limit. Then save the selection and costs. I'm a first timer and don't know what controls to use or if they have a validation and save functions. I am currently displaying the list in a GridView control fed by and XML data file.
Dave
Hi,
Well what you can do is when the user comes on the page where he can select items to buy you get the Allowed Credit Limit from the source where you have saved it for the user and keep it with you. Now when the user adds item you calculate the total cost of the items added in the list and compare it with the Allowed Credit Limit which you have already retrieved. If the user exceeds it then prompt the user that you don't have enough credit limit or what ever message you want to display. If the item's total cost selected by the user is within the Allowed Credit Limit then call your method to save the records.
Hope it will help you out.
Thanks and best regards,
No comments:
Post a Comment