Example #1
0
        private void Ok_Click(object sender, RoutedEventArgs e)
        {
            var secId = new SecurityId();

            //{
            //	SecurityCode = SecCode.Text,
            //};

            if (!BoardName.Text.IsEmpty())
            {
                secId.BoardCode = BoardName.Text;
            }

            if (!ContractId.Text.IsEmpty())
            {
                secId.Native = ContractId.Text.To <int>();
            }

            MainWindow.Instance.Trader.LookupSecurities(new SecurityLookupMessage
            {
                SecurityId    = secId,
                Name          = SecCode.Text,
                Currency      = CurrencyTypes.USD,
                SecurityType  = SecType.GetSelectedValue <SecurityTypes>() ?? default(SecurityTypes),
                TransactionId = MainWindow.Instance.Trader.TransactionIdGenerator.GetNextId(),
            });
            DialogResult = true;
        }