Changed TODO comment to CSLATODO
Corrected logic for IsValidList to use IsValidList rather than IsValid
This commit is contained in:
@@ -281,9 +281,9 @@ namespace VEPROMS.CSLA.Library
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid) && (_MyRODb == null ? true : _MyRODb.IsValid);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValidList(list)) && (_MyRODb == null ? true : _MyRODb.IsValidList(list));
|
||||
}
|
||||
// TODO: Replace base RoUsage.ToString function as necessary
|
||||
// CSLATODO: Replace base RoUsage.ToString function as necessary
|
||||
/// <summary>
|
||||
/// Overrides Base ToString
|
||||
/// </summary>
|
||||
@@ -292,7 +292,7 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
// TODO: Check RoUsage.GetIdValue to assure that the ID returned is unique
|
||||
// CSLATODO: Check RoUsage.GetIdValue to assure that the ID returned is unique
|
||||
/// <summary>
|
||||
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality
|
||||
/// </summary>
|
||||
@@ -353,12 +353,12 @@ namespace VEPROMS.CSLA.Library
|
||||
ValidationRules.AddRule<RoUsage>(MyRODbRequired, "MyRODb");
|
||||
//ValidationRules.AddDependantProperty("x", "y");
|
||||
_RoUsageExtension.AddValidationRules(ValidationRules);
|
||||
// TODO: Add other validation rules
|
||||
// CSLATODO: Add other validation rules
|
||||
}
|
||||
protected override void AddInstanceBusinessRules()
|
||||
{
|
||||
_RoUsageExtension.AddInstanceValidationRules(ValidationRules);
|
||||
// TODO: Add other validation rules
|
||||
// CSLATODO: Add other validation rules
|
||||
}
|
||||
private static bool MyContentRequired(RoUsage target, Csla.Validation.RuleArgs e)
|
||||
{
|
||||
@@ -393,7 +393,7 @@ namespace VEPROMS.CSLA.Library
|
||||
#region Authorization Rules
|
||||
protected override void AddAuthorizationRules()
|
||||
{
|
||||
//TODO: Who can read/write which fields
|
||||
//CSLATODO: Who can read/write which fields
|
||||
//AuthorizationRules.AllowRead(ROUsageID, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(ContentID, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(ROID, "<Role(s)>");
|
||||
@@ -411,23 +411,23 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
protected override void AddInstanceAuthorizationRules()
|
||||
{
|
||||
//TODO: Who can read/write which fields
|
||||
//CSLATODO: Who can read/write which fields
|
||||
_RoUsageExtension.AddInstanceAuthorizationRules(AuthorizationRules);
|
||||
}
|
||||
public static bool CanAddObject()
|
||||
{
|
||||
// TODO: Can Add Authorization
|
||||
// CSLATODO: Can Add Authorization
|
||||
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
|
||||
return true;
|
||||
}
|
||||
public static bool CanGetObject()
|
||||
{
|
||||
// TODO: CanGet Authorization
|
||||
// CSLATODO: CanGet Authorization
|
||||
return true;
|
||||
}
|
||||
public static bool CanDeleteObject()
|
||||
{
|
||||
// TODO: CanDelete Authorization
|
||||
// CSLATODO: CanDelete Authorization
|
||||
//bool result = false;
|
||||
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
|
||||
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
|
||||
@@ -436,7 +436,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public static bool CanEditObject()
|
||||
{
|
||||
// TODO: CanEdit Authorization
|
||||
// CSLATODO: CanEdit Authorization
|
||||
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
|
||||
return true;
|
||||
}
|
||||
@@ -630,7 +630,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_ROUsageID = rOUsageID;
|
||||
}
|
||||
}
|
||||
// TODO: If Create needs to access DB - It should not be marked RunLocal
|
||||
// CSLATODO: If Create needs to access DB - It should not be marked RunLocal
|
||||
[RunLocal()]
|
||||
private new void DataPortal_Create()
|
||||
{
|
||||
@@ -639,7 +639,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_ContentID = _RoUsageExtension.DefaultContentID;
|
||||
_DTS = _RoUsageExtension.DefaultDTS;
|
||||
_UserID = _RoUsageExtension.DefaultUserID;
|
||||
// TODO: Add any defaults that are necessary
|
||||
// CSLATODO: Add any defaults that are necessary
|
||||
ValidationRules.CheckRules();
|
||||
}
|
||||
private void ReadData(SafeDataReader dr)
|
||||
@@ -751,7 +751,7 @@ namespace VEPROMS.CSLA.Library
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
_ROUsageID = (int)cm.Parameters["@newROUsageID"].Value;
|
||||
@@ -792,7 +792,7 @@ namespace VEPROMS.CSLA.Library
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
rOUsageID = (int)cm.Parameters["@newROUsageID"].Value;
|
||||
@@ -857,7 +857,7 @@ namespace VEPROMS.CSLA.Library
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
|
||||
@@ -909,7 +909,7 @@ namespace VEPROMS.CSLA.Library
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
return (byte[])cm.Parameters["@newLastChanged"].Value;
|
||||
@@ -962,7 +962,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "deleteRoUsage";
|
||||
// Input PK Fields
|
||||
cm.Parameters.AddWithValue("@ROUsageID", rOUsageID);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// {
|
||||
// partial class RoUsageExtension : extensionBase
|
||||
// {
|
||||
// // TODO: Override automatic defaults
|
||||
// // CSLATODO: Override automatic defaults
|
||||
// public virtual int DefaultContentID
|
||||
// {
|
||||
// get { return 0; }
|
||||
|
Reference in New Issue
Block a user