Beispiel #1
0
        public Allocate(string symbol, string side, int quantity, decimal avg_Price, NotifyDGVChange notify)
        {
            InitializeComponent();

            conn_string.Server   = ConfigurationManager.AppSettings["server"];
            conn_string.UserID   = ConfigurationManager.AppSettings["userID"];
            conn_string.Password = ConfigurationManager.AppSettings["password"];
            conn_string.Database = ConfigurationManager.AppSettings["database"];
            MySqlConnection conn = new MySqlConnection(conn_string.ToString());



            DataTable        currencyTable   = new DataTable();
            MySqlDataAdapter currencyAdapter = new MySqlDataAdapter("SELECT DISTINCT kinsman.`group list`.`portfolio`FROM kinsman.`group list` inner join kinsman.accounts ON `group list`.Portfolio = accounts.`PWATCH Equivalent` where `group name`='NON-IMA'; ", conn);

            currencyAdapter.Fill(currencyTable);
            tbcClientAcct.DataSource    = currencyTable;
            tbcClientAcct.DisplayMember = "portfolio";


            lblAllocate.Text = "Allocate accounts for " + symbol + Environment.NewLine + "Side: " + side + Environment.NewLine + "Price: " + avg_Price;
            label1.Text      = side;
            label2.Text      = avg_Price.ToString();
            if (label1.Text == "BUY")
            {
                label1.BackColor = Color.Cyan;
            }
            else
            {
                label1.BackColor = Color.Pink;
            }
            lblTotal.Text = quantity.ToString();
            DGVAllocator.Rows.Add();
            DGVAllocator["tbcQty", 0].Value = quantity;

            notifyDel = notify;

            this.Avg_Price = avg_Price;
            this.Symbol    = symbol;
            this.Side      = side;
        }
Beispiel #2
0
        public Instinet_Uploader()
        {
            InitializeComponent();

            //Initialize security table
            AccountsTable.getTable();


            //initialize delegates;
            notifyDelegate += new NotifyDGVChange(DGVChanged);

            //initialize Futures table
            Futures.LoadFutures();

            //Disable Upload Button

            btnUpload.Enabled   = false;
            btnUpload.ForeColor = Color.Gray;


            //Initialize printer event handlers
        }