DbTransaction tran = _dataContext.Transaction
时间:2011-03-21 来源:饶兴
if (_dataContext.Connection.State == System.Data.ConnectionState.Closed)
_dataContext.Connection.Open();
else
{
_dataContext.Connection.Close();
_dataContext.Connection.Open();
}
//DbTransaction tran = _dataContext.Transaction = _dataContext.Connection.BeginTransaction();
//_dataContext.Transaction = tran;
//try
//{
// _dataContext.SubmitChanges();
// //添加凭证信息
// tran.Commit();
//}
//catch
//{
// tran.Rollback();
// return false;
//}
相关阅读 更多 +