Updated Generated Code to Use IDs rather than Objects for internal Updates
This commit is contained in:
parent
c8d47d9c64
commit
db051f8ff8
@ -910,12 +910,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Annotation.Add(cn, ref _AnnotationID, _MyItem, _MyAnnotationType, _RtfText, _SearchText, _Config, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Annotation.Update(cn, ref _AnnotationID, _MyItem, _MyAnnotationType, _RtfText, _SearchText, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Annotation.Update(cn, ref _AnnotationID, _ItemID, _TypeID, _RtfText, _SearchText, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int annotationID, Item myItem, AnnotationType myAnnotationType, string rtfText, string searchText, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int annotationID, int itemID, int typeID, string rtfText, string searchText, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Annotation.Update", 0);
|
||||
try
|
||||
@ -926,8 +926,8 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateAnnotation";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@AnnotationID", annotationID);
|
||||
cm.Parameters.AddWithValue("@ItemID", myItem.ItemID);
|
||||
cm.Parameters.AddWithValue("@TypeID", myAnnotationType.TypeID);
|
||||
cm.Parameters.AddWithValue("@ItemID", itemID);
|
||||
cm.Parameters.AddWithValue("@TypeID", typeID);
|
||||
cm.Parameters.AddWithValue("@RtfText", rtfText);
|
||||
cm.Parameters.AddWithValue("@SearchText", searchText);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
|
@ -479,7 +479,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Annotation.Update(cn, ref _AnnotationID, _MyItem, myAnnotationType, _RtfText, _SearchText, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Annotation.Update(cn, ref _AnnotationID, _ItemID, myAnnotationType.TypeID, _RtfText, _SearchText, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(AnnotationType myAnnotationType)
|
||||
|
@ -975,12 +975,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Assignment.Add(cn, ref _AID, _MyGroup, _MyRole, _MyFolder, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID);
|
||||
else
|
||||
_LastChanged = Assignment.Update(cn, ref _AID, _MyGroup, _MyRole, _MyFolder, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Assignment.Update(cn, ref _AID, _GID, _RID, _FolderID, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int aid, Group myGroup, Role myRole, Folder myFolder, SmartDate startDate, SmartDate endDate, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int aid, int gid, int rid, int folderID, SmartDate startDate, SmartDate endDate, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Assignment.Update", 0);
|
||||
try
|
||||
@ -991,11 +991,11 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateAssignment";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@AID", aid);
|
||||
cm.Parameters.AddWithValue("@GID", myGroup.GID);
|
||||
cm.Parameters.AddWithValue("@RID", myRole.RID);
|
||||
cm.Parameters.AddWithValue("@FolderID", myFolder.FolderID);
|
||||
cm.Parameters.AddWithValue("@StartDate", startDate.DBValue);
|
||||
cm.Parameters.AddWithValue("@EndDate", endDate.DBValue);
|
||||
cm.Parameters.AddWithValue("@GID", gid);
|
||||
cm.Parameters.AddWithValue("@RID", rid);
|
||||
cm.Parameters.AddWithValue("@FolderID", folderID);
|
||||
cm.Parameters.AddWithValue("@StartDate", startDate);
|
||||
cm.Parameters.AddWithValue("@EndDate", endDate);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UsrID", usrID);
|
||||
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
|
||||
|
@ -943,12 +943,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Association.Add(cn, ref _AssociationID, _MyDocVersion, _MyROFst, _Config, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Association.Update(cn, ref _AssociationID, _MyDocVersion, _MyROFst, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Association.Update(cn, ref _AssociationID, _VersionID, _ROFstID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int associationID, DocVersion myDocVersion, ROFst myROFst, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int associationID, int versionID, int rOFstID, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Association.Update", 0);
|
||||
try
|
||||
@ -959,8 +959,8 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateAssociation";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@AssociationID", associationID);
|
||||
cm.Parameters.AddWithValue("@VersionID", myDocVersion.VersionID);
|
||||
cm.Parameters.AddWithValue("@ROFstID", myROFst.ROFstID);
|
||||
cm.Parameters.AddWithValue("@VersionID", versionID);
|
||||
cm.Parameters.AddWithValue("@ROFstID", rOFstID);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UserID", userID);
|
||||
|
@ -530,7 +530,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Folder.Update(cn, ref _FolderID, Folder.Get(_ParentID), myConnection, _Name, _Title, _ShortName, _MyFormat, _ManualOrder, _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Folder.Update(cn, ref _FolderID, _ParentID, myConnection.DBID, _Name, _Title, _ShortName, _FormatID, _ManualOrder, _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Connection myConnection)
|
||||
|
@ -1248,7 +1248,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Content.Add(cn, ref _ContentID, _Number, _Text, _Type, _MyFormat, _Config, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Content.Update(cn, ref _ContentID, _Number, _Text, _Type, _MyFormat, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Content.Update(cn, ref _ContentID, _Number, _Text, _Type, _FormatID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
if (_ContentItems != null) _ContentItems.Update(this);
|
||||
@ -1260,7 +1260,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (_MyZContent != null) _MyZContent.Update(this);
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int contentID, string number, string text, int? type, Format myFormat, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int contentID, string number, string text, int? type, int? formatID, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Content.Update", 0);
|
||||
try
|
||||
@ -1274,7 +1274,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.Parameters.AddWithValue("@Number", number);
|
||||
cm.Parameters.AddWithValue("@Text", text);
|
||||
cm.Parameters.AddWithValue("@Type", type);
|
||||
if (myFormat != null) cm.Parameters.AddWithValue("@FormatID", myFormat.FormatID);
|
||||
cm.Parameters.AddWithValue("@FormatID", formatID);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UserID", userID);
|
||||
|
@ -377,7 +377,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Detail.Update(cn, ref _DetailID, myContent, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Detail.Update(cn, ref _DetailID, myContent.ContentID, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Content myContent)
|
||||
|
@ -324,7 +324,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Item.Update(cn, ref _ItemID, Item.Get((int)_PreviousID), myContent, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Item.Update(cn, ref _ItemID, _PreviousID, myContent.ContentID, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Content myContent)
|
||||
|
@ -385,7 +385,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Part.Update(cn, myContent, _FromType, _MyItem, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Part.Update(cn, myContent.ContentID, _FromType, _ItemID, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Content myContent)
|
||||
|
@ -486,7 +486,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = RoUsage.Update(cn, ref _ROUsageID, myContent, _ROID, _Config, _DTS, _UserID, ref _LastChanged, _MyRODb);
|
||||
_LastChanged = RoUsage.Update(cn, ref _ROUsageID, myContent.ContentID, _ROID, _Config, _DTS, _UserID, ref _LastChanged, _RODbID);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Content myContent)
|
||||
|
@ -572,7 +572,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Transition.Update(cn, ref _TransitionID, myContent, _MyItemToID, _MyItemRangeID, _IsRange, _TranType, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Transition.Update(cn, ref _TransitionID, myContent.ContentID, _ToID, _RangeID, _IsRange, _TranType, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Content myContent)
|
||||
|
@ -855,12 +855,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Detail.Add(cn, ref _DetailID, _MyContent, _ItemType, _Text, _Config, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Detail.Update(cn, ref _DetailID, _MyContent, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Detail.Update(cn, ref _DetailID, _ContentID, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int detailID, Content myContent, int itemType, string text, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int detailID, int contentID, int itemType, string text, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Detail.Update", 0);
|
||||
try
|
||||
@ -871,7 +871,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateDetail";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@DetailID", detailID);
|
||||
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
|
||||
cm.Parameters.AddWithValue("@ContentID", contentID);
|
||||
cm.Parameters.AddWithValue("@ItemType", itemType);
|
||||
cm.Parameters.AddWithValue("@Text", text);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
|
@ -1049,13 +1049,13 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = DocVersion.Add(cn, ref _VersionID, _MyFolder, _VersionType, _Name, _Title, _MyItem, _MyFormat, _Config, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = DocVersion.Update(cn, ref _VersionID, _MyFolder, _VersionType, _Name, _Title, _MyItem, _MyFormat, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = DocVersion.Update(cn, ref _VersionID, _FolderID, _VersionType, _Name, _Title, _ItemID, _FormatID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
if (_DocVersionAssociations != null) _DocVersionAssociations.Update(this);
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int versionID, Folder myFolder, int versionType, string name, string title, Item myItem, Format myFormat, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int versionID, int folderID, int versionType, string name, string title, int? itemID, int? formatID, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] DocVersion.Update", 0);
|
||||
try
|
||||
@ -1066,12 +1066,12 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateDocVersion";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@VersionID", versionID);
|
||||
cm.Parameters.AddWithValue("@FolderID", myFolder.FolderID);
|
||||
cm.Parameters.AddWithValue("@FolderID", folderID);
|
||||
cm.Parameters.AddWithValue("@VersionType", versionType);
|
||||
cm.Parameters.AddWithValue("@Name", name);
|
||||
cm.Parameters.AddWithValue("@Title", title);
|
||||
if (myItem != null) cm.Parameters.AddWithValue("@ItemID", myItem.ItemID);
|
||||
if (myFormat != null) cm.Parameters.AddWithValue("@FormatID", myFormat.FormatID);
|
||||
cm.Parameters.AddWithValue("@ItemID", itemID);
|
||||
cm.Parameters.AddWithValue("@FormatID", formatID);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UserID", userID);
|
||||
|
@ -436,7 +436,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Association.Update(cn, ref _AssociationID, myDocVersion, _MyROFst, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Association.Update(cn, ref _AssociationID, myDocVersion.VersionID, _ROFstID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(DocVersion myDocVersion)
|
||||
|
@ -379,7 +379,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Entry.Update(cn, _MyEntry.MyContent, myDocument, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Entry.Update(cn, _ContentID, myDocument.DocID, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Document myDocument)
|
||||
|
@ -765,12 +765,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Entry.Add(cn, content, MyDocument, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Entry.Update(cn, content, MyDocument, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Entry.Update(cn, content.ContentID, _DocID, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, Content myContent, Document myDocument, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, int contentID, int docID, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Entry.Update", 0);
|
||||
try
|
||||
@ -780,8 +780,8 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "updateEntry";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
|
||||
cm.Parameters.AddWithValue("@DocID", myDocument.DocID);
|
||||
cm.Parameters.AddWithValue("@ContentID", contentID);
|
||||
cm.Parameters.AddWithValue("@DocID", docID);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UserID", userID);
|
||||
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
|
||||
|
@ -943,12 +943,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Figure.Add(cn, ref _FigureID, _MyROFst, _MyROImage, _Config, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Figure.Update(cn, ref _FigureID, _MyROFst, _MyROImage, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Figure.Update(cn, ref _FigureID, _ROFstID, _ImageID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int figureID, ROFst myROFst, ROImage myROImage, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int figureID, int rOFstID, int imageID, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Figure.Update", 0);
|
||||
try
|
||||
@ -959,8 +959,8 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateFigure";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@FigureID", figureID);
|
||||
cm.Parameters.AddWithValue("@ROFstID", myROFst.ROFstID);
|
||||
cm.Parameters.AddWithValue("@ImageID", myROImage.ImageID);
|
||||
cm.Parameters.AddWithValue("@ROFstID", rOFstID);
|
||||
cm.Parameters.AddWithValue("@ImageID", imageID);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UserID", userID);
|
||||
|
@ -1292,7 +1292,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Folder.Add(cn, ref _FolderID, _MyParent, _MyConnection, _Name, _Title, _ShortName, _MyFormat, _ManualOrder, _Config, _DTS, _UsrID);
|
||||
else
|
||||
_LastChanged = Folder.Update(cn, ref _FolderID, _MyParent, _MyConnection, _Name, _Title, _ShortName, _MyFormat, _ManualOrder, _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Folder.Update(cn, ref _FolderID, _ParentID, _DBID, _Name, _Title, _ShortName, _FormatID, _ManualOrder, _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
if (_FolderAssignments != null) _FolderAssignments.Update(this);
|
||||
@ -1310,7 +1310,7 @@ namespace VEPROMS.CSLA.Library
|
||||
MarkNew();
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int folderID, Folder myParent, Connection myConnection, string name, string title, string shortName, Format myFormat, double? manualOrder, string config, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int folderID, int parentID, int dbid, string name, string title, string shortName, int? formatID, double? manualOrder, string config, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Folder.Update", 0);
|
||||
try
|
||||
@ -1321,12 +1321,12 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateFolder";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@FolderID", folderID);
|
||||
cm.Parameters.AddWithValue("@ParentID", myParent.FolderID);
|
||||
cm.Parameters.AddWithValue("@DBID", myConnection.DBID);
|
||||
cm.Parameters.AddWithValue("@ParentID", parentID);
|
||||
cm.Parameters.AddWithValue("@DBID", dbid);
|
||||
cm.Parameters.AddWithValue("@Name", name);
|
||||
cm.Parameters.AddWithValue("@Title", title);
|
||||
cm.Parameters.AddWithValue("@ShortName", shortName);
|
||||
if (myFormat != null) cm.Parameters.AddWithValue("@FormatID", myFormat.FormatID);
|
||||
cm.Parameters.AddWithValue("@FormatID", formatID);
|
||||
cm.Parameters.AddWithValue("@ManualOrder", manualOrder);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
|
@ -598,7 +598,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Assignment.Update(cn, ref _AID, _MyGroup, _MyRole, myFolder, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Assignment.Update(cn, ref _AID, _GID, _RID, myFolder.FolderID, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Folder myFolder)
|
||||
|
@ -482,7 +482,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = DocVersion.Update(cn, ref _VersionID, myFolder, _VersionType, _Name, _Title, _MyItem, _MyFormat, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = DocVersion.Update(cn, ref _VersionID, myFolder.FolderID, _VersionType, _Name, _Title, _ItemID, _FormatID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Folder myFolder)
|
||||
|
@ -1222,7 +1222,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Format.Add(cn, ref _FormatID, _MyParent, _Name, _Description, _Data, _GenMac, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Format.Update(cn, ref _FormatID, _MyParent, _Name, _Description, _Data, _GenMac, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Format.Update(cn, ref _FormatID, _ParentID, _Name, _Description, _Data, _GenMac, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
if (_FormatFolders != null) _FormatFolders.Update(this);
|
||||
@ -1241,7 +1241,7 @@ namespace VEPROMS.CSLA.Library
|
||||
MarkNew();
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int formatID, Format myParent, string name, string description, string data, string genMac, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int formatID, int parentID, string name, string description, string data, string genMac, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Format.Update", 0);
|
||||
try
|
||||
@ -1252,7 +1252,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateFormat";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@FormatID", formatID);
|
||||
cm.Parameters.AddWithValue("@ParentID", myParent.FormatID);
|
||||
cm.Parameters.AddWithValue("@ParentID", parentID);
|
||||
cm.Parameters.AddWithValue("@Name", name);
|
||||
cm.Parameters.AddWithValue("@Description", description);
|
||||
cm.Parameters.AddWithValue("@Data", data);
|
||||
|
@ -397,7 +397,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Content.Update(cn, ref _ContentID, _Number, _Text, _Type, myFormat, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Content.Update(cn, ref _ContentID, _Number, _Text, _Type, myFormat != null ? (int?) myFormat.FormatID : (int?) null, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Format myFormat)
|
||||
|
@ -613,7 +613,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = DocVersion.Update(cn, ref _VersionID, _MyFolder, _VersionType, _Name, _Title, _MyItem, myFormat, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = DocVersion.Update(cn, ref _VersionID, _FolderID, _VersionType, _Name, _Title, _ItemID, myFormat != null ? (int?) myFormat.FormatID : (int?) null, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Format myFormat)
|
||||
|
@ -621,7 +621,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Folder.Update(cn, ref _FolderID, Folder.Get(_ParentID), _MyConnection, _Name, _Title, _ShortName, myFormat, _ManualOrder, _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Folder.Update(cn, ref _FolderID, _ParentID, _DBID, _Name, _Title, _ShortName, myFormat != null ? (int?) myFormat.FormatID : (int?) null, _ManualOrder, _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Format myFormat)
|
||||
|
@ -653,7 +653,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Assignment.Update(cn, ref _AID, myGroup, _MyRole, _MyFolder, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Assignment.Update(cn, ref _AID, myGroup.GID, _RID, _FolderID, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Group myGroup)
|
||||
|
@ -622,7 +622,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Membership.Update(cn, ref _UGID, _MyUser, myGroup, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Membership.Update(cn, ref _UGID, _UID, myGroup.GID, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Group myGroup)
|
||||
|
@ -1166,7 +1166,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Item.Add(cn, ref _ItemID, _MyPrevious, _MyContent, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Item.Update(cn, ref _ItemID, _MyPrevious, _MyContent, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Item.Update(cn, ref _ItemID, _PreviousID, _ContentID, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
if (_ItemAnnotations != null) _ItemAnnotations.Update(this);
|
||||
@ -1187,7 +1187,7 @@ namespace VEPROMS.CSLA.Library
|
||||
MarkNew();
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int itemID, Item myPrevious, Content myContent, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int itemID, int? previousID, int contentID, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Item.Update", 0);
|
||||
try
|
||||
@ -1198,8 +1198,8 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateItem";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ItemID", itemID);
|
||||
if (myPrevious != null) cm.Parameters.AddWithValue("@PreviousID", myPrevious.ItemID);
|
||||
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
|
||||
cm.Parameters.AddWithValue("@PreviousID", previousID);
|
||||
cm.Parameters.AddWithValue("@ContentID", contentID);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UserID", userID);
|
||||
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
|
||||
|
@ -479,7 +479,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Annotation.Update(cn, ref _AnnotationID, myItem, _MyAnnotationType, _RtfText, _SearchText, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Annotation.Update(cn, ref _AnnotationID, myItem.ItemID, _TypeID, _RtfText, _SearchText, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Item myItem)
|
||||
|
@ -613,7 +613,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = DocVersion.Update(cn, ref _VersionID, _MyFolder, _VersionType, _Name, _Title, myItem, _MyFormat, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = DocVersion.Update(cn, ref _VersionID, _FolderID, _VersionType, _Name, _Title, myItem != null ? (int?) myItem.ItemID : (int?) null, _FormatID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Item myItem)
|
||||
|
@ -393,7 +393,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Part.Update(cn, _MyContent, _FromType, myItem, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Part.Update(cn, _ContentID, _FromType, myItem.ItemID, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Item myItem)
|
||||
|
@ -556,7 +556,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Transition.Update(cn, ref _TransitionID, _MyContent, _MyItemToID, myItemRangeID, _IsRange, _TranType, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Transition.Update(cn, ref _TransitionID, _FromID, _ToID, myItemRangeID.ItemID, _IsRange, _TranType, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Item myItemRangeID)
|
||||
|
@ -553,7 +553,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Transition.Update(cn, ref _TransitionID, _MyContent, myItemToID, _MyItemRangeID, _IsRange, _TranType, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Transition.Update(cn, ref _TransitionID, _FromID, myItemToID.ItemID, _RangeID, _IsRange, _TranType, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Item myItemToID)
|
||||
|
@ -952,12 +952,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Membership.Add(cn, ref _UGID, _MyUser, _MyGroup, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID);
|
||||
else
|
||||
_LastChanged = Membership.Update(cn, ref _UGID, _MyUser, _MyGroup, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Membership.Update(cn, ref _UGID, _UID, _GID, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int ugid, User myUser, Group myGroup, SmartDate startDate, SmartDate endDate, string config, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int ugid, int uid, int gid, SmartDate startDate, SmartDate endDate, string config, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Membership.Update", 0);
|
||||
try
|
||||
@ -968,10 +968,10 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateMembership";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@UGID", ugid);
|
||||
cm.Parameters.AddWithValue("@UID", myUser.UID);
|
||||
cm.Parameters.AddWithValue("@GID", myGroup.GID);
|
||||
cm.Parameters.AddWithValue("@StartDate", startDate.DBValue);
|
||||
cm.Parameters.AddWithValue("@EndDate", endDate.DBValue);
|
||||
cm.Parameters.AddWithValue("@UID", uid);
|
||||
cm.Parameters.AddWithValue("@GID", gid);
|
||||
cm.Parameters.AddWithValue("@StartDate", startDate);
|
||||
cm.Parameters.AddWithValue("@EndDate", endDate);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UsrID", usrID);
|
||||
|
@ -783,12 +783,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Part.Add(cn, _MyContent, _FromType, _MyItem, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Part.Update(cn, _MyContent, _FromType, _MyItem, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Part.Update(cn, _ContentID, _FromType, _ItemID, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, Content myContent, int fromType, Item myItem, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, int contentID, int fromType, int itemID, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Part.Update", 0);
|
||||
try
|
||||
@ -798,9 +798,9 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "updatePart";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
|
||||
cm.Parameters.AddWithValue("@ContentID", contentID);
|
||||
cm.Parameters.AddWithValue("@FromType", fromType);
|
||||
cm.Parameters.AddWithValue("@ItemID", myItem.ItemID);
|
||||
cm.Parameters.AddWithValue("@ItemID", itemID);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UserID", userID);
|
||||
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
|
||||
|
@ -1024,12 +1024,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Permission.Add(cn, ref _PID, _MyRole, _PermLevel, _VersionType, _PermValue, _PermAD, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID);
|
||||
else
|
||||
_LastChanged = Permission.Update(cn, ref _PID, _MyRole, _PermLevel, _VersionType, _PermValue, _PermAD, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Permission.Update(cn, ref _PID, _RID, _PermLevel, _VersionType, _PermValue, _PermAD, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int pid, Role myRole, int permLevel, int versionType, int permValue, int permAD, SmartDate startDate, SmartDate endDate, string config, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int pid, int rid, int permLevel, int versionType, int permValue, int permAD, SmartDate startDate, SmartDate endDate, string config, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Permission.Update", 0);
|
||||
try
|
||||
@ -1040,13 +1040,13 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updatePermission";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@PID", pid);
|
||||
cm.Parameters.AddWithValue("@RID", myRole.RID);
|
||||
cm.Parameters.AddWithValue("@RID", rid);
|
||||
cm.Parameters.AddWithValue("@PermLevel", permLevel);
|
||||
cm.Parameters.AddWithValue("@VersionType", versionType);
|
||||
cm.Parameters.AddWithValue("@PermValue", permValue);
|
||||
cm.Parameters.AddWithValue("@PermAD", permAD);
|
||||
cm.Parameters.AddWithValue("@StartDate", startDate.DBValue);
|
||||
cm.Parameters.AddWithValue("@EndDate", endDate.DBValue);
|
||||
cm.Parameters.AddWithValue("@StartDate", startDate);
|
||||
cm.Parameters.AddWithValue("@EndDate", endDate);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UsrID", usrID);
|
||||
|
@ -347,7 +347,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = ROFst.Update(cn, ref _ROFstID, myRODb, _ROLookup, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = ROFst.Update(cn, ref _ROFstID, myRODb.RODbID, _ROLookup, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(RODb myRODb)
|
||||
|
@ -377,7 +377,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = ROImage.Update(cn, ref _ImageID, myRODb, _FileName, _Content, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = ROImage.Update(cn, ref _ImageID, myRODb.RODbID, _FileName, _Content, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(RODb myRODb)
|
||||
|
@ -495,7 +495,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = RoUsage.Update(cn, ref _ROUsageID, _MyContent, _ROID, _Config, _DTS, _UserID, ref _LastChanged, myRODb);
|
||||
_LastChanged = RoUsage.Update(cn, ref _ROUsageID, _ContentID, _ROID, _Config, _DTS, _UserID, ref _LastChanged, myRODb.RODbID);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(RODb myRODb)
|
||||
|
@ -1045,14 +1045,14 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = ROFst.Add(cn, ref _ROFstID, _MyRODb, _ROLookup, _Config, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = ROFst.Update(cn, ref _ROFstID, _MyRODb, _ROLookup, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = ROFst.Update(cn, ref _ROFstID, _RODbID, _ROLookup, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
if (_ROFstAssociations != null) _ROFstAssociations.Update(this);
|
||||
if (_ROFstFigures != null) _ROFstFigures.Update(this);
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int rOFstID, RODb myRODb, byte[] rOLookup, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int rOFstID, int rODbID, byte[] rOLookup, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ROFst.Update", 0);
|
||||
try
|
||||
@ -1063,7 +1063,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateROFst";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ROFstID", rOFstID);
|
||||
cm.Parameters.AddWithValue("@RODbID", myRODb.RODbID);
|
||||
cm.Parameters.AddWithValue("@RODbID", rODbID);
|
||||
cm.Parameters.AddWithValue("@ROLookup", rOLookup);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
|
@ -483,7 +483,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Association.Update(cn, ref _AssociationID, _MyDocVersion, myROFst, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Association.Update(cn, ref _AssociationID, _VersionID, myROFst.ROFstID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(ROFst myROFst)
|
||||
|
@ -447,7 +447,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Figure.Update(cn, ref _FigureID, myROFst, _MyROImage, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Figure.Update(cn, ref _FigureID, myROFst.ROFstID, _ImageID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(ROFst myROFst)
|
||||
|
@ -1027,13 +1027,13 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = ROImage.Add(cn, ref _ImageID, _MyRODb, _FileName, _Content, _Config, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = ROImage.Update(cn, ref _ImageID, _MyRODb, _FileName, _Content, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = ROImage.Update(cn, ref _ImageID, _RODbID, _FileName, _Content, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
if (_ROImageFigures != null) _ROImageFigures.Update(this);
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int imageID, RODb myRODb, string fileName, byte[] content, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int imageID, int rODbID, string fileName, byte[] content, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ROImage.Update", 0);
|
||||
try
|
||||
@ -1044,7 +1044,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateROImage";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ImageID", imageID);
|
||||
cm.Parameters.AddWithValue("@RODbID", myRODb.RODbID);
|
||||
cm.Parameters.AddWithValue("@RODbID", rODbID);
|
||||
cm.Parameters.AddWithValue("@FileName", fileName);
|
||||
cm.Parameters.AddWithValue("@Content", content);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
|
@ -436,7 +436,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Figure.Update(cn, ref _FigureID, _MyROFst, myROImage, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Figure.Update(cn, ref _FigureID, _ROFstID, myROImage.ImageID, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(ROImage myROImage)
|
||||
|
@ -881,12 +881,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = RoUsage.Add(cn, ref _ROUsageID, _MyContent, _ROID, _Config, _DTS, _UserID, _MyRODb);
|
||||
else
|
||||
_LastChanged = RoUsage.Update(cn, ref _ROUsageID, _MyContent, _ROID, _Config, _DTS, _UserID, ref _LastChanged, _MyRODb);
|
||||
_LastChanged = RoUsage.Update(cn, ref _ROUsageID, _ContentID, _ROID, _Config, _DTS, _UserID, ref _LastChanged, _RODbID);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int rOUsageID, Content myContent, string roid, string config, DateTime dts, string userID, ref byte[] lastChanged, RODb myRODb)
|
||||
public static byte[] Update(SqlConnection cn, ref int rOUsageID, int contentID, string roid, string config, DateTime dts, string userID, ref byte[] lastChanged, int rODbID)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] RoUsage.Update", 0);
|
||||
try
|
||||
@ -897,13 +897,13 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateRoUsage";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ROUsageID", rOUsageID);
|
||||
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
|
||||
cm.Parameters.AddWithValue("@ContentID", contentID);
|
||||
cm.Parameters.AddWithValue("@ROID", roid);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UserID", userID);
|
||||
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
|
||||
cm.Parameters.AddWithValue("@RODbID", myRODb.RODbID);
|
||||
cm.Parameters.AddWithValue("@RODbID", rODbID);
|
||||
// Output Calculated Columns
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
|
@ -664,7 +664,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Assignment.Update(cn, ref _AID, _MyGroup, myRole, _MyFolder, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Assignment.Update(cn, ref _AID, _GID, myRole.RID, _FolderID, new SmartDate(_StartDate), new SmartDate(_EndDate), _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Role myRole)
|
||||
|
@ -530,7 +530,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Permission.Update(cn, ref _PID, myRole, _PermLevel, _VersionType, _PermValue, _PermAD, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Permission.Update(cn, ref _PID, myRole.RID, _PermLevel, _VersionType, _PermValue, _PermAD, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(Role myRole)
|
||||
|
@ -1011,13 +1011,13 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Transition.Add(cn, ref _TransitionID, _MyContent, _MyItemToID, _MyItemRangeID, _IsRange, _TranType, _Config, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Transition.Update(cn, ref _TransitionID, _MyContent, _MyItemToID, _MyItemRangeID, _IsRange, _TranType, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Transition.Update(cn, ref _TransitionID, _FromID, _ToID, _RangeID, _IsRange, _TranType, _Config, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
if (_MyZTransition != null) _MyZTransition.Update(this);
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int transitionID, Content myContent, Item myItemToID, Item myItemRangeID, int isRange, int tranType, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int transitionID, int fromID, int toID, int rangeID, int isRange, int tranType, string config, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Transition.Update", 0);
|
||||
try
|
||||
@ -1028,9 +1028,9 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateTransition";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@TransitionID", transitionID);
|
||||
cm.Parameters.AddWithValue("@FromID", myContent.ContentID);
|
||||
cm.Parameters.AddWithValue("@ToID", myItemToID.ItemID);
|
||||
cm.Parameters.AddWithValue("@RangeID", myItemRangeID.ItemID);
|
||||
cm.Parameters.AddWithValue("@FromID", fromID);
|
||||
cm.Parameters.AddWithValue("@ToID", toID);
|
||||
cm.Parameters.AddWithValue("@RangeID", rangeID);
|
||||
cm.Parameters.AddWithValue("@IsRange", isRange);
|
||||
cm.Parameters.AddWithValue("@TranType", tranType);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
|
@ -534,7 +534,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// if we're not dirty then don't update the database
|
||||
if (!this.IsDirty) return;
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
_LastChanged = Membership.Update(cn, ref _UGID, myUser, _MyGroup, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Membership.Update(cn, ref _UGID, myUser.UID, _GID, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
internal void DeleteSelf(User myUser)
|
||||
|
@ -646,12 +646,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = ZContent.Add(cn, content, _OldStepSequence);
|
||||
else
|
||||
_LastChanged = ZContent.Update(cn, content, _OldStepSequence, ref _LastChanged);
|
||||
_LastChanged = ZContent.Update(cn, content.ContentID, _OldStepSequence, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, Content myContent, string oldStepSequence, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, int contentID, string oldStepSequence, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ZContent.Update", 0);
|
||||
try
|
||||
@ -661,7 +661,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "updateZContent";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
|
||||
cm.Parameters.AddWithValue("@ContentID", contentID);
|
||||
cm.Parameters.AddWithValue("@OldStepSequence", oldStepSequence);
|
||||
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
|
||||
// Output Calculated Columns
|
||||
|
@ -646,12 +646,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = ZTransition.Add(cn, transition, _Oldto);
|
||||
else
|
||||
_LastChanged = ZTransition.Update(cn, transition, _Oldto, ref _LastChanged);
|
||||
_LastChanged = ZTransition.Update(cn, transition.TransitionID, _Oldto, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, Transition myTransition, string oldto, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, int transitionID, string oldto, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ZTransition.Update", 0);
|
||||
try
|
||||
@ -661,7 +661,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "updateZTransition";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@TransitionID", myTransition.TransitionID);
|
||||
cm.Parameters.AddWithValue("@TransitionID", transitionID);
|
||||
cm.Parameters.AddWithValue("@Oldto", oldto);
|
||||
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
|
||||
// Output Calculated Columns
|
||||
|
Loading…
x
Reference in New Issue
Block a user