Exemplo n.º 1
0
        private void CreateAccount(AccountDataPanel accountData)
        {
            //
            //  Create the account
            //

            ClientAdapterResponse response = controller.SendRpc(
                new CreateAccount(
                    accountData.AccountName,
                    accountData.MarketAccountName,
                    accountData.AccountId,
                    "0",
                    "0",
                    "0",
                    "0",
                    accountData.IsActive));


            if (response.Type == ClientAdapterResponse.Types.ResponseType.ACKNOWLEDGEMENT)
            {
                MessageBox.Show("Account: " + accountData.AccountName + " created successfully.");
            }
        }
Exemplo n.º 2
0
        private void InitializeComponents()
        {
            accountData          = new AccountDataPanel(false);
            accountData.Location = new System.Drawing.Point(10, 40);

            //
            //  Update / reset button panel
            //

            Panel buttonPanel = new Panel();

            buttonPanel.BackColor = System.Drawing.SystemColors.Control;
            buttonPanel.Size      = new System.Drawing.Size(200, 40);
            buttonPanel.Padding   = new System.Windows.Forms.Padding(4, 4, 20, 4);
            buttonPanel.Dock      = DockStyle.Bottom;

            Button updateButton = new Button();

            updateButton.Text     = "Update";
            updateButton.AutoSize = true;
            updateButton.Location = new System.Drawing.Point(28, 10);
            updateButton.Anchor   = (AnchorStyles.Bottom | AnchorStyles.Right);
            updateButton.Click   += new EventHandler(FireUpdateButton);

            Button resetButton = new Button();

            resetButton.Text     = "Reset";
            resetButton.AutoSize = true;
            resetButton.Location = new System.Drawing.Point(110, 10);
            resetButton.Anchor   = (AnchorStyles.Bottom | AnchorStyles.Right);
            resetButton.Click   += new EventHandler(FireResetButton);

            buttonPanel.Controls.AddRange(new Control [] { updateButton, resetButton });

            this.Controls.AddRange(new Control [] { buttonPanel, accountData });
        }