StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Add an overload to NewRowExpand / Collapse
Author
Message
Posted 06/07/2007 1:31:08 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 09/05/2008 9:57:46 AM
Posts: 354, Visits: 2,247
Would it be possible to add an overload to NewRow to allow a datarow to be passed in? 

Thanks

Paul

Post #9410
Posted 06/07/2007 2:14:02 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
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.

Post #9412
Posted 06/07/2007 3:08:26 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 09/05/2008 9:57:46 AM
Posts: 354, Visits: 2,247
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?

Post #9415
Posted 06/07/2007 3:20:40 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
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
Post #9417
Posted 06/07/2007 3:38:39 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 09/05/2008 9:57:46 AM
Posts: 354, Visits: 2,247
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.
Post #9419
Posted 06/07/2007 3:53:57 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
Yeah...you just have to be careful of primary keys....just like you did in FoxPro
Post #9420
Posted 06/07/2007 4:23:10 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 09/05/2008 9:57:46 AM
Posts: 354, Visits: 2,247
It already yelled at me about that
Post #9422
Posted 06/07/2007 10:22:40 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
Yeah, it'll get ya
Post #9427
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 1:01am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.