Displaying field from a joined table


Author
Message
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (940 reputation)Advanced StrataFrame User (940 reputation)Advanced StrataFrame User (940 reputation)Advanced StrataFrame User (940 reputation)Advanced StrataFrame User (940 reputation)Advanced StrataFrame User (940 reputation)Advanced StrataFrame User (940 reputation)Advanced StrataFrame User (940 reputation)Advanced StrataFrame User (940 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
I imagine this concept will be the same whether the sql statement is executed from the front end or the cursor is returned from a stored proc

I left joined credit cards to customers ( handling nulls and returning "NO CARD ON FILE") so there is a cardnumber field being returned in the cursor that I get with the stored proc

At debug time in me.customersbo1.currentview I can see the cardnumber column with data.

I looked in BO mapper and there doesn't look to be anyplace there to fake the BO into created a property (probably just as well as I assume it could not be updateable)  Thought a custom field prop would be the way to go but

''' <summary>

''' Customer's Credit Card

''' </summary>

''' <remarks></remarks>

<Browsable(False), _

BusinessFieldDisplayInEditor(), _

Description("Customer's Credit card"), _

DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _

Public ReadOnly Property [cardnumber]() As System.String

Get

Return cardnumber

End Get

End Property

Protected Overrides Function GetCustomBindablePropertyDescriptors() As MicroFour.StrataFrame.Business.FieldPropertyDescriptor()

'-- Create and return a new array of FieldPropertyDescriptor

' objects that contains the ReflectionPropertyDescriptor

' for the cust_fullname field.

Return New FieldPropertyDescriptor() { _

New ReflectionPropertyDescriptor( _

"cardnumber", GetType(CustomersBO))}

End Function

Return Cardnumber gets the error that it must be declared - but I'm not sure what the syntax is to tell it the field will be in the cursor at runtime

( I do realize that if I add a custom prop in this way I will probably need to always be sure it is provided in each data access scenario.  Does that mean I should be creating a view on the back end so the field is present in the definition when the bizobj is mapped?  No problem, if that's the case but wanted to make sure there wasn't another trick I was missing as I might want to display something like this without having to create an updateable view on the back end)

TIA

Charles

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Charles R Hankey - 16 Years Ago
Edhy Rijo - 16 Years Ago
Edhy Rijo - 16 Years Ago
Charles R Hankey - 16 Years Ago
Charles R Hankey - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Edhy Rijo - 16 Years Ago
Charles R Hankey - 16 Years Ago
                     Charles,

Glad you got it going! Here are some other things...
Greg McGuffey - 16 Years Ago
                         Or just test on the count: [codesnippet]If Me.Count < 0 Then '--...
Trent L. Taylor - 16 Years Ago
                             Trent, should one always test for the count in using customer field...
Charles R Hankey - 16 Years Ago
                                 [quote] Trent, should one always test for the count in using...
Trent L. Taylor - 16 Years Ago
                         Hi Greg Thanks for the heads up. in this case I'm joining to another...
Charles R Hankey - 16 Years Ago
Charles R Hankey - 16 Years Ago
Trent L. Taylor - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search