ASP.NET 2.0, C#, VS 2005, LLBLGenPro 2.0.0.0 (final) Released June 15th, 2007. Using SelfServicing, 2 class.
I have a page that is to manage a master-detail relationship. I have a gridview that displays a list of Installation Locations (Caption, Active, Added By, Added On). When I row in the Gridview is selected, I utilize a FormView control to display the InstallationPhoto Entities for the selected Installation. InstallationEntity has a collection of InstallationPhotoEntities, InstallationPhotoEntity has Active(bool), AddedBy(GUID), AddedOn(DateTime), Thumbnail(Byte[]), Image(Byte[]).
I have 2 LLBLGenProDatasource Controls on the form, on for the InstallationEntityCollection and one for the InstallationPhotoEntityCollection. I set everything up using LivePersistence=true and it works flawlessly, displaying all of the data, even the thumbnil images.
However, now I need to handle adding new InstallationEntities as well as new InstallationPhotoEntities. I assume I could get the InstallationEntities added by utilizing a footer template in the gridview and InsertParameters to set the UID(GUID), AddedByUserUID(GUID) and AddedDate(DateTime).
Where I am stuck is on the photo. I utilize a file upload control and catch the Inserting Event of the form view. There, I resize the image, create the thumbnail and convert both the image and the thumbnail to a byte array. I don't think I can use insert parameters to get a byte array into the db?
I really need to switch my approach don't I? Any advice?