Updated Generated Code to Use IDs rather than Objects for internal Updates
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user