Last post Apr 14, 2009 12:08 PM by sjnaughton
Apr 14, 2009 09:11 AM|oweel|LINK
I'm having the following database scheme.
When logging in the Session variable “CUSTOMER” is set.When the table Hardware is opened I can set a filter
so that the logged in user only sees the hardware from one customer.My code for that is the following:
ListDetails.aspx.cs -> OnPage_Load:
"CUSTOMER == " + Session["CUSTOMER"].ToString();
I want the same behavior when opening the table “Software”: I want to
filter the GridDataSource on the CUSTOMER_ID (stored in the Session).
The problem is that the table Software doesn’t have a field CUSTOMER_ID, I can find that info in the referenced Hardware.
In T-SQL I could use the following SQL:
SELECT *FROM Software s
LEFT JOIN Hardware h ON s.HARDWARE_ID = h.HARDWARE_ID
How can this best be done with Dynamic Data/Linq?
I am using:
Visual Studio 2008 version 9.0.30729.1 SP
.Net Framework version 3.5 SP1 I
prefer not to use Beta versions/not official released versions.
Apr 14, 2009 12:08 PM|sjnaughton|LINK
Hi Marco, have a look at this article of mine if may be what you want [:D]
Cascading Filters and Fields – Dynamic Data Entity Framework Version (UPDATED)