Make Sure Connection is open when working with Local Context

This commit is contained in:
mschill committed 2026-09-15 08:06:53 -04:00
1 parent ac773b8ada
commit 5d4e5d9a1f
82 files changed
+249

No files matched your search

@@ -768,6 +768,7 @@ namespace VEPROMS.CSLA.Library
_MyItem?.Update();
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
{
cn.Open();
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
@@ -894,6 +895,7 @@ namespace VEPROMS.CSLA.Library
_MyItem?.Update();
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
{
cn.Open();
if (base.IsDirty)
{
using (SqlCommand cm = cn.CreateCommand())
@@ -945,6 +947,7 @@ namespace VEPROMS.CSLA.Library
{
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
{
cn.Open();
if (IsNew)
_LastChanged = DocVersion.Add(cn, ref _VersionID, _MyFolder, _VersionType, _Name, _Title, _MyItem, _MyFormat, _Config, _DTS, _UserID);
else