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

@@ -353,9 +353,9 @@ namespace VEPROMS.CSLA.Library
if(list.Contains(this))
return (IsNew && !IsDirty) ? true : base.IsValid;
list.Add(this);
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_DocumentEntries == null ? true : _DocumentEntries.IsValid);
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_DocumentEntries == null ? true : _DocumentEntries.IsValidList(list));
}
// TODO: Replace base Document.ToString function as necessary
// CSLATODO: Replace base Document.ToString function as necessary
/// <summary>
/// Overrides Base ToString
/// </summary>
@@ -364,7 +364,7 @@ namespace VEPROMS.CSLA.Library
//{
// return base.ToString();
//}
// TODO: Check Document.GetIdValue to assure that the ID returned is unique
// CSLATODO: Check Document.GetIdValue to assure that the ID returned is unique
/// <summary>
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// </summary>
@@ -428,12 +428,12 @@ namespace VEPROMS.CSLA.Library
new Csla.Validation.CommonRules.MaxLengthRuleArgs("FileExtension", 10));
//ValidationRules.AddDependantProperty("x", "y");
_DocumentExtension.AddValidationRules(ValidationRules);
// TODO: Add other validation rules
// CSLATODO: Add other validation rules
}
protected override void AddInstanceBusinessRules()
{
_DocumentExtension.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)
@@ -450,7 +450,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(DocID, "<Role(s)>");
//AuthorizationRules.AllowRead(LibTitle, "<Role(s)>");
//AuthorizationRules.AllowRead(DocContent, "<Role(s)>");
@@ -472,23 +472,23 @@ namespace VEPROMS.CSLA.Library
}
protected override void AddInstanceAuthorizationRules()
{
//TODO: Who can read/write which fields
//CSLATODO: Who can read/write which fields
_DocumentExtension.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;
@@ -510,7 +510,7 @@ namespace VEPROMS.CSLA.Library
}
public static bool CanEditObject()
{
// TODO: CanEdit Authorization
// CSLATODO: CanEdit Authorization
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
return true;
}
@@ -700,7 +700,7 @@ namespace VEPROMS.CSLA.Library
_DocID = docID;
}
}
// 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()
{
@@ -709,7 +709,7 @@ namespace VEPROMS.CSLA.Library
_DTS = _DocumentExtension.DefaultDTS;
_UserID = _DocumentExtension.DefaultUserID;
_FileExtension = _DocumentExtension.DefaultFileExtension;
// TODO: Add any defaults that are necessary
// CSLATODO: Add any defaults that are necessary
ValidationRules.CheckRules();
}
private void ReadData(SafeDataReader dr)
@@ -827,7 +827,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
_DocID = (int)cm.Parameters["@newDocID"].Value;
@@ -871,7 +871,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
docID = (int)cm.Parameters["@newDocID"].Value;
@@ -936,7 +936,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;
@@ -992,7 +992,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;
@@ -1045,7 +1045,7 @@ namespace VEPROMS.CSLA.Library
cm.CommandText = "deleteDocument";
// Input PK Fields
cm.Parameters.AddWithValue("@DocID", docID);
// TODO: Define any additional output parameters
// CSLATODO: Define any additional output parameters
cm.ExecuteNonQuery();
}
}
@@ -1184,7 +1184,7 @@ namespace VEPROMS.CSLA.Library
// {
// partial class DocumentExtension : extensionBase
// {
// // TODO: Override automatic defaults
// // CSLATODO: Override automatic defaults
// public virtual DateTime DefaultDTS
// {
// get { return DateTime.Now; }