private void BtnReturnedEquipment_Click(object sender, EventArgs e)
        {
            try
            {
                connection.connection.DB();
                String        a       = "SELECT * FROM ApprovedReservations WHERE IDNumber = " + txtIDNumber.Text + "";
                SqlCommand    command = new SqlCommand(a, connection.connection.conn);
                SqlDataReader reader  = command.ExecuteReader();


                if (reader.HasRows)
                {
                    ReturnEquipment y = new ReturnEquipment();
                    y.idNumber = txtIDNumber.Text;
                    //ReturnPopUp y = new ReturnPopUp();
                    y.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Transaction Not Found.", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #2
0
 private void BtnBack_Click(object sender, EventArgs e)
 {
     this.Hide();
     x.Show();
 }