avoid Local Context
This commit is contained in:
@@ -375,7 +375,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
// if we're not dirty then don't update the database
|
||||
if (!IsDirty) return;
|
||||
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
if (cn.State == System.Data.ConnectionState.Closed) cn.Open();
|
||||
_LastChanged = Detail.Add(cn, ref _DetailID, myContent, _ItemType, _Text, _Config, _DTS, _UserID);
|
||||
@@ -387,7 +387,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
// if we're not dirty then don't update the database
|
||||
if (!IsDirty) return;
|
||||
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
if (cn.State == System.Data.ConnectionState.Closed) cn.Open();
|
||||
_LastChanged = Detail.Update(cn, ref _DetailID, myContent.ContentID, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
@@ -402,7 +402,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (!IsDirty) return;
|
||||
// if we're new then don't update the database
|
||||
if (IsNew) return;
|
||||
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
if (cn.State == System.Data.ConnectionState.Closed) cn.Open();
|
||||
Detail.Remove(cn, _DetailID);
|
||||
|
||||
Reference in New Issue
Block a user