// ========================================================================
// Copyright 2007 - Volian Enterprises, Inc. All rights reserved.
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
// ------------------------------------------------------------------------
// $Workfile: $ $Revision: $
// $Author: $ $Date: $
//
// $History: $
// ========================================================================
using System;
using System.Data;
using System.Data.SqlClient;
using Csla;
using Csla.Data;
using System.Configuration;
using System.IO;
using System.ComponentModel;
using System.Collections.Generic;
using Csla.Validation;
namespace VEPROMS.CSLA.Library
{
///
/// FolderAssignments Generated by MyGeneration using the CSLA Object Mapping template
///
[Serializable()]
[TypeConverter(typeof(FolderAssignmentsConverter))]
public partial class FolderAssignments : BusinessListBase, ICustomTypeDescriptor, IVEHasBrokenRules
{
#region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion
#region Business Methods
private string _ErrorMessage = string.Empty;
public string ErrorMessage
{
get { return _ErrorMessage; }
}
// One To Many
public FolderAssignment this[Assignment myAssignment]
{
get
{
foreach (FolderAssignment assignment in this)
if (assignment.AID == myAssignment.AID)
return assignment;
return null;
}
}
public new System.Collections.Generic.IList Items
{
get { return base.Items; }
}
public FolderAssignment GetItem(Assignment myAssignment)
{
foreach (FolderAssignment assignment in this)
if (assignment.AID == myAssignment.AID)
return assignment;
return null;
}
public FolderAssignment Add(Group myGroup, Role myRole) // One to Many
{
FolderAssignment assignment = FolderAssignment.New(myGroup, myRole);
this.Add(assignment);
return assignment;
}
public void Remove(Assignment myAssignment)
{
foreach (FolderAssignment assignment in this)
{
if (assignment.AID == myAssignment.AID)
{
Remove(assignment);
break;
}
}
}
public bool Contains(Assignment myAssignment)
{
foreach (FolderAssignment assignment in this)
if (assignment.AID == myAssignment.AID)
return true;
return false;
}
public bool ContainsDeleted(Assignment myAssignment)
{
foreach (FolderAssignment assignment in DeletedList)
if (assignment.AID == myAssignment.AID)
return true;
return false;
}
public bool IsDirtyList(List