using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TestCOM
{
    public partial class TransactionForm : Form
    {
        public string CatalogPath;
        public string I_NONE;
        public string I_ACCOUNT;
        public string I_BUYSELL;
        public string I_MKTLIMIT;
        public string I_SPLITFLAG;
        public string I_IMMCANCEL;
        public string I_PRICEYIELDENTERTYPE;
        public string I_SECBOARD;
        public string I_SECCODE;
        public string I_PRICE;
        public string I_QUANTITY;
        public string I_BROKERREF;

        public string[] ValueArray;

        public TransactionForm()
        {
            InitializeComponent();
            ValueArray = new string[11];
        }

        private void btnOpenCatalog_Click(object sender, EventArgs e)
        {
           if( this.fdOpenCatalog.ShowDialog()==DialogResult.OK)
            {
                CatalogPath = this.fdOpenCatalog.FileName;
            }
        }

        private void btnTransact_Click(object sender, EventArgs e)
        {

            //I_NONE = this.textBox1.Text;
            //I_ACCOUNT = this.textBox2.Text;
            //I_BUYSELL = this.textBox3.Text;
            //I_MKTLIMIT = this.textBox4.Text;
            //I_SPLITFLAG = this.textBox5.Text;
            //I_IMMCANCEL = this.textBox6.Text;
            //I_PRICEYIELDENTERTYPE = this.textBox7.Text;
            //I_SECBOARD = this.textBox8.Text;
            //I_SECCODE = this.textBox9.Text;
            //I_PRICE = this.textBox10.Text;
            //I_QUANTITY = this.textBox11.Text;
            //I_BROKERREF = this.textBox12.Text;


            ValueArray[0] = this.textBox2.Text;
            ValueArray[1] = this.comboBox1.SelectedItem.ToString();
                   //this.textBox3.Text;
            ValueArray[2] = this.comboBox2.SelectedItem.ToString();
                //this.textBox4.Text;
            ValueArray[3] = this.textBox5.Text;
            ValueArray[4] = this.textBox6.Text;
            ValueArray[5] = this.textBox7.Text;
            ValueArray[6] = this.textBox8.Text;
            ValueArray[7] = this.textBox9.Text;
            ValueArray[8] = this.textBox10.Text;
            ValueArray[9] = this.textBox11.Text;
            ValueArray[10] = this.textBox1.Text;

            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }


      
    }
}