avoid Local Context

This commit is contained in:
2026-09-15 08:29:29 -04:00
parent 7c95b115e4
commit fe95afcf8f
82 changed files with 249 additions and 249 deletions
@@ -429,7 +429,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 = Folder.Add(cn, ref _FolderID, Folder.Get(_ParentID), myConnection, _Name, _Title, _ShortName, _MyFormat, _ManualOrder, _Config, _DTS, _UsrID);
@@ -441,7 +441,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 = Folder.Update(cn, ref _FolderID, _ParentID, myConnection.DBID, _Name, _Title, _ShortName, _FormatID, _ManualOrder, _Config, _DTS, _UsrID, ref _LastChanged);
@@ -456,7 +456,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();
Folder.Remove(cn, _FolderID);