Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Yeah...that happens to me too from time to time
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
Actually, the maintenance form toolstrip is designed to talk to the Primary Business object of the form rather than the first in the collection. I knew that. No really I did.  I just was a bit tired from body surfing  and forgot to mention it.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
LOL....yup, it'll kill ya that first time you install it  But it is great once you get it up.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
By the way, if you guys wonder what I'm doing awake at this time (2:02am) over here, it is all Win2003Server, SQL2005 and TeamFoundation fault... third try...
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
I see... Not trying to be annoying, but I even prefer them to be diferent from the main toolstrip, which is there to create the parent in this form. So, in any tab your customer might be, he will know that if he chooses New from the main toolstrip, he will be able to go straight to the main Tab and insert the parent information, and then, in each tab of your form there will be a customized (like in the sample, did you notice the pictures for Add, etc., credit cards?) toolstrip with the choices you need. Probably in many cases you will only need an Add, Edit and Delete, or something. If you didn't like all this, just shout at me, I won't cry...
|
|
|
Ben Hayat
|
|
Group: Forum Members
Posts: 374,
Visits: 1.2K
|
what you are trying to accomplish isn't something like the Customer Maintenance form in the CRM Sample? With the Credit Cards page? Or even the Order Entry form? Yes, except I want to offer the same toolstrip that is used for the customerBO, for credit card or in case of orders/order lines. In toolstrip, you get New, Update, Delete, Undo, navigation, browse Dialog that look a certain way and depending on what you are doing, the buttons become enabled and disabled. But I have to give that up and add primitive style looking (like it is in the credit card section) which does not match the customer side. The client will NOT accept that!!! And they had already told me they want the Credit card, shipping addresses, notes and other multi lines in the same form as customer form in different tabs.
..ßen
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Hehe  yeah, I could use a vacation to the beach! As for your question, yes, this is the approach that we took, and as I had mentioned in a previous post to Ben Hayat, we create a custom toolbar for each of those sections. It is literally only a line of code within those buttons that gets called and potentially shows a child form. We also create a SetToolbarItems() method in those type of forms that properly enable/disable those toolbars depending on the editing state, etc.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Hi Ben. I'm very sorry if I didn't get the picture properly here... but what you are trying to accomplish isn't something like the Customer Maintenance form in the CRM Sample? With the Credit Cards page? Or even the Order Entry form? By the way, haven't seen any nice biquinis by the beach since the classes... well, that might be because I haven't been to the beach... for years now!!!
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Wouldn't that be a better and cleaner approach if you would expose the BO property? It can still default to the primary BO, and then we overwrite that. This way, everyone gets this feature rather than each one of us do it our own way? No. If you look at the code behind the maintenance for toolstrip, it never talks to the PrimaryBusiness object directly. It actually uses form Add, Edit, Save, Undo methods, etc. It also takes into account the IncludeInForm properties. So you can change the behavior of the toolstrip by setting the IncludeInForm properties on the form and on the individual BOs.
|
|
|
Ben Hayat
|
|
Group: Forum Members
Posts: 374,
Visits: 1.2K
|
Trent; Many times the primary BO happens to be the first item on the collection though, but ultimately it is the primary BO. Would that break your code if it just points to the first one when we drop it and then we can change it? One, you may consider creating a user control that has a maintenance form toolstrip on it and then transate the BOs through the BOTranslations property. I really don't want to go this route of creating a bunch of User Controls, for all these sub sections for all these forms. Second option is to create your own toolstrip, which really would not be a difficult task since there is not that much functionality that needs to be added. You could also expose a property on your toolstrip that accepts a BO as a property and the toolstrip then manages that BO. Wouldn't that be a better and cleaner approach if you would expose the BO property? It can still default to the primary BO, and then we overwrite that. This way, everyone gets this feature rather than each one of us do it our own way? By creating my own toolstrip, what about the BrowseDialog functionality? I need to offer that to the user for each BO search?
..ßen
|
|
|