Click here to Skip to main content
15,896,425 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to check the result of division for an integer? Pin
User 167325215-Aug-07 18:51
User 167325215-Aug-07 18:51 
AnswerRe: How to check the result of division for an integer? Pin
V.15-Aug-07 21:22
professionalV.15-Aug-07 21:22 
QuestionRemote Desktop Sharing Pin
dhami_naresh15-Aug-07 15:48
dhami_naresh15-Aug-07 15:48 
AnswerRe: Remote Desktop Sharing Pin
Michael Sync15-Aug-07 16:46
Michael Sync15-Aug-07 16:46 
GeneralRe: Remote Desktop Sharing Pin
dhami_naresh17-Aug-07 7:05
dhami_naresh17-Aug-07 7:05 
QuestionDataset and Data adapter Pin
C#Coudou15-Aug-07 15:01
C#Coudou15-Aug-07 15:01 
AnswerRe: Dataset and Data adapter Pin
Christian Graus15-Aug-07 15:13
protectorChristian Graus15-Aug-07 15:13 
AnswerRe: Dataset and Data adapter Pin
Nouman Bhatti15-Aug-07 20:13
Nouman Bhatti15-Aug-07 20:13 
GeneralClickety Pin
Martin#15-Aug-07 20:21
Martin#15-Aug-07 20:21 
QuestionQuestion: Key hooking Pin
udikantz15-Aug-07 11:57
udikantz15-Aug-07 11:57 
AnswerRe: Question: Key hooking Pin
Richard Andrew x6415-Aug-07 12:03
professionalRichard Andrew x6415-Aug-07 12:03 
AnswerRe: Question: Key hooking Pin
Luc Pattyn15-Aug-07 12:12
sitebuilderLuc Pattyn15-Aug-07 12:12 
AnswerRe: Question: Key hooking Pin
Michael Sync15-Aug-07 14:14
Michael Sync15-Aug-07 14:14 
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 

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.