henry
asked on
C# code
Hello,
See below statement & comments:
foreach (var ttQH in (from QH in ttQuoteHed
join QD in Db.QuoteDtl on
new {QH.Company, QH.QuoteNum} equals
new {QD.Company, QD.QuoteNum}
select new{QH, QD.ExtCost_c})) - "Here I need select all records belong to Quote not only new one"
{
ttQH.QH["TotItemCost_c"] = ttQH.ExtCost_c; - "Here I need show SUM of ExtCost"
}
Have no idea how to do that.
thanks
henry
See below statement & comments:
foreach (var ttQH in (from QH in ttQuoteHed
join QD in Db.QuoteDtl on
new {QH.Company, QH.QuoteNum} equals
new {QD.Company, QD.QuoteNum}
select new{QH, QD.ExtCost_c})) - "Here I need select all records belong to Quote not only new one"
{
ttQH.QH["TotItemCost_c"] = ttQH.ExtCost_c; - "Here I need show SUM of ExtCost"
}
Have no idea how to do that.
thanks
henry
ASKER
Maybe my explanation was not clear enough.
I have a quote with multiple parts on it.
ex: Quote # 1
Part x
Part y
Part z
I will need take value from field "ExtCost_c" belong to each part number, SUM and display in quote header
thanks
henry
I have a quote with multiple parts on it.
ex: Quote # 1
Part x
Part y
Part z
I will need take value from field "ExtCost_c" belong to each part number, SUM and display in quote header
thanks
henry
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Working,
thanks
thanks
Do you need for every Quote the sum of all ExtCost in the Quote details?
May i suggest the following approach:
Open in new window
After the execution of the above, you will have a "list" of objects with 2 properties. The first property will be of type of ttQuoteHed and will have all the columns of that table. The second property will be named sumOfExtraCosts and will have the sum of extra costs for that quote.
Giannis