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);
            }
        }
 public ReturnPopUp(ReturnEquipment x)
 {
     this.x = x;
     InitializeComponent();
 }
Exemplo n.º 3
0
 public IncidentReport(ReturnEquipment x)
 {
     this.x = x;
     InitializeComponent();
 }