private void btnSearch_Click(object sender, EventArgs e) { try { accountId = Convert.ToInt32(textBox1.Text); currentAccount = accountHelper.GetAccount(accountId); if (currentAccount != null) { label5.Text = Convert.ToString(currentAccount.FirstName) + " " + Convert.ToString(currentAccount.LastName); label6.Text = Convert.ToString(currentAccount.Email); label22.Text = Convert.ToString(currentAccount.AccountId) + ", " + currentAccount.RFID; label7.Text = Convert.ToString(currentAccount.Phone); if (currentAccount.RFID == "") { label9.Text = "Returned"; } else { label9.Text = "Not Returned"; } //must add the total spending of the client at the festival label12.Text = Convert.ToString(currentAccount.Balance); } } catch { MessageBox.Show("Please enter an id in the textbox."); } }
private void button1_Click(object sender, EventArgs e) { accountId = Convert.ToInt32(textBox1.Text); currentAccount = accountHelper.GetAccount(accountId); if (currentAccount != null) { label5.Text = currentAccount.FirstName + " " + currentAccount.LastName; label6.Text = currentAccount.Email; label7.Text = currentAccount.Phone; label14.Text = Convert.ToString(accountId); label16.Text = currentAccount.RFID; if (currentAccount.PaymentStatus) { label10.Text = "Paid"; } else { label10.Text = "Not Paid"; } label8.Text = "€ " + Convert.ToString(currentAccount.Balance); } }