?????????????У?????? ??? ?????????
IDbHelper dbHelper = new OracleHelper(ConfigHelper.GetConfigString("BusinessDbConnection"));
bool result = true;
try
{
dbHelper.BeginTransaction();
//????
TE_AREAManager manager = new TE_AREAManager(dbHelper?? userInfo);
TE_AREAEntity tE_AREAEntity = manager.GetObject(dbHelper.SqlSafe(eatxtAREA_ID));
manager.Delete(tE_AREAEntity);
//???
TE_AREA_SUBManager submanager = new TE_AREA_SUBManager(dbHelper?? userInfo);
TE_AREA_SUBEntity tE_AREA_SUBEntity = submanager.GetObject(dbHelper.SqlSafe(eatxtAREA_ID));
submanager.Delete(tE_AREA_SUBEntity);
//??????
dbHelper.CommitTransaction();
}
catch(Exception ex)
{
//??????
dbHelper.RollbackTransaction();
result=false;
}
???????????sql??????????
IDbHelper dbHelper = new OracleHelper(ConfigHelper.GetConfigString("BusinessDbConnection"));
bool result = true;
try
{
dbHelper.BeginTransaction();
string   commandText = " DELETE FROM TE_AREA WHERE ID=" + dbHelper.SqlSafe(id);
dbHelper.ExecuteNonQuery(sqlString);
commandText = " DELETE FROM TE_AREA_SUB WHERE ID=" + dbHelper.SqlSafe(id);
dbHelper.ExecuteNonQuery(commandText);
dbHelper.CommitTransaction();
}
catch(Exception ex)
{
dbHelper.RollbackTransaction();
result=false;
}