Click here to Skip to main content
15,887,413 members
Home / Discussions / C#
   

C#

 
Questionexecuting a .exe file on remote computer Pin
waqas_2k15-Aug-07 11:32
waqas_2k15-Aug-07 11:32 
AnswerRe: executing a .exe file on remote computer Pin
Harkamal Singh16-Aug-07 1:59
Harkamal Singh16-Aug-07 1:59 
QuestionGet Win32 file version? Pin
flipdoubt15-Aug-07 10:38
flipdoubt15-Aug-07 10:38 
AnswerRe: Get Win32 file version? Pin
Luc Pattyn15-Aug-07 10:58
sitebuilderLuc Pattyn15-Aug-07 10:58 
AnswerRe: Get Win32 file version? Pin
Pete O'Hanlon15-Aug-07 10:58
mvePete O'Hanlon15-Aug-07 10:58 
AnswerRe: Get Win32 file version? Pin
Scott Dorman15-Aug-07 13:46
professionalScott Dorman15-Aug-07 13:46 
GeneralRe: Get Win32 file version? Pin
flipdoubt15-Aug-07 12:38
flipdoubt15-Aug-07 12:38 
Questionhelp with a loop to compare datatables Pin
kboyette15-Aug-07 9:57
kboyette15-Aug-07 9:57 
I have two listBoxes on a Winforms project that populate indirectly from two different datatables. One is a complete list of available families in a families table and the other is a list of the families that are assigned to a particular contact from a join table. This worked fine. Now I want to change the list of available families to exclude those in the "assigned list" so that the available families list only shows those families that are not currently assigned to the current contact. My code for this works fine if there is only one assigned family but if there are more then I get duplicates in the available families list. I've thought of a couple of ways to accomplish this but none of them are elegant. See code below...

private void loadFamiliesList(string contactID)
{

int cID = Convert.ToInt32(contactID);
this.view_form_manageContactsTableAdapter.FillByContact(this.ds_formContactsFamilies4Contact.view_form_manageContacts, cID);
listBox_availableFamilies.Items.Clear();

foreach (DataRow datarow in ds_form_contacts.tbl_families.Rows)
{

string fam1 = datarow["familyName"].ToString();
string famID = datarow["familyID"].ToString();
string cID2 = contactID;
int i = ds_formContactsFamilies4Contact.view_form_manageContacts.Rows.Count;
// MessageBox.Show("ContactID is " + i);
if (i < 1)
{
listBox_availableFamilies.Items.Add(new ItemObject(fam1, famID, cID2));
}
else
{

foreach (DataRow datarow3 in ds_formContactsFamilies4Contact.view_form_manageContacts.Rows)
{
string fam3 = datarow3["familyName"].ToString();
string famID3 = datarow3["familyID"].ToString();
string cID3 = contactID;
if (famID != famID3)
{
// listBox_availableFamilies.Items.Add(fam1);

listBox_availableFamilies.Items.Add(new ItemObject(fam1, famID, cID2));
}
}
}
}

}

-Kevin
AnswerRe: help with a loop to compare datatables Pin
Luc Pattyn15-Aug-07 10:21
sitebuilderLuc Pattyn15-Aug-07 10:21 
GeneralRe: help with a loop to compare datatables Pin
kboyette15-Aug-07 10:57
kboyette15-Aug-07 10:57 
GeneralRe: help with a loop to compare datatables Pin
Luc Pattyn15-Aug-07 11:48
sitebuilderLuc Pattyn15-Aug-07 11:48 
GeneralRe: help with a loop to compare datatables Pin
kboyette16-Aug-07 4:38
kboyette16-Aug-07 4:38 
GeneralRe: help with a loop to compare datatables Pin
Luc Pattyn16-Aug-07 4:55
sitebuilderLuc Pattyn16-Aug-07 4:55 
GeneralRe: help with a loop to compare datatables Pin
kboyette16-Aug-07 10:46
kboyette16-Aug-07 10:46 
AnswerRe: help with a loop to compare datatables Pin
pmarfleet15-Aug-07 10:26
pmarfleet15-Aug-07 10:26 
GeneralRe: help with a loop to compare datatables Pin
kboyette15-Aug-07 10:55
kboyette15-Aug-07 10:55 
AnswerRe: help with a loop to compare datatables [modified] Pin
Yosh_17-Aug-07 0:19
professionalYosh_17-Aug-07 0:19 
Question[C#] - Acess Control for directories Pin
aravinda77715-Aug-07 8:31
aravinda77715-Aug-07 8:31 
AnswerRe: [C#] - Acess Control for directories Pin
Dave Kreskowiak15-Aug-07 9:21
mveDave Kreskowiak15-Aug-07 9:21 
GeneralRe: [C#] - Acess Control for directories Pin
Scott Dorman15-Aug-07 13:51
professionalScott Dorman15-Aug-07 13:51 
GeneralRe: [C#] - Acess Control for directories Pin
Dave Kreskowiak15-Aug-07 16:10
mveDave Kreskowiak15-Aug-07 16:10 
AnswerRe: [C#] - Acess Control for directories Pin
PhilDanger15-Aug-07 10:59
PhilDanger15-Aug-07 10:59 
QuestionJS script from C# Pin
vis200715-Aug-07 5:32
vis200715-Aug-07 5:32 
AnswerRe: JS script from C# Pin
led mike15-Aug-07 5:52
led mike15-Aug-07 5:52 
AnswerRe: JS script from C# Pin
Michael Sync15-Aug-07 6:26
Michael Sync15-Aug-07 6:26 

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.