private void FindAuthorButton_Click(object sender, EventArgs e) { FormFindAuthor fa = new FormFindAuthor(db); DialogResult faresult = fa.ShowDialog(); var auid = fa.authorid; memo("authorid = " + auid.ToString()); if ((faresult == DialogResult.OK) && (auid >= 0)) { FormDoAuthor fd = new FormDoAuthor(db, auid); fd.Show(); } }
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(); }