private void CB_author_SelectedIndexChanged(object sender, EventArgs e) { if (CB_author.CheckedItems.Count == 0) { return; } string s = CB_author.CheckedItems[0].ToString(); //SelectedItem.ToString(); //memo(s); int coauid = util.getid(s); //memo("coauid = " + coauid); CB_author.ClearSelected(); FormDoAuthor fd = new FormDoAuthor(db, coauid); fd.Show(); }
private void CB_author_SelectedIndexChanged(object sender, EventArgs e) { if (CB_author.CheckedItems.Count != 1) { return; } string s = CB_author.CheckedItems[0].ToString(); //SelectedItem.ToString(); //memo(s); int aid = util.getid(s); //memo("aid = " + aid); CB_author.SetItemCheckState(CB_author.CheckedIndices[0], CheckState.Unchecked); CB_author.ClearSelected(); FormDoAuthor fd = new FormDoAuthor(db, aid); fd.Show(); }