Esempio n. 1
0
        // Show list button functionality
        private void btnSearch_Click(object sender, EventArgs e)
        {
            frmSearchBook   sb = new frmSearchBook();
            frmSearchMember sm = new frmSearchMember();

            if (rbBookID.Checked)
            {
                mtxtID.Clear();
                UpdateStatusBarText("Book ID search initiated");
                using (sb)
                {
                    sb.ShowDialog();
                    if (sb.DialogResult == DialogResult.OK)
                    {
                        mtxtID.Text = sb.GetID;
                    }
                }
            }
            else if (rbMemberID.Checked)
            {
                mtxtID.Clear();
                UpdateStatusBarText("Member ID search initiated");
                using (sm)
                {
                    sm.ShowDialog();
                    if (sm.DialogResult == DialogResult.OK)
                    {
                        mtxtID.Text = sm.GetID;
                    }
                }
            }
        }
Esempio n. 2
0
        private void btnSearchMember_Click(object sender, EventArgs e)
        {
            tssStatus.Text = "Search Member";
            using (frmSearchMember f = new frmSearchMember())
            {
                f.ShowDialog();
                if (f.DialogResult == DialogResult.OK)
                {
                    txtMemberID.Text = f.GetID;
                }

                txtMemberID_Leave(sender, e);
            }
        }
Esempio n. 3
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     //context = new LibraryEntities();
     //var qry = from x in context.Members
     //          where txtMemberID.Text == x.MemberID || txtMemberName.Text == x.MemberName select x;
     //dgv.DataSource = qry.ToList();
     using (frmSearchMember f = new frmSearchMember())
     {
         context = new SA45_Team08B_LibraryEntities();
         f.ShowDialog();
         if (f.DialogResult == DialogResult.OK)
         {
             txtMemberID.Text = f.GetID;
             btnGo_Click(sender, e);
         }
     }
 }