private void btnSearchMember_Click(object sender, EventArgs e) { SearchMemberDialogue searchMember = new SearchMemberDialogue(tbNRIC.Text); searchMember.ShowDialog(); if (searchMember.DialogResult == DialogResult.OK) { tbNRIC.Text = searchMember.NRIC; } }
private void btnNRIC_Click(object sender, EventArgs e) { SearchMemberDialogue searchMemberDialogue = new SearchMemberDialogue(txtNRIC.Text); searchMemberDialogue.ShowDialog(); if (searchMemberDialogue.DialogResult == DialogResult.OK) { txtNRIC.Text = searchMemberDialogue.NRIC.ToString(); } }
private void btnNRIC_Click(object sender, EventArgs e) { SearchMemberDialogue mems = new SearchMemberDialogue(txtNRIC.Text); mems.ShowDialog(); if (mems.DialogResult == DialogResult.OK) { this.txtNRIC.Text = mems.NRIC; } }
private void btnSearchMember_Click(object sender, EventArgs e) { LibraryEntity context = new LibraryEntity(); SearchMemberDialogue searchMember = new SearchMemberDialogue(); searchMember.ShowDialog(); if (searchMember.DialogResult == DialogResult.OK) { Member member = context.Member.Where(x => x.NRIC == searchMember.NRIC).First(); tbNRIC.Text = member.NRIC.ToString(); tbName.Text = member.MemberName.ToString(); tbEmail.Text = member.Email.ToString(); tbContact.Text = member.Phone.ToString(); tbAddress.Text = member.Address.ToString(); } }