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