Beispiel #1
0
        private void btnViewIssuedGrid_Click(object sender, EventArgs e)
        {
            adminInstance.errObj.txtBtnClicks.Text += "\n" + MethodBase.GetCurrentMethod().Name;

            ViewIssued_11 objBL = new ViewIssued_11();

            objBL.state = "View Issued";
            objBL.Show();
        }
Beispiel #2
0
        private void btnBookLost_Click(object sender, EventArgs e)
        {
            adminInstance.errObj.txtBtnClicks.Text += "\n" + MethodBase.GetCurrentMethod().Name;

            try
            {
                string memID;

                if (c.cnn.State != ConnectionState.Open)
                {
                    c.cnn.Close(); c.cnn.Open();
                }

                try
                {
                    memID             = Interaction.InputBox("Enter the Member ID:", "Book Lost", "", -1, -1);
                    c.cmd.CommandText = "select count(*) from IssueTable where memberid ='" + memID + "'";

                    if ((int)c.cmd.ExecuteScalar() <= 0)
                    {
                        MessageBox.Show("Member with Member ID:" + memID + " not found!",
                                        "Book Lost", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                        return;
                    }

                    ViewIssued_11 objBookLost = new ViewIssued_11();
                    objBookLost.txtMemID.Text = memID;
                    objBookLost.Show();
                }

                catch (Exception)
                {
                    MessageBox.Show("Incorrect Member ID!",
                                    "Book Lost", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    return;
                }
            }

            catch (Exception)
            {
                throw;
            }
        }