Is that right?
Then, within the NextIDBO, I am attempting to implement the function that will return the next ID based on the ID type passed in the argument. I am running into a syntax hurdle. For some reason, a public method in my NextIDBO cannot be seen by the CustomersBO. The function looks like this (full implementation code stripped for simplicity):
Within this function I would run the appropriate stored procedure that returns a scalar value representing the next ID for the new record. Perhaps I have not had enough coffee this morning. What am I missing in the BOs so that the one can see the public method of the other?
Thanks,Bill
The NextIDBO derives from my NextID table that stores the numbering for various entities. The GetNextID function executes a scalar command that fires off a stored procedure that both grabs the appropriate value and then updates the NextID table. The function returns this value to the CustID property as the new ID immediately before saving.
This is not working. The Save() override never fires. Any thoughts?
Now, I just need to get my ExecuteScalar syntax correct.
The save function on the customer works like a charm, now!! This is quite a simple approach to assigning an ID that auto-increments, yet is not a PK. In addition, since I am assigning the ID immediately before the save (rather than on the Add()), the numbers aren't being gobbled up without cause. I know one auditor who is going to like this.
Wonderful framework, gents! Excellent work. It really has saved me a ton of hours. I have actually converted months into days using this framework.
Happy New Year!Bill
Alas! This works even when editing an old customer record, too!! Very scary! I was in a demo to my manager when this reared its ugly head. How do I check to make sure that I am actually in Add mode as opposed to Edit mode while in the BO?