Example #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;
        }
Example #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;

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