Help with Save and Update in Winforms MDI App

Help with Save and Update in Winforms MDI App

Old forum URL: forums.lhotka.net/forums/t/9306.aspx


coommark posted on Saturday, July 31, 2010

I am working on this application using CSLA 3.8. Its an MDI Winforms Application. This sample application uses Forms as against the winpart in the sample project trackers. I have easily implemented fetch and delete in these forms. But I have been trying without success to implement Save and Update.

This may be very simple to the more experienced, but its got me pulling out my hair, and if i find no solution, i will go bald before evening tomorrow.

Please what is the simplest possible code for SAVE (when i am not using winparts)? What i am trying to save is a BusinessBase class.

PLEASE someone help me. I saw a post by the author here, but its still in line with the PTracker PTwin sample.

HELP!

RockfordLhotka replied on Saturday, July 31, 2010

The best and most detailed information on dealing with Windows Forms is in the Using CSLA .NET 3.0 ebook - there's a chapter on the topic in that ebook.

The basic thing to remember is that you must always properly unbind all business objects from the UI before attempting to save. The CslaActionExtender control (described in Expert 2008 Business Objects) is helpful in getting this right, or you can use the techniques described in the ebook.

coommark replied on Sunday, August 01, 2010

Wow! Thanks Rocky! I got it using the CslaActionExtender control! You are always helpful! Everytime you reply my posts, I ask myself what i've done to deserve your attention?

You rock! Its always soooo very difficult for some of us who never took one computing course to get it right! But with you, and the many contributors here, folk like us stand a chance in this fast-paced computing world! The Lord will bless you from His throne!

Thank you. Thank you. Thank you. What i was getting wrong with the CslaActionExtender sample application was the App.config connection string! It forced me to read chapter 10 all over on data access! Such a blessing! After i edited it, changing the connectionString to point to the disk location of the .mdf file of the project, voila! Everything worked and i got what i wanted. Now i will not go bald no more pulling off my hair!

Thank you. Thank you. Thank you everyone on CSLA that helps folk like me! Someday i hope to help others with CSLA as i've been helped with it. And thanks to Miguel. All i am proud of is that we have elders who pave the way for us, carrying us on their eagle's wings!

Love and blessings!

coommark replied on Sunday, August 01, 2010

I forgot to add. I am using VIBlend controls for Winforms. And CslaActionExtender control works fine with them.

Copyright (c) Marimer LLC