Пример #1
0
        /// <summary>
        /// Opens Trading Ticket Form
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void tradingTicketToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //checking if any form is already open or not!
            foreach (Form form in Application.OpenForms)
            {
                if (form.GetType() == typeof(TradingTicket))
                {
                    form.Activate();
                    return;
                }
            }

            TradingTicket trading = new TradingTicket();

            trading.Show();
        }
Пример #2
0
        /// <summary>
        /// Handles the Click event of the menu strip edit control..
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void toolStripEdit_Click(object sender, EventArgs e)
        {
            try
            {
                if (OrderUltraGrid.Selected.Rows.Count != 0)
                {
                    BlotterPassTT       = this.OrderUltraGrid.Selected.Rows[0].Cells["CLOrderId"].Value.ToString();
                    BlotterPassTTQty    = Convert.ToInt32(this.OrderUltraGrid.Selected.Rows[0].Cells["Quantity"].Value.ToString());
                    BlotterPassTTRemQty = Convert.ToInt32(this.OrderUltraGrid.Selected.Rows[0].Cells["RemainingQuantity"].Value.ToString());

                    TradingTicket trading = new TradingTicket(this, "toolStripEdit");
                    trading.ShowDialog();
                    OrdersGrid();
                }
            }
            catch (Exception)
            {
            }
        }