private void backBtn_Click(object sender, EventArgs e) { this.Hide(); BankManjah add = new BankManjah(""); add.Show(); }
private void withdrawUSDBtn_Click(object sender, EventArgs e) { try { int amount = Convert.ToInt32(tfAmount.Text); bool status = user.getCashWithdrawalIDR(amount); if (status) { DateTime time = DateTime.Today; string success = "Successfully withdrawal IDR " + amount + "!"; history.addHistory(time.ToString(), success); this.Hide(); BankManjah add = new BankManjah(success); add.Show(); } else { labelMessage.Text = "Your balance is not enough!"; } } catch { if (tfAmount.Text == "") { labelMessage.Text = "Fill the blank!"; } labelMessage.Text = "Make sure you fill with numbers!"; } }