Business Object Contents not Syncing with provided ID


Author
Message
PeterA
PeterA
StrataFrame Novice (74 reputation)StrataFrame Novice (74 reputation)StrataFrame Novice (74 reputation)StrataFrame Novice (74 reputation)StrataFrame Novice (74 reputation)StrataFrame Novice (74 reputation)StrataFrame Novice (74 reputation)StrataFrame Novice (74 reputation)StrataFrame Novice (74 reputation)
Group: Forum Members
Posts: 72, Visits: 235
I know I must be missing something, but I'm completely lost as to what that something might be.



Previously today, I'd gotten business objects all working. I clicked on the link to the page (detail.aspx?SupplierID=3) and it pulled up the supplier information (the one identified with ID #3). It pulled up all the related data according to the relationships and addresses.



Then, I tried navigating to a different supplier detail from the listing page and it only brings up the original supplier.



For example, I have a listing page (listing.aspx) with a gridview list of two suppliers. The link generated for supplier 1 goes to "detail.aspx?SupplierID=1" and for supplier 2 goes to "detail.aspx?SupplierID=2". If I click either link, though, I bring up the same data.



I tried turning off HTTP caching with:





Response.Cache.SetCacheability(HttpCacheability.NoCache);

Response.Cache.SetExpires(DateTime.Now);

Response.CacheControl = "Private";





When the IsPostBack property is false, I populate my business object:





Supplier.FillByPrimaryKey(Int32.Parse(Page.Request.QueryString["SupplierID"]));

SupplierAddress.FillByParentPrimaryKey(Int32.Parse(Page.Request.QueryString["SupplierID"]));





I did some checking and it turns out when I populate by Primary Key, it's putting information for 5 suppliers into the business object, even though the integer I pass it is unique.



I've defined the parent relationships (Supplier doesn't have one, but is part of several other M2M relationships). I've set the DataSourceKeys so it all pulls from the correct data source. I have the BusinessLayerLinkManager set and it has been properly handling the M2M relationships.



Why might it be pulling the same supplier information regardless of the ID I pass along?



Thanks!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search