示例#1
0
        //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!");
            }
        }
示例#2
0
 private void btn_reg_Click(object sender, EventArgs e)
 {
     SocketManager.StartClient($"{tbx_person_id.Text},{tbx_name.Text},reg");
 }
示例#3
0
 private void btn_removeAccount_Click(object sender, EventArgs e)
 {
     SocketManager.StartClient($"remove_account,{StateData.personId},{lb_accountListBox.SelectedIndex}");
 }
示例#4
0
 private void btn_sendMoney_Click(object sender, EventArgs e)
 {
     SocketManager.StartClient($"send_money,{StateData.personId},{lb_accountListBox.SelectedIndex},{tbx_sendAmount.Text},{tbx_sendMoneyId.Text}");
 }
示例#5
0
 public void user_Load(object sender, EventArgs e)
 {
     //Vid load, be om info.
     SocketManager.StartClient($"init_user_data,{StateData.personId}");
     InitUserView();
 }