D
David
Hi,
I have a table with many columns.
I have to do a data merge between two rows of data in this table. I need to
transfer most of the items in one row to another row.
I could go through each and every column and transfer, but I am looking to
do it a lot quicker.
using (DataClassesDataContext dc = new DataClassesDataContext())
{
ServiceSheet sht = dc.ServiceSheets.First(a => a.SheetID ==
SecondaryMergeSheet.Text); // Vendor sheet
ServiceSheet oSht = dc.ServiceSheets.First(a => a.SheetID ==
PrimaryMergeSheet.Text); // Operator sheet
// Here is the sort of thing I need to do, but I don't know how.
foreach (LINQ-FIELD fld in Sht)
{
fld.<fieldname> = Sht.<fieldname>;
}
dc.SubmitChanges();
}
Is this possible or is there another way that I can do this?
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
I have a table with many columns.
I have to do a data merge between two rows of data in this table. I need to
transfer most of the items in one row to another row.
I could go through each and every column and transfer, but I am looking to
do it a lot quicker.
using (DataClassesDataContext dc = new DataClassesDataContext())
{
ServiceSheet sht = dc.ServiceSheets.First(a => a.SheetID ==
SecondaryMergeSheet.Text); // Vendor sheet
ServiceSheet oSht = dc.ServiceSheets.First(a => a.SheetID ==
PrimaryMergeSheet.Text); // Operator sheet
// Here is the sort of thing I need to do, but I don't know how.
foreach (LINQ-FIELD fld in Sht)
{
fld.<fieldname> = Sht.<fieldname>;
}
dc.SubmitChanges();
}
Is this possible or is there another way that I can do this?
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available