下面是我的绑定源。
pics_Data_HistoryBSForCounts.DataSource = from dh in dataCtx.Pics_Data_Histories
join ui in dataCtx.User_Infos on dh.User_Id equals ui.user_id into ui_dh
from ui_dh1 in ui_dh.DefaultIfEmpty()
where dh.Changed_Date >= fromDate && dh.Changed_Date <= toDate
group ui_dh1 by ui_dh1.user_name into grouped
select new { UserName = grouped.Key.Trim(), Count = grouped.Count(a => a.user_name != null), UserID = grouped.FirstOrDefault().user_id };
我想获取当前记录的用户 ID。
var userRecord = pics_Data_HistoryBSForCounts.Current;
我将当前记录作为字符串获取。有什么方法可以获取属性值吗?
谢谢!