我想根据自己的个人数据显示数据。
else
{
using (DB.SASupportITEntities db = new DB.SASupportITEntities())
{
IQueryable<DB.ITCase1> dbIT = db.ITCase1;
// Put any filter here before the next comment.
// Example filter dbIT = dbIT.where(m => m.Department == ddlFilterDepartment.selectedValue);
// Now start extract data from database.
var result = (from tbCase in dbIT
join tbRequestor in db.View_SA_Employee on tbCase.Requestor equals tbRequestor.User_ID
join tbCloseBy in db.View_SA_Employee on tbCase.CloseBy equals tbCloseBy.User_ID into outerCloseBy
from tbCloseBy in outerCloseBy.DefaultIfEmpty()
join tbDept in db.View_SA_Department on tbCase.Department equals tbDept.Department_Code
//// where aa => aa.User_ID == aa.selectedValue
select new
{
tbCase.Area,
tbCase.Case_ID,
tbCase.CloseBy,
tbCase.CloseDate,
tbCase.CloseRemark,
tbCase.CreationDate,
tbCase.Department,
tbCase.DepartmentCharge,
tbCase.DocNo,
tbCase.NormalService,
tbCase.OtherService,
tbCase.Purpose,
RequestorName = tbRequestor.User_Name,
CloseByName = tbCloseBy.User_Name,
tbDept.Department_Name
}
).ToList();
gridHistory.DataSource = result;
gridHistory.DataBind();
}
}