Updated Generated Code to Use IDs rather than Objects for internal Updates

This commit is contained in:
Rich
2010-12-13 15:47:02 +00:00
parent c8d47d9c64
commit db051f8ff8
50 changed files with 112 additions and 112 deletions

View File

@@ -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);