private void AccountDetailToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!assertCurrentAccount())
            {
                return;
            }
            //get current AccountModel
            //new AccountEditDlg
            AccountEditDlg accountEditDlg = new AccountEditDlg(this);

            //fill above dlg with AccountModel's properties
            accountEditDlg.Show();
        }
        private void CreateAccountToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AccountEditDlg accountEditDlg = new AccountEditDlg(this);

            accountEditDlg.Text = "创建账户";

            //fill default value for every neccessary input
            accountEditDlg.initMoneyPooltextBox.Text        = "200000";
            accountEditDlg.traderNameComboBox.SelectedIndex = 0;
            //accountEditDlg.traderNameTextBox.Text = "华泰证券";
            accountEditDlg.commissionRationTextBox.Text = "0.03";
            accountEditDlg.minCommissionTextBox.Text    = "5";
            accountEditDlg.transferFeeRatioTextBox.Text = "0.00";
            accountEditDlg.minTransferFeeTextBox.Text   = "0";
            accountEditDlg.taxRatioTextBox.Text         = "0.01";
            accountEditDlg.delegateFeeRatioTextBox.Text = "0";

            //set invisible for some options such as account name,password
            accountEditDlg.Show();//in accountEditDlg's confirm button, update account model back to db.
        }
        private void AccountConfigToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //see if current is selected and logined.
            if (!assertCurrentAccount())
            {
                return;
            }
            if (!assertCurrentAccountIsLogined())
            {
                return;
            }

            //get current account's object.
            AccountEditDlg accountEditDlg = new AccountEditDlg(this);

            accountEditDlg.Text = "账户参数设置";
            //fill the accountEditDlg with account object.
            accountEditDlg.accountNameTextBox.Text    = portFolioMgr.currentAccount.accountName;
            accountEditDlg.accountNameTextBox.Enabled = false;

            accountEditDlg.commissionRationTextBox.Text = portFolioMgr.currentAccount.commissionRatio.ToString();
            accountEditDlg.minCommissionTextBox.Text    = portFolioMgr.currentAccount.minCommission.ToString();
            accountEditDlg.transferFeeRatioTextBox.Text = portFolioMgr.currentAccount.transferFeeRatio.ToString();
            accountEditDlg.minTransferFeeTextBox.Text   = portFolioMgr.currentAccount.minTransferFee.ToString();
            accountEditDlg.taxRatioTextBox.Text         = portFolioMgr.currentAccount.taxRatio.ToString();
            accountEditDlg.delegateFeeRatioTextBox.Text = portFolioMgr.currentAccount.delegateFeeRatio.ToString();
            accountEditDlg.accountMemoRichTextBox.Text  = portFolioMgr.currentAccount.accountMemo;

            accountEditDlg.accountPasswordTextBox.Text        = portFolioMgr.currentAccount.accountPassword.ToString();
            accountEditDlg.accountPasswordConfirmTextBox.Text = portFolioMgr.currentAccount.accountPassword.ToString();
            accountEditDlg.initMoneyPooltextBox.Text          = portFolioMgr.currentAccount.money.ToString();
            accountEditDlg.traderNameComboBox.Text            = portFolioMgr.currentAccount.traderName;

            accountEditDlg.accountPasswordTextBox.Enabled        = false;
            accountEditDlg.accountPasswordConfirmTextBox.Enabled = false;
            accountEditDlg.accountMemoRichTextBox.Enabled        = false;
            accountEditDlg.initMoneyPooltextBox.Enabled          = false;

            accountEditDlg.Show();//in accountEditDlg's confirm button, update account model back to db.
        }