public int DeleteRow(DbTransaction pTran, Function Function, bool CreateTransaction) { int intRow = 0; DbTransaction objTran = pTran; Exception exception = null; try { if (pTran == null && CreateTransaction == true) { objTran = FunctionData.CreateTransaction(); } intRow = FunctionData.DeleteRow(objTran, Function); if (pTran == null && objTran != null && CreateTransaction == true) { FunctionData.CommitTransaction(objTran, true); objTran = null; } } catch (Exception EX) { exception = EX; if (pTran == null && objTran != null && CreateTransaction == true) { FunctionData.RollbackTransaction(objTran, true); objTran = null; } } finally { } return(intRow); }