Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 27th, 2006, 01:37 PM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Urgent help required!

Hi,

I'm using Visual Studio C# 2005

I have two tables in a Access database.

Table1: Products
ProductID
ProductName
ProductSellingPrice
ProductCostPrice


Table2: Transactions
TransactionID
TransactionType
ProductID
TransactionQuantity
TransactionAmount

I have created a form for the 'Transactions'-table. The form contains
a combo box which displays Product-Names instead of the ProductID. So the user selects the required product and types in the required quantity (TransactionQuantity), which is then used to calculate the TransactionAmount.

However, this is where I am stuck, as I can not figure out the code
required to obtain the selling price of the selected product in the combo box, which then needs to be multiplied by the quantity typed in by the user and displayed in a textbox.

If more information is needed please ask!!

thanks for any help!

 
Old May 19th, 2006, 02:34 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Populate the two table in DataSet
use hashtable to store productId and Productname.
Use productId as Key and Productname as value of that Key.
SelectionChange Event of combobox pass qry "Select productname from products where productId = '" + Combobox1.SelectedValue.ToString() + "'"
I hope it will give the desired result.

Bijgupt





Similar Threads
Thread Thread Starter Forum Replies Last Post
required urgent help deb_kareng C# 1 September 5th, 2006 08:49 AM
urgent reply required uitian123 Crystal Reports 0 August 19th, 2005 12:48 AM
Urgent help required AMP - Max Current BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 December 20th, 2004 11:26 PM
urgent reply required ham General .NET 36 August 30th, 2004 02:58 AM
stored procedure urgent help required sarfraz Crystal Reports 0 April 19th, 2004 08:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.