Ejemplo n.º 1
0
        public void CMDAddInstrument(CCmdDataAddInstrument addInstrument)
        {
            object out_result        = new object();
            object out_error_message = new object();


            CMySQLProcedureBuilder builder = new CMySQLProcedureBuilder("transact_add_instrument",
                                                                        GetDBSrource(addInstrument.ServerId).MySQLConnector);


            var res = builder.Add("in_intrument", addInstrument.Instrument)
                      .Add("in_stock_exch_id", addInstrument.StockExchId)
                      .Add("out_result", out_result, ParameterDirection.Output)
                      .Add("out_error_message", out_error_message, ParameterDirection.Output)
                      .Build();
        }
Ejemplo n.º 2
0
        private void ButtonSet_Click(object sender, RoutedEventArgs e)
        {
            if (ComboboxServerDB.SelectedIndex == -1 ||
                ComboboxStockExch.SelectedIndex == -1)
            {
                //TODO error message etc
                Close();
                return;
            }



            CCmdDataAddInstrument data = new CCmdDataAddInstrument
            {
                ServerId    = ((VMDBCon)ComboboxServerDB.Items[ComboboxServerDB.SelectedIndex]).ServerId,
                StockExchId = ((VMStockExch)ComboboxStockExch.Items[ComboboxStockExch.SelectedIndex]).StockExchId,
                Instrument  = TextBoxInstrument.Text
            };



            CCommands.CmdAddInstrument.Execute(data, this);
            Close();
        }