Exemplo n.º 1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            bool temp       = false;
            var  cardNumber = txtcardNumber.Text;

            foreach (var m in connectionToBase.Member)
            {
                if (cardNumber == m.CardNumber.ToString())
                {
                    temp = true;
                    frmPersonalInformationMember frm = new frmPersonalInformationMember(m);
                    frm.ShowDialog();
                }
            }
            foreach (var p in connectionToBase.Professor)
            {
                if (cardNumber == p.CardNumber.ToString())
                {
                    temp = true;
                    frmPersonalInformationProfessor frm = new frmPersonalInformationProfessor(p);
                    frm.ShowDialog();
                }
            }
            if (!temp)
            {
                MessageBox.Show("It doesn't exist member with that card number. Please try again.");
            }
        }
 private void btnPrint_Click(object sender, EventArgs e)
 {
     if (mm)
     {
         frmPersonalInformationMember report = new frmPersonalInformationMember(member);
         report.ShowDialog();
     }
     if (pp)
     {
         frmPersonalInformationProfessor report = new frmPersonalInformationProfessor(professor);
         report.ShowDialog();
     }
 }