static void Main(string[] args) { int input = 1; TradingDAO tr = new TradingDAO(); Trading a = new Trading(); a.idOwner = 1; a.idBook = 46; Console.WriteLine(tr.rejectTrading(3)); Console.ReadKey(); }
public bool doActionTrading(string method, int idTrading) { TradingDAO tradingdao = new TradingDAO(); switch (method) { case "Delete": //Delete return(tradingdao.deleteTradingBook(idTrading)); case "Accept": //Accept return(tradingdao.acceptTrading(idTrading)); case "Reject": //Reject return(tradingdao.rejectTrading(idTrading)); case "Complete": //Complete return(tradingdao.completeTrading(idTrading)); } return(false); }