Changed TODO comment to CSLATODO
Corrected logic for IsValidList to use IsValidList rather than IsValid
This commit is contained in:
@@ -325,9 +325,9 @@ namespace VEPROMS.CSLA.Library
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_RoleAssignments == null ? true : _RoleAssignments.IsValid) && (_RolePermissions == null ? true : _RolePermissions.IsValid);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_RoleAssignments == null ? true : _RoleAssignments.IsValidList(list)) && (_RolePermissions == null ? true : _RolePermissions.IsValidList(list));
|
||||
}
|
||||
// TODO: Replace base Role.ToString function as necessary
|
||||
// CSLATODO: Replace base Role.ToString function as necessary
|
||||
/// <summary>
|
||||
/// Overrides Base ToString
|
||||
/// </summary>
|
||||
@@ -336,7 +336,7 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
// TODO: Check Role.GetIdValue to assure that the ID returned is unique
|
||||
// CSLATODO: Check Role.GetIdValue to assure that the ID returned is unique
|
||||
/// <summary>
|
||||
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality
|
||||
/// </summary>
|
||||
@@ -397,12 +397,12 @@ namespace VEPROMS.CSLA.Library
|
||||
new Csla.Validation.CommonRules.MaxLengthRuleArgs("UsrID", 100));
|
||||
//ValidationRules.AddDependantProperty("x", "y");
|
||||
_RoleExtension.AddValidationRules(ValidationRules);
|
||||
// TODO: Add other validation rules
|
||||
// CSLATODO: Add other validation rules
|
||||
}
|
||||
protected override void AddInstanceBusinessRules()
|
||||
{
|
||||
_RoleExtension.AddInstanceValidationRules(ValidationRules);
|
||||
// TODO: Add other validation rules
|
||||
// CSLATODO: Add other validation rules
|
||||
}
|
||||
// Sample data comparison validation rule
|
||||
//private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e)
|
||||
@@ -419,7 +419,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(RID, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(Name, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(Title, "<Role(s)>");
|
||||
@@ -433,23 +433,23 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
protected override void AddInstanceAuthorizationRules()
|
||||
{
|
||||
//TODO: Who can read/write which fields
|
||||
//CSLATODO: Who can read/write which fields
|
||||
_RoleExtension.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;
|
||||
@@ -472,7 +472,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public static bool CanEditObject()
|
||||
{
|
||||
// TODO: CanEdit Authorization
|
||||
// CSLATODO: CanEdit Authorization
|
||||
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
|
||||
return true;
|
||||
}
|
||||
@@ -702,7 +702,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_Name = name;
|
||||
}
|
||||
}
|
||||
// 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()
|
||||
{
|
||||
@@ -710,7 +710,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// Database Defaults
|
||||
_DTS = _RoleExtension.DefaultDTS;
|
||||
_UsrID = _RoleExtension.DefaultUsrID;
|
||||
// TODO: Add any defaults that are necessary
|
||||
// CSLATODO: Add any defaults that are necessary
|
||||
ValidationRules.CheckRules();
|
||||
}
|
||||
private void ReadData(SafeDataReader dr)
|
||||
@@ -859,7 +859,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
|
||||
_RID = (int)cm.Parameters["@newRID"].Value;
|
||||
@@ -900,7 +900,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
|
||||
rid = (int)cm.Parameters["@newRID"].Value;
|
||||
@@ -961,7 +961,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;
|
||||
@@ -1015,7 +1015,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;
|
||||
@@ -1068,7 +1068,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "deleteRole";
|
||||
// Input PK Fields
|
||||
cm.Parameters.AddWithValue("@RID", rid);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
@@ -1203,7 +1203,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// {
|
||||
// partial class RoleExtension : extensionBase
|
||||
// {
|
||||
// // TODO: Override automatic defaults
|
||||
// // CSLATODO: Override automatic defaults
|
||||
// public virtual DateTime DefaultDTS
|
||||
// {
|
||||
// get { return DateTime.Now; }
|
||||
|
Reference in New Issue
Block a user