avoid Local Context
This commit is contained in:
@@ -566,7 +566,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 = Assignment.Add(cn, ref _AID, _MyGroup, myRole, _MyFolder, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID);
|
||||
@@ -578,7 +578,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 = Assignment.Update(cn, ref _AID, _GID, myRole.RID, _FolderID, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID, ref _LastChanged);
|
||||
@@ -593,7 +593,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();
|
||||
Assignment.Remove(cn, _AID);
|
||||
|
||||
Reference in New Issue
Block a user