private void btnSearchMember_Click(object sender, EventArgs e) { frm13MemberSearch f = new frm13MemberSearch(); DialogResult r = f.ShowDialog(this); f.Location = this.Location; if (r == DialogResult.OK) { Member m = context.Members.Where(x => x.MemberID == f.SelectedID).First(); txMemberID.Text = m.MemberID; } }
private void btnSearch_Click(object sender, EventArgs e) { frm13MemberSearch f = new frm13MemberSearch(); DialogResult r = f.ShowDialog(this); f.Location = this.Location; if (r == DialogResult.OK) { txCustomerID.Text = f.SelectedID; m = context.Members.Where(x => x.MemberID == f.SelectedID).First(); position = membersList.IndexOf(m); display(m); btnUpdate.Enabled = true; btnAdd.Enabled = true; btnBorrow.Enabled = true; btnReturn.Enabled = true; btnRetrieve.Enabled = false; btnConfirm.Enabled = false; btnChangeColor(btnAdd, false); btnChangeColor(btnUpdate, false); } }