Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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;

        }
Esempio n. 3
0
 public int DeleteTradeName(TRNTrade objTrade)
 {
     objTrade.ModifiedDate = DateTime.Now;
     return new TRNTradeDAO().DeleteTradeName(objTrade);
 }
Esempio n. 4
0
 public int InsertTradeName(TRNTrade objTrade)
 {
     objTrade.CreatedDate = DateTime.Now;
     return new TRNTradeDAO().InsertTradeName(objTrade);
 }