public async Task UpdateTradeSetupAsync(string company, TradeSetup tradeSetup)
        {
            var queryParameters = new DynamicParameters();
            queryParameters.Add("@TradeSetupId", tradeSetup.TradeSetupId);
            queryParameters.Add("@CompanyId", tradeSetup.CompanyId);
            queryParameters.Add("@BusinessSectorNominalTradingOperation", tradeSetup.BusinessSectorNominalTradingOperation);
            queryParameters.Add("@BusinessSectorNominalPostingPurpose", tradeSetup.BusinessSectorNominalPostingPurpose);
            queryParameters.Add("@WeightUnitId", null);

            await ExecuteNonQueryAsync(StoredProcedureNames.UpdateTradeSetup, queryParameters, true);
        }
Beispiel #2
0
        public async Task <int> CreateTradeSetUp(string companyId, TradeSetup tradeSetup)
        {
            var queryParameters = new DynamicParameters();

            queryParameters.Add("@CompanyId", companyId);
            queryParameters.Add("@BusinessSectorNominalTradingOperation", tradeSetup.BusinessSectorNominalTradingOperation);
            queryParameters.Add("@BusinessSectorNominalPostingPurpose", tradeSetup.BusinessSectorNominalPostingPurpose);
            queryParameters.Add("@WeightUnitId", tradeSetup.WeightUnitId);
            queryParameters.Add("@TradeSetupId", dbType: DbType.Int32, direction: ParameterDirection.Output);

            await ExecuteNonQueryAsync(StoredProcedureNames.CreateTradeSetUp, queryParameters, true);

            var tradeSetUpId = queryParameters.Get <int>("@TradeSetupId");

            return(tradeSetUpId);
        }