//Skapa konto public void CreateNewAccount() { string accountType = "-1"; if (rb_salaryAccount.Checked) { accountType = "0"; } else if (rb_savingsAccount.Checked) { accountType = "1"; } else { MessageBox.Show("Please select an account type!"); } if (accountType != "-1") { string cNAString = $"new_account,{StateData.personId},{tbx_initBalance.Text},{accountType},{StateData.accounts.Count}"; SocketManager.StartClient(cNAString); } else { MessageBox.Show("Something went wrong!"); } }
private void btn_reg_Click(object sender, EventArgs e) { SocketManager.StartClient($"{tbx_person_id.Text},{tbx_name.Text},reg"); }
private void btn_removeAccount_Click(object sender, EventArgs e) { SocketManager.StartClient($"remove_account,{StateData.personId},{lb_accountListBox.SelectedIndex}"); }
private void btn_sendMoney_Click(object sender, EventArgs e) { SocketManager.StartClient($"send_money,{StateData.personId},{lb_accountListBox.SelectedIndex},{tbx_sendAmount.Text},{tbx_sendMoneyId.Text}"); }
public void user_Load(object sender, EventArgs e) { //Vid load, be om info. SocketManager.StartClient($"init_user_data,{StateData.personId}"); InitUserView(); }