public void CMDSetMaxLossVM(CCmdDataMaxLossVM datMaxLossVM) { GetDBSrource(datMaxLossVM.ServerId).MySQLConnector.ExecuteProcedure("update_trader_limits", new Dictionary <string, object>() { { "inpStockExchId", datMaxLossVM.TradersLims.StockExchId }, { "inpBotId", datMaxLossVM.TradersLims.number }, { "inpNewLim", datMaxLossVM.NewLim } } ); }
private void ButtonSet_Click(object sender, RoutedEventArgs e) { try { //TODO validation etc decimal newLim = Convert.ToDecimal(TextBoxNewVMLim.Text.Replace('.', ',')); CCmdDataMaxLossVM cmd = new CCmdDataMaxLossVM() { TradersLims = (VMTradersLimits)this.DataContext, NewLim = newLim, ServerId = ((VMTradersLimits)this.DataContext).ServerId }; CCommands.CmdSetMaxLossVM.Execute(cmd, this); Close(); } #pragma warning disable CS0168 // Переменная "exc" объявлена, но ни разу не использована. catch (Exception exc) #pragma warning restore CS0168 // Переменная "exc" объявлена, но ни разу не использована. { //TODO error } }