Add an overload to NewRow


Author
Message
Paul Chase
Paul Chase
Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Would it be possible to add an overload to NewRow to allow a datarow to be passed in? 

Thanks

Paul

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Why don't you just use the CopyDataFrom method on the BO because if you already have another DataRow it has to come from another DataTable.  You can append to the current data table rather than overwriting all of the internal data.  You will then have to set that row to Added:

CurrentRow.SetAdded()

You could also add an overload yourself by creating your own BO base class that inherits from the BusinessLayer then you inherit your BOs off of that class which has the NewRow overload you are expecting.

We can add this to the list, but it won't make it into 1.6.1. Smile

Paul Chase
Paul Chase
Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Trent,

No problem on when it gets in. I have it as an overloads in my base bus layer but i was just worried about if you change something in newrow might break my overload.

On the CopyDatafrom method does that copy the entire data data table or just the current row?

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
On the CopyDatafrom method does that copy the entire data data table or just the current row?

You can have it copy from the DataTable or the DataView.  So if you use the DataView you could filter out just that one record then the CopyDataFrom would only move in that one record.  This is the second parameter of the CopyDataFrom method that specifies the data that will be copied in and from where.

FYI....all DataTables already have a view attached to them so this is the view that will be used when using that option:

MyDataTable.DefaultView

Paul Chase
Paul Chase
Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Thanks Trent that helps I am trying to something like scatter memvar in foxpro where I am on a record and copy it to memory change the values of a few fields and then insert it back in the same table.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah...you just have to be careful of primary keys....just like you did in FoxPro Smile
Paul Chase
Paul Chase
Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
It already yelled at me about thatHehe
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
BigGrin Yeah, it'll get ya Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search