Changed TODO comment to CSLATODO

Corrected logic for IsValidList to use IsValidList rather than IsValid
This commit is contained in:
Rich
2010-09-27 16:10:01 +00:00
parent fe23fd84e3
commit fb3ed8d053
49 changed files with 768 additions and 768 deletions

View File

@@ -252,7 +252,7 @@ namespace VEPROMS.CSLA.Library
if (_StartDate != tmp.ToString())
{
_StartDate = tmp.ToString();
// TODO: Any Cross Property Validation
// CSLATODO: Any Cross Property Validation
}
}
catch
@@ -282,7 +282,7 @@ namespace VEPROMS.CSLA.Library
if (_EndDate != tmp.ToString())
{
_EndDate = tmp.ToString();
// TODO: Any Cross Property Validation
// CSLATODO: Any Cross Property Validation
}
}
catch
@@ -379,9 +379,9 @@ namespace VEPROMS.CSLA.Library
if(list.Contains(this))
return (IsNew && !IsDirty) ? true : base.IsValid;
list.Add(this);
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyRole == null ? true : _MyRole.IsValid);
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyRole == null ? true : _MyRole.IsValidList(list));
}
// TODO: Replace base Permission.ToString function as necessary
// CSLATODO: Replace base Permission.ToString function as necessary
/// <summary>
/// Overrides Base ToString
/// </summary>
@@ -390,7 +390,7 @@ namespace VEPROMS.CSLA.Library
//{
// return base.ToString();
//}
// TODO: Check Permission.GetIdValue to assure that the ID returned is unique
// CSLATODO: Check Permission.GetIdValue to assure that the ID returned is unique
/// <summary>
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// </summary>
@@ -448,12 +448,12 @@ namespace VEPROMS.CSLA.Library
new Csla.Validation.CommonRules.MaxLengthRuleArgs("UsrID", 100));
//ValidationRules.AddDependantProperty("x", "y");
_PermissionExtension.AddValidationRules(ValidationRules);
// TODO: Add other validation rules
// CSLATODO: Add other validation rules
}
protected override void AddInstanceBusinessRules()
{
_PermissionExtension.AddInstanceValidationRules(ValidationRules);
// TODO: Add other validation rules
// CSLATODO: Add other validation rules
}
private static bool StartDateValid(Permission target, Csla.Validation.RuleArgs e)
{
@@ -505,7 +505,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(PID, "<Role(s)>");
//AuthorizationRules.AllowRead(RID, "<Role(s)>");
//AuthorizationRules.AllowRead(PermLevel, "<Role(s)>");
@@ -531,23 +531,23 @@ namespace VEPROMS.CSLA.Library
}
protected override void AddInstanceAuthorizationRules()
{
//TODO: Who can read/write which fields
//CSLATODO: Who can read/write which fields
_PermissionExtension.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;
@@ -556,7 +556,7 @@ namespace VEPROMS.CSLA.Library
}
public static bool CanEditObject()
{
// TODO: CanEdit Authorization
// CSLATODO: CanEdit Authorization
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
return true;
}
@@ -758,7 +758,7 @@ namespace VEPROMS.CSLA.Library
_PID = pid;
}
}
// 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()
{
@@ -768,7 +768,7 @@ namespace VEPROMS.CSLA.Library
_StartDate = _PermissionExtension.DefaultStartDate;
_DTS = _PermissionExtension.DefaultDTS;
_UsrID = _PermissionExtension.DefaultUsrID;
// TODO: Add any defaults that are necessary
// CSLATODO: Add any defaults that are necessary
ValidationRules.CheckRules();
}
private void ReadData(SafeDataReader dr)
@@ -887,7 +887,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
_PID = (int)cm.Parameters["@newPID"].Value;
@@ -932,7 +932,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
pid = (int)cm.Parameters["@newPID"].Value;
@@ -1000,7 +1000,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;
@@ -1056,7 +1056,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;
@@ -1109,7 +1109,7 @@ namespace VEPROMS.CSLA.Library
cm.CommandText = "deletePermission";
// Input PK Fields
cm.Parameters.AddWithValue("@PID", pid);
// TODO: Define any additional output parameters
// CSLATODO: Define any additional output parameters
cm.ExecuteNonQuery();
}
}
@@ -1252,7 +1252,7 @@ namespace VEPROMS.CSLA.Library
// {
// partial class PermissionExtension : extensionBase
// {
// // TODO: Override automatic defaults
// // CSLATODO: Override automatic defaults
// public virtual int DefaultPermAD
// {
// get { return 0; }