Click here to Skip to main content
15,891,248 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regarding Deployment Pin
Michael Sync23-Dec-07 21:16
Michael Sync23-Dec-07 21:16 
GeneralRe: Regarding Deployment Pin
sindhutiwari23-Dec-07 21:37
sindhutiwari23-Dec-07 21:37 
GeneralRe: Regarding Deployment Pin
Michael Sync23-Dec-07 21:43
Michael Sync23-Dec-07 21:43 
General[Message Deleted] Pin
ven32123-Dec-07 17:02
ven32123-Dec-07 17:02 
GeneralRe: How to save Datagridview data to Access database Pin
Paul Conrad24-Dec-07 6:08
professionalPaul Conrad24-Dec-07 6:08 
GeneralSync between a local and remote Dataset Pin
Are Jay23-Dec-07 16:11
Are Jay23-Dec-07 16:11 
GeneralRe: Sync between a local and remote Dataset Pin
Are Jay23-Dec-07 16:38
Are Jay23-Dec-07 16:38 
GeneralRe: Sync between a local and remote Dataset Pin
Are Jay23-Dec-07 18:11
Are Jay23-Dec-07 18:11 
private void CompaniesCompare()
{
rowsAdded = 0;
rowsDeleted = 0;
rowsUpdated = 0;
start = DateTime.Now;

// This will update and add the rows
m_parentProcess.OnPostMessageEventHandler( this, new MigrationEventArgs( "\tcomparing company data." ) );
foreach ( dsLogPro.CompaniesRow row_Raw in ds_Raw.Companies.Rows )
{
dsLogPro.CompaniesRow found_Local = ds_Local.Companies.FindByCompanyCode( row_Raw.CompanyCode );
if ( found_Local != null )
{
if ( !found_Local.Equals( row_Raw ) )
{ // raw will trump local
foreach ( DataColumn col in ds_Local.Companies.Columns )
{
found_Local[ col ] = row_Raw[ col ]; // update local with raw
}
rowsUpdated++;
}
}
else
{ // this must be a new row
found_Local = ds_Local.Companies.NewCompaniesRow();
foreach ( DataColumn col in ds_Local.Companies.Columns )
{
found_Local[ col ] = row_Raw[ col ]; // update local with raw
}
ds_Local.Companies.Rows.Add( found_Local );
rowsAdded++;
}
UpdateProgressBar();
}

// This will remove un-needed rows
foreach ( dsLogPro.CompaniesRow row_Local in ds_Local.Companies.Rows )
{
dsLogPro_Live.CompaniesRow found_Raw = ds_Raw.Companies.FindByCompanyCode( row_Local.CompanyCode );
if ( found_Raw == null )
{ // was not present in the raw so remove it.
ds_Local.Companies.Rows.Remove( row_Local );
rowsDeleted++;
}
UpdateProgressBar();
}
}

This is what I have ended up with and would like someone elses opinion on the code.
I'm listening but I only speak GEEK.
Generalclick a button with httpwebrequest Pin
brsecu23-Dec-07 15:54
brsecu23-Dec-07 15:54 
GeneralRe: click a button with httpwebrequest Pin
Ravi Bhavnani23-Dec-07 21:47
professionalRavi Bhavnani23-Dec-07 21:47 
GeneralRe: click a button with httpwebrequest Pin
techbrij15-Jul-10 18:51
techbrij15-Jul-10 18:51 
QuestionHow to joint two wmv files (same framerate, resolution..) Pin
Stumproot23-Dec-07 10:48
Stumproot23-Dec-07 10:48 
GeneralRe: How to joint two wmv files (same framerate, resolution..) Pin
Sam Xavier17-Jan-08 23:45
Sam Xavier17-Jan-08 23:45 
GeneralRe: How to joint two wmv files (same framerate, resolution..) Pin
Stumproot18-Jan-08 7:30
Stumproot18-Jan-08 7:30 
GeneralClipboard and the DeviceIndependentBitmap format Pin
Mike Hankey23-Dec-07 8:59
mveMike Hankey23-Dec-07 8:59 
GeneralFind color in pixel. Pin
jafingi23-Dec-07 4:05
jafingi23-Dec-07 4:05 
GeneralRe: Find color in pixel. Pin
Kristian Sixhøj23-Dec-07 4:09
Kristian Sixhøj23-Dec-07 4:09 
GeneralRe: Find color in pixel. Pin
jafingi23-Dec-07 5:49
jafingi23-Dec-07 5:49 
GeneralRe: Find color in pixel. Pin
Kristian Sixhøj23-Dec-07 6:28
Kristian Sixhøj23-Dec-07 6:28 
GeneralComparing dates Pin
Demian Panello23-Dec-07 3:15
Demian Panello23-Dec-07 3:15 
GeneralRe: Comparing dates Pin
Paul Conrad23-Dec-07 5:59
professionalPaul Conrad23-Dec-07 5:59 
GeneralRe: Comparing dates Pin
DannyAdler23-Dec-07 21:35
DannyAdler23-Dec-07 21:35 
GeneralRe: Comparing dates Pin
Paul Conrad24-Dec-07 4:43
professionalPaul Conrad24-Dec-07 4:43 
GeneralRe: Comparing dates Pin
DannyAdler24-Dec-07 21:12
DannyAdler24-Dec-07 21:12 
GeneralRe: Comparing dates Pin
GuyThiebaut23-Dec-07 6:03
professionalGuyThiebaut23-Dec-07 6:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.