Fixed infinite loop problem in IsDirty and IsValid
This commit is contained in:
parent
202b79e5a8
commit
adabca0068
@ -279,11 +279,30 @@ namespace VEPROMS.CSLA.Library
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyAnnotationType == null ? false : _MyAnnotationType.IsDirty) || (_MyItem == null ? false : _MyItem.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyAnnotationType == null ? false : _MyAnnotationType.IsDirtyList(list)) || (_MyItem == null ? false : _MyItem.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyAnnotationType == null ? true : _MyAnnotationType.IsValid) && (_MyItem == null ? true : _MyItem.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyAnnotationType == null ? true : _MyAnnotationType.IsValid) && (_MyItem == null ? true : _MyItem.IsValid);
|
||||
}
|
||||
// TODO: Replace base Annotation.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -252,11 +252,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_AnnotationTypeAnnotations == null ? false : _AnnotationTypeAnnotations.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_AnnotationTypeAnnotations == null ? false : _AnnotationTypeAnnotations.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_AnnotationTypeAnnotations == null ? true : _AnnotationTypeAnnotations.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_AnnotationTypeAnnotations == null ? true : _AnnotationTypeAnnotations.IsValid);
|
||||
}
|
||||
// TODO: Replace base AnnotationType.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -256,11 +257,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyItem == null ? false : _MyItem.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyItem == null ? false : _MyItem.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyItem == null ? true : _MyItem.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyItem == null ? true : _MyItem.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (AnnotationTypeAnnotation item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (AnnotationTypeAnnotation child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (AnnotationTypeAnnotation child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -309,11 +309,30 @@ namespace VEPROMS.CSLA.Library
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirty) || (_MyGroup == null ? false : _MyGroup.IsDirty) || (_MyRole == null ? false : _MyRole.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirtyList(list)) || (_MyGroup == null ? false : _MyGroup.IsDirtyList(list)) || (_MyRole == null ? false : _MyRole.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid) && (_MyRole == null ? true : _MyRole.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid) && (_MyRole == null ? true : _MyRole.IsValid);
|
||||
}
|
||||
// TODO: Replace base Assignment.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -247,11 +247,30 @@ namespace VEPROMS.CSLA.Library
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyDocVersion == null ? false : _MyDocVersion.IsDirty) || (_MyROFst == null ? false : _MyROFst.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyDocVersion == null ? false : _MyDocVersion.IsDirtyList(list)) || (_MyROFst == null ? false : _MyROFst.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyDocVersion == null ? true : _MyDocVersion.IsValid) && (_MyROFst == null ? true : _MyROFst.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyDocVersion == null ? true : _MyDocVersion.IsValid) && (_MyROFst == null ? true : _MyROFst.IsValid);
|
||||
}
|
||||
// TODO: Replace base Association.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -93,6 +94,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (Folder item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (Folder child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (Folder child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool Contains(string name)
|
||||
{
|
||||
foreach (Folder folder in this)
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -93,6 +94,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (Format item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (Format child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (Format child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool Contains(string name)
|
||||
{
|
||||
foreach (Format format in this)
|
||||
|
@ -317,11 +317,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_ConnectionFolders == null ? false : _ConnectionFolders.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_ConnectionFolders == null ? false : _ConnectionFolders.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_ConnectionFolders == null ? true : _ConnectionFolders.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_ConnectionFolders == null ? true : _ConnectionFolders.IsValid);
|
||||
}
|
||||
// TODO: Replace base Connection.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -290,11 +291,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ConnectionFolder item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ConnectionFolder child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ConnectionFolder child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -576,11 +576,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_ContentDetails == null ? false : _ContentDetails.IsDirty) || (_MyEntry == null ? false : _MyEntry.IsDirty) || (_ContentItems == null ? false : _ContentItems.IsDirty) || (_ContentParts == null ? false : _ContentParts.IsDirty) || (_ContentRoUsages == null ? false : _ContentRoUsages.IsDirty) || (_ContentTransitions == null ? false : _ContentTransitions.IsDirty) || (_MyZContent == null ? false : _MyZContent.IsDirty) || (_MyFormat == null ? false : _MyFormat.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_ContentDetails == null ? false : _ContentDetails.IsDirtyList(list)) || (_MyEntry == null ? false : _MyEntry.IsDirtyList(list)) || (_ContentItems == null ? false : _ContentItems.IsDirtyList(list)) || (_ContentParts == null ? false : _ContentParts.IsDirtyList(list)) || (_ContentRoUsages == null ? false : _ContentRoUsages.IsDirtyList(list)) || (_ContentTransitions == null ? false : _ContentTransitions.IsDirtyList(list)) || (_MyZContent == null ? false : _MyZContent.IsDirtyList(list)) || (_MyFormat == null ? false : _MyFormat.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_ContentDetails == null ? true : _ContentDetails.IsValid) && (_MyEntry == null ? true : _MyEntry.IsValid) && (_ContentItems == null ? true : _ContentItems.IsValid) && (_ContentParts == null ? true : _ContentParts.IsValid) && (_ContentRoUsages == null ? true : _ContentRoUsages.IsValid) && (_ContentTransitions == null ? true : _ContentTransitions.IsValid) && (_MyZContent == null ? true : _MyZContent.IsValid) && (_MyFormat == null ? true : _MyFormat.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_ContentDetails == null ? true : _ContentDetails.IsValid) && (_MyEntry == null ? true : _MyEntry.IsValid) && (_ContentItems == null ? true : _ContentItems.IsValid) && (_ContentParts == null ? true : _ContentParts.IsValid) && (_ContentRoUsages == null ? true : _ContentRoUsages.IsValid) && (_ContentTransitions == null ? true : _ContentTransitions.IsValid) && (_MyZContent == null ? true : _MyZContent.IsValid) && (_MyFormat == null ? true : _MyFormat.IsValid);
|
||||
}
|
||||
// TODO: Replace base Content.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -181,6 +182,22 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ContentDetail item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ContentDetail child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ContentDetail child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -152,6 +153,22 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ContentItem item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ContentItem child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ContentItem child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -180,11 +181,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyItem == null ? false : _MyItem.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyItem == null ? false : _MyItem.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyItem == null ? true : _MyItem.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyItem == null ? true : _MyItem.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -93,6 +94,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ContentPart item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ContentPart child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ContentPart child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -264,11 +265,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyRODb == null ? false : _MyRODb.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyRODb == null ? false : _MyRODb.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyRODb == null ? true : _MyRODb.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyRODb == null ? true : _MyRODb.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ContentRoUsage item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ContentRoUsage child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ContentRoUsage child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -309,11 +310,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyItemToID == null ? false : _MyItemToID.IsDirty) || (_MyItemRangeID == null ? false : _MyItemRangeID.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyItemToID == null ? false : _MyItemToID.IsDirtyList(list)) || (_MyItemRangeID == null ? false : _MyItemRangeID.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyItemToID == null ? true : _MyItemToID.IsValid) && (_MyItemRangeID == null ? true : _MyItemRangeID.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyItemToID == null ? true : _MyItemToID.IsValid) && (_MyItemRangeID == null ? true : _MyItemRangeID.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ContentTransition item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ContentTransition child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ContentTransition child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -245,11 +245,30 @@ namespace VEPROMS.CSLA.Library
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid);
|
||||
}
|
||||
// TODO: Replace base Detail.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -387,11 +387,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_DocVersionAssociations == null ? false : _DocVersionAssociations.IsDirty) || (_MyFolder == null ? false : _MyFolder.IsDirty) || (_MyFormat == null ? false : _MyFormat.IsDirty) || (_MyItem == null ? false : _MyItem.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_DocVersionAssociations == null ? false : _DocVersionAssociations.IsDirtyList(list)) || (_MyFolder == null ? false : _MyFolder.IsDirtyList(list)) || (_MyFormat == null ? false : _MyFormat.IsDirtyList(list)) || (_MyItem == null ? false : _MyItem.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return true;} // (IsNew && !IsDirty ? true : base.IsValid) && (_DocVersionAssociations == null ? true : _DocVersionAssociations.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid) && (_MyFormat == null ? true : _MyFormat.IsValid) && (_MyItem == null ? true : _MyItem.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_DocVersionAssociations == null ? true : _DocVersionAssociations.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid) && (_MyFormat == null ? true : _MyFormat.IsValid) && (_MyItem == null ? true : _MyItem.IsValid);
|
||||
}
|
||||
// TODO: Replace base DocVersion.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -224,11 +225,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyROFst == null ? false : _MyROFst.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyROFst == null ? false : _MyROFst.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyROFst == null ? true : _MyROFst.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyROFst == null ? true : _MyROFst.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -93,6 +94,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (DocVersionAssociation item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (DocVersionAssociation child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (DocVersionAssociation child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool Contains(ROFst myROFst)
|
||||
{
|
||||
foreach (DocVersionAssociation association in this)
|
||||
|
@ -310,11 +310,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_DocumentEntries == null ? false : _DocumentEntries.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_DocumentEntries == null ? false : _DocumentEntries.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_DocumentEntries == null ? true : _DocumentEntries.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_DocumentEntries == null ? true : _DocumentEntries.IsValid);
|
||||
}
|
||||
// TODO: Replace base Document.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (DocumentEntry item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (DocumentEntry child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (DocumentEntry child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -192,6 +193,22 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
|
@ -191,11 +191,30 @@ namespace VEPROMS.CSLA.Library
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyDocument == null ? false : _MyDocument.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyDocument == null ? false : _MyDocument.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyDocument == null ? true : _MyDocument.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyDocument == null ? true : _MyDocument.IsValid);
|
||||
}
|
||||
// TODO: Replace base Entry.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -247,11 +247,30 @@ namespace VEPROMS.CSLA.Library
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyROFst == null ? false : _MyROFst.IsDirty) || (_MyROImage == null ? false : _MyROImage.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyROFst == null ? false : _MyROFst.IsDirtyList(list)) || (_MyROImage == null ? false : _MyROImage.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyROFst == null ? true : _MyROFst.IsValid) && (_MyROImage == null ? true : _MyROImage.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyROFst == null ? true : _MyROFst.IsValid) && (_MyROImage == null ? true : _MyROImage.IsValid);
|
||||
}
|
||||
// TODO: Replace base Figure.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -507,11 +507,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_FolderAssignments == null ? false : _FolderAssignments.IsDirty) || (_FolderDocVersions == null ? false : _FolderDocVersions.IsDirty) || (_ChildFolders == null ? false : _ChildFolders.IsDirty) || (_MyConnection == null ? false : _MyConnection.IsDirty) || (_MyFormat == null ? false : _MyFormat.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_FolderAssignments == null ? false : _FolderAssignments.IsDirtyList(list)) || (_FolderDocVersions == null ? false : _FolderDocVersions.IsDirtyList(list)) || (_ChildFolders == null ? false : _ChildFolders.IsDirtyList(list)) || (_MyConnection == null ? false : _MyConnection.IsDirtyList(list)) || (_MyFormat == null ? false : _MyFormat.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_FolderAssignments == null ? true : _FolderAssignments.IsValid) && (_FolderDocVersions == null ? true : _FolderDocVersions.IsValid) && (_ChildFolders == null ? true : _ChildFolders.IsValid) && (_MyConnection == null ? true : _MyConnection.IsValid) && (_MyFormat == null ? true : _MyFormat.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_FolderAssignments == null ? true : _FolderAssignments.IsValid) && (_FolderDocVersions == null ? true : _FolderDocVersions.IsValid) && (_ChildFolders == null ? true : _ChildFolders.IsValid) && (_MyConnection == null ? true : _MyConnection.IsValid) && (_MyFormat == null ? true : _MyFormat.IsValid);
|
||||
}
|
||||
// TODO: Replace base Folder.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -335,11 +336,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyGroup == null ? false : _MyGroup.IsDirty) || (_MyRole == null ? false : _MyRole.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyGroup == null ? false : _MyGroup.IsDirtyList(list)) || (_MyRole == null ? false : _MyRole.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid) && (_MyRole == null ? true : _MyRole.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid) && (_MyRole == null ? true : _MyRole.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (FolderAssignment item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (FolderAssignment child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (FolderAssignment child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -271,6 +272,22 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (FolderDocVersion item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (FolderDocVersion child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (FolderDocVersion child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -470,11 +470,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_FormatContents == null ? false : _FormatContents.IsDirty) || (_FormatDocVersions == null ? false : _FormatDocVersions.IsDirty) || (_FormatFolders == null ? false : _FormatFolders.IsDirty) || (_ChildFormats == null ? false : _ChildFormats.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_FormatContents == null ? false : _FormatContents.IsDirtyList(list)) || (_FormatDocVersions == null ? false : _FormatDocVersions.IsDirtyList(list)) || (_FormatFolders == null ? false : _FormatFolders.IsDirtyList(list)) || (_ChildFormats == null ? false : _ChildFormats.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_FormatContents == null ? true : _FormatContents.IsValid) && (_FormatDocVersions == null ? true : _FormatDocVersions.IsValid) && (_FormatFolders == null ? true : _FormatFolders.IsValid) && (_ChildFormats == null ? true : _ChildFormats.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_FormatContents == null ? true : _FormatContents.IsValid) && (_FormatDocVersions == null ? true : _FormatDocVersions.IsValid) && (_FormatFolders == null ? true : _FormatFolders.IsValid) && (_ChildFormats == null ? true : _ChildFormats.IsValid);
|
||||
}
|
||||
// TODO: Replace base Format.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -205,6 +206,22 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (FormatContent item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (FormatContent child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (FormatContent child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -372,11 +373,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (FormatDocVersion item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (FormatDocVersion child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (FormatDocVersion child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -362,11 +363,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirty) || (_MyConnection == null ? false : _MyConnection.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirtyList(list)) || (_MyConnection == null ? false : _MyConnection.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid) && (_MyConnection == null ? true : _MyConnection.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid) && (_MyConnection == null ? true : _MyConnection.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (FormatFolder item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (FormatFolder child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (FormatFolder child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -322,11 +322,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_GroupAssignments == null ? false : _GroupAssignments.IsDirty) || (_GroupMemberships == null ? false : _GroupMemberships.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_GroupAssignments == null ? false : _GroupAssignments.IsDirtyList(list)) || (_GroupMemberships == null ? false : _GroupMemberships.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_GroupAssignments == null ? true : _GroupAssignments.IsValid) && (_GroupMemberships == null ? true : _GroupMemberships.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_GroupAssignments == null ? true : _GroupAssignments.IsValid) && (_GroupMemberships == null ? true : _GroupMemberships.IsValid);
|
||||
}
|
||||
// TODO: Replace base Group.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -385,11 +386,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyRole == null ? false : _MyRole.IsDirty) || (_MyFolder == null ? false : _MyFolder.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyRole == null ? false : _MyRole.IsDirtyList(list)) || (_MyFolder == null ? false : _MyFolder.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyRole == null ? true : _MyRole.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyRole == null ? true : _MyRole.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (GroupAssignment item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (GroupAssignment child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (GroupAssignment child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -364,11 +365,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyUser == null ? false : _MyUser.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyUser == null ? false : _MyUser.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyUser == null ? true : _MyUser.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyUser == null ? true : _MyUser.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (GroupMembership item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (GroupMembership child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (GroupMembership child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -510,11 +510,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_ItemAnnotations == null ? false : _ItemAnnotations.IsDirty) || (_ItemDocVersions == null ? false : _ItemDocVersions.IsDirty) || (_NextItems == null ? false : _NextItems.IsDirty) || (_ItemParts == null ? false : _ItemParts.IsDirty) || (_ItemTransitions_RangeID == null ? false : _ItemTransitions_RangeID.IsDirty) || (_ItemTransitions_ToID == null ? false : _ItemTransitions_ToID.IsDirty) || (_MyContent == null ? false : _MyContent.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_ItemAnnotations == null ? false : _ItemAnnotations.IsDirtyList(list)) || (_ItemDocVersions == null ? false : _ItemDocVersions.IsDirtyList(list)) || (_NextItems == null ? false : _NextItems.IsDirtyList(list)) || (_ItemParts == null ? false : _ItemParts.IsDirtyList(list)) || (_ItemTransitions_RangeID == null ? false : _ItemTransitions_RangeID.IsDirtyList(list)) || (_ItemTransitions_ToID == null ? false : _ItemTransitions_ToID.IsDirtyList(list)) || (_MyContent == null ? false : _MyContent.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_ItemAnnotations == null ? true : _ItemAnnotations.IsValid) && (_ItemDocVersions == null ? true : _ItemDocVersions.IsValid) && (_NextItems == null ? true : _NextItems.IsValid) && (_ItemParts == null ? true : _ItemParts.IsValid) && (_ItemTransitions_RangeID == null ? true : _ItemTransitions_RangeID.IsValid) && (_ItemTransitions_ToID == null ? true : _ItemTransitions_ToID.IsValid) && (_MyContent == null ? true : _MyContent.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_ItemAnnotations == null ? true : _ItemAnnotations.IsValid) && (_ItemDocVersions == null ? true : _ItemDocVersions.IsValid) && (_NextItems == null ? true : _NextItems.IsValid) && (_ItemParts == null ? true : _ItemParts.IsValid) && (_ItemTransitions_RangeID == null ? true : _ItemTransitions_RangeID.IsValid) && (_ItemTransitions_ToID == null ? true : _ItemTransitions_ToID.IsValid) && (_MyContent == null ? true : _MyContent.IsValid);
|
||||
}
|
||||
// TODO: Replace base Item.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -256,11 +257,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyAnnotationType == null ? false : _MyAnnotationType.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyAnnotationType == null ? false : _MyAnnotationType.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyAnnotationType == null ? true : _MyAnnotationType.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyAnnotationType == null ? true : _MyAnnotationType.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ItemAnnotation item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ItemAnnotation child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ItemAnnotation child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -372,11 +373,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyFolder == null ? false : _MyFolder.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ItemDocVersion item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ItemDocVersion child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ItemDocVersion child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -203,6 +204,22 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ItemPart item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ItemPart child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ItemPart child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -302,11 +303,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -299,11 +300,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ItemTransition_RangeID item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ItemTransition_RangeID child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ItemTransition_RangeID child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ItemTransition_ToID item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ItemTransition_ToID child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ItemTransition_ToID child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -297,11 +297,30 @@ namespace VEPROMS.CSLA.Library
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyGroup == null ? false : _MyGroup.IsDirty) || (_MyUser == null ? false : _MyUser.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyGroup == null ? false : _MyGroup.IsDirtyList(list)) || (_MyUser == null ? false : _MyUser.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid) && (_MyUser == null ? true : _MyUser.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid) && (_MyUser == null ? true : _MyUser.IsValid);
|
||||
}
|
||||
// TODO: Replace base Membership.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (Item item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (Item child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (Item child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -203,11 +203,30 @@ namespace VEPROMS.CSLA.Library
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirty) || (_MyItem == null ? false : _MyItem.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirtyList(list)) || (_MyItem == null ? false : _MyItem.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid) && (_MyItem == null ? true : _MyItem.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid) && (_MyItem == null ? true : _MyItem.IsValid);
|
||||
}
|
||||
// TODO: Replace base Part.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -356,11 +356,30 @@ namespace VEPROMS.CSLA.Library
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyRole == null ? false : _MyRole.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyRole == null ? false : _MyRole.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyRole == null ? true : _MyRole.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyRole == null ? true : _MyRole.IsValid);
|
||||
}
|
||||
// TODO: Replace base Permission.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -403,11 +403,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_RODbROFsts == null ? false : _RODbROFsts.IsDirty) || (_RODbROImages == null ? false : _RODbROImages.IsDirty) || (_RODbRoUsages == null ? false : _RODbRoUsages.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_RODbROFsts == null ? false : _RODbROFsts.IsDirtyList(list)) || (_RODbROImages == null ? false : _RODbROImages.IsDirtyList(list)) || (_RODbRoUsages == null ? false : _RODbRoUsages.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_RODbROFsts == null ? true : _RODbROFsts.IsValid) && (_RODbROImages == null ? true : _RODbROImages.IsValid) && (_RODbRoUsages == null ? true : _RODbRoUsages.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_RODbROFsts == null ? true : _RODbROFsts.IsValid) && (_RODbROImages == null ? true : _RODbROImages.IsValid) && (_RODbRoUsages == null ? true : _RODbRoUsages.IsValid);
|
||||
}
|
||||
// TODO: Replace base RODb.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -160,6 +161,22 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (RODbROFst item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (RODbROFst child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (RODbROFst child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool Contains(DateTime dts)
|
||||
{
|
||||
foreach (RODbROFst rOFst in this)
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -181,6 +182,22 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (RODbROImage item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (RODbROImage child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (RODbROImage child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool Contains(string fileName, DateTime dts)
|
||||
{
|
||||
foreach (RODbROImage rOImage in this)
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -268,11 +269,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (RODbRoUsage item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (RODbRoUsage child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (RODbRoUsage child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -334,11 +334,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; } // || (_ROFstAssociations == null ? false : _ROFstAssociations.IsDirty) || (_ROFstFigures == null ? false : _ROFstFigures.IsDirty) || (_MyRODb == null ? false : _MyRODb.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_ROFstAssociations == null ? false : _ROFstAssociations.IsDirtyList(list)) || (_ROFstFigures == null ? false : _ROFstFigures.IsDirtyList(list)) || (_MyRODb == null ? false : _MyRODb.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_ROFstAssociations == null ? true : _ROFstAssociations.IsValid) && (_ROFstFigures == null ? true : _ROFstFigures.IsValid) && (_MyRODb == null ? true : _MyRODb.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_ROFstAssociations == null ? true : _ROFstAssociations.IsValid) && (_ROFstFigures == null ? true : _ROFstFigures.IsValid) && (_MyRODb == null ? true : _MyRODb.IsValid);
|
||||
}
|
||||
// TODO: Replace base ROFst.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -267,11 +268,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyDocVersion == null ? false : _MyDocVersion.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyDocVersion == null ? false : _MyDocVersion.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return true;} // (IsNew && !IsDirty ? true : base.IsValid) && (_MyDocVersion == null ? true : _MyDocVersion.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyDocVersion == null ? true : _MyDocVersion.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -93,6 +94,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ROFstAssociation item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ROFstAssociation child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ROFstAssociation child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool Contains(DocVersion myDocVersion)
|
||||
{
|
||||
foreach (ROFstAssociation association in this)
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -234,11 +235,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyROImage == null ? false : _MyROImage.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyROImage == null ? false : _MyROImage.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyROImage == null ? true : _MyROImage.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyROImage == null ? true : _MyROImage.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -93,6 +94,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ROFstFigure item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ROFstFigure child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ROFstFigure child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool Contains(ROImage myROImage)
|
||||
{
|
||||
foreach (ROFstFigure figure in this)
|
||||
|
@ -305,11 +305,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_ROImageFigures == null ? false : _ROImageFigures.IsDirty) || (_MyRODb == null ? false : _MyRODb.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_ROImageFigures == null ? false : _ROImageFigures.IsDirtyList(list)) || (_MyRODb == null ? false : _MyRODb.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_ROImageFigures == null ? true : _ROImageFigures.IsValid) && (_MyRODb == null ? true : _MyRODb.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_ROImageFigures == null ? true : _ROImageFigures.IsValid) && (_MyRODb == null ? true : _MyRODb.IsValid);
|
||||
}
|
||||
// TODO: Replace base ROImage.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -224,11 +225,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyROFst == null ? false : _MyROFst.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyROFst == null ? false : _MyROFst.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyROFst == null ? true : _MyROFst.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyROFst == null ? true : _MyROFst.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -93,6 +94,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (ROImageFigure item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (ROImageFigure child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (ROImageFigure child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public bool Contains(ROFst myROFst)
|
||||
{
|
||||
foreach (ROImageFigure figure in this)
|
||||
|
@ -258,11 +258,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirty) || (_MyRODb == null ? false : _MyRODb.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyContent == null ? false : _MyContent.IsDirtyList(list)) || (_MyRODb == null ? false : _MyRODb.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyContent == null ? true : _MyContent.IsValid) && (_MyRODb == null ? true : _MyRODb.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
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);
|
||||
}
|
||||
// TODO: Replace base RoUsage.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -302,11 +302,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_RoleAssignments == null ? false : _RoleAssignments.IsDirty) || (_RolePermissions == null ? false : _RolePermissions.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_RoleAssignments == null ? false : _RoleAssignments.IsDirtyList(list)) || (_RolePermissions == null ? false : _RolePermissions.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_RoleAssignments == null ? true : _RoleAssignments.IsValid) && (_RolePermissions == null ? true : _RolePermissions.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
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);
|
||||
}
|
||||
// TODO: Replace base Role.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -395,11 +396,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyGroup == null ? false : _MyGroup.IsDirty) || (_MyFolder == null ? false : _MyFolder.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyGroup == null ? false : _MyGroup.IsDirtyList(list)) || (_MyFolder == null ? false : _MyFolder.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid) && (_MyFolder == null ? true : _MyFolder.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (RoleAssignment item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (RoleAssignment child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (RoleAssignment child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -292,6 +293,22 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (RolePermission item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (RolePermission child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (RolePermission child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -321,11 +321,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyZTransition == null ? false : _MyZTransition.IsDirty) || (_MyContent == null ? false : _MyContent.IsDirty) || (_MyItemRangeID == null ? false : _MyItemRangeID.IsDirty) || (_MyItemToID == null ? false : _MyItemToID.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyZTransition == null ? false : _MyZTransition.IsDirtyList(list)) || (_MyContent == null ? false : _MyContent.IsDirtyList(list)) || (_MyItemRangeID == null ? false : _MyItemRangeID.IsDirtyList(list)) || (_MyItemToID == null ? false : _MyItemToID.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyZTransition == null ? true : _MyZTransition.IsValid) && (_MyContent == null ? true : _MyContent.IsValid) && (_MyItemRangeID == null ? true : _MyItemRangeID.IsValid) && (_MyItemToID == null ? true : _MyItemToID.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyZTransition == null ? true : _MyZTransition.IsValid) && (_MyContent == null ? true : _MyContent.IsValid) && (_MyItemRangeID == null ? true : _MyItemRangeID.IsValid) && (_MyItemToID == null ? true : _MyItemToID.IsValid);
|
||||
}
|
||||
// TODO: Replace base Transition.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -431,11 +431,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_UserMemberships == null ? false : _UserMemberships.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_UserMemberships == null ? false : _UserMemberships.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_UserMemberships == null ? true : _UserMemberships.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_UserMemberships == null ? true : _UserMemberships.IsValid);
|
||||
}
|
||||
// TODO: Replace base User.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -284,11 +285,30 @@ namespace VEPROMS.CSLA.Library
|
||||
//}
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty || (_MyGroup == null ? false : _MyGroup.IsDirty); }
|
||||
get
|
||||
{
|
||||
if ( base.IsDirty )
|
||||
return true;
|
||||
return IsDirtyList(new List<object>());
|
||||
}
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
if (base.IsDirty || list.Contains(this))
|
||||
return base.IsDirty;
|
||||
list.Add(this);
|
||||
return base.IsDirty || (_MyGroup == null ? false : _MyGroup.IsDirtyList(list));
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid); }
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid);
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
|
@ -16,6 +16,7 @@ using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -88,6 +89,37 @@ namespace VEPROMS.CSLA.Library
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
// any non-new deletions make us dirty
|
||||
foreach (UserMembership item in DeletedList)
|
||||
if (!item.IsNew)
|
||||
return true;
|
||||
// run through all the child objects
|
||||
// and if any are dirty then then
|
||||
// collection is dirty
|
||||
foreach (UserMembership child in this)
|
||||
if (child.IsDirtyList(list))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return IsValidList(new List<object>()); }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
// run through all the child objects
|
||||
// and if any are invalid then the
|
||||
// collection is invalid
|
||||
foreach (UserMembership child in this)
|
||||
if (!child.IsValidList(list))
|
||||
{
|
||||
//Console.WriteLine("Valid {0} Child {1} - {2}", child.IsValid, child.GetType().Name,child.ToString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
|
@ -136,9 +136,21 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid); }
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
// TODO: Replace base ZContent.ToString function as necessary
|
||||
/// <summary>
|
||||
|
@ -136,9 +136,21 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty ? true : base.IsValid); }
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
// TODO: Replace base ZTransition.ToString function as necessary
|
||||
/// <summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user