所以,球員......我有這樣的疑問:Linq to SQL - 輸出類型? (不顯示信息只顯示型)
Allow the user view the top five selling products in descending order grouped by country.
這裏是我的代碼有:
var q6 = (from t in northwind.Products
join o in northwind.Suppliers on t.SupplierID equals o.SupplierID
group t.UnitPrice by new {o.Country, t.UnitPrice} into grouped
let county = grouped.Key.Country
let price = grouped.Key.UnitPrice
group new
{
Country = county,
Product = price
}
by county
into countryGrouped
select new
{
Output = countryGrouped.Key,
Price = countryGrouped.OrderBy(c => c.Product)
});
lbxTop5.ItemsSource = q6;
它的工作原理就像輸出價格一樣。
價格出來是這樣的:
誰能告訴我如何輸出價格以適當的格式,而不是數據類型?
謝謝!
這可能與你指定的控制 – codingbiz 2013-04-24 16:52:58