public async Task MoveFromOpenToClosedOrders(spGetOpenOrder_ById openOrder, string boughtUserId, ClosedOrderStatusEnum status, string pair) { try { await _db.ExecuteAsync( "MoveFromOpenToClosedOrders", new { pair = pair, buyOrSell = openOrder.IsBuy ? "Buy" : "Sell", createUserId = openOrder.CreateUserId, boughtUserId = boughtUserId, id = openOrder.Id, price = openOrder.Price, amount = openOrder.Amount, total = openOrder.Total, createDate = openOrder.CreateDate, status = (int)status }, commandType : CommandType.StoredProcedure); } catch (Exception ex) { } }
public async Task spMove_BTC_USDT_FromOpenOrdersToClosedOrders(spGet_BTC_USDT_OpenOrder_ById openOrder, string boughtUserId, ClosedOrderStatusEnum status) { try { if (openOrder.IsBuy) { await _db.ExecuteAsync( "Move_BTC_USDT_FromOpenOrdersBuyToClosedOrders", new { createUserId = openOrder.CreateUserId, boughtUserId = boughtUserId, id = openOrder.Id, price = openOrder.Price, amount = openOrder.Amount, total = openOrder.Total, createDate = openOrder.CreateDate, status = (int)status }, commandType : CommandType.StoredProcedure); } else { await _db.ExecuteAsync( "Move_BTC_USDT_FromOpenOrdersBuyToClosedOrders", new { createUserId = openOrder.CreateUserId, boughtUserId = boughtUserId, id = openOrder.Id, price = openOrder.Price, amount = openOrder.Amount, total = openOrder.Total, createDate = openOrder.CreateDate, status = (int)status }, commandType : CommandType.StoredProcedure); } } catch (Exception ex) { } }