public int InsertTradeName(TRNTrade objTrade) { objTrade.TradeID = 1; BeginTransaction(); try { objTrade.TradeID = Insert(objTrade); CommitTransaction(); } catch (Exception ex) { RollBackTransaction(); objTrade.TradeID = -1; } return objTrade.TradeID; }
public int DeleteTradeName(TRNTrade objTrade) { int rowsaffected = -1; BeginTransaction(); try { String[] UpdateProperties = new String[] { "Status" }; rowsaffected = Update(objTrade, UpdateProperties); CommitTransaction(); } catch (Exception e) { RollBackTransaction(); rowsaffected = -1; } return rowsaffected; }
public int DeleteTradeName(TRNTrade objTrade) { objTrade.ModifiedDate = DateTime.Now; return new TRNTradeDAO().DeleteTradeName(objTrade); }
public int InsertTradeName(TRNTrade objTrade) { objTrade.CreatedDate = DateTime.Now; return new TRNTradeDAO().InsertTradeName(objTrade); }