// ========================================================================
// 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
{
///
/// DocumentPdfs Generated by MyGeneration using the CSLA Object Mapping template
///
[Serializable()]
[TypeConverter(typeof(DocumentPdfsConverter))]
public partial class DocumentPdfs : BusinessListBase, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{
#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 DocumentPdf this[int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth]
{
get
{
foreach (DocumentPdf pdf in this)
if (pdf.DebugStatus == debugStatus && pdf.TopRow == topRow && pdf.PageLength == pageLength && pdf.LeftMargin == leftMargin && pdf.PageWidth == pageWidth)
return pdf;
return null;
}
}
public new System.Collections.Generic.IList Items
{
get { return base.Items; }
}
public DocumentPdf GetItem(int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth)
{
foreach (DocumentPdf pdf in this)
if (pdf.DebugStatus == debugStatus && pdf.TopRow == topRow && pdf.PageLength == pageLength && pdf.LeftMargin == leftMargin && pdf.PageWidth == pageWidth)
return pdf;
return null;
}
public DocumentPdf Add(int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth, double pageCount) // One to Many with unique fields
{
if (!Contains(debugStatus, topRow, pageLength, leftMargin, pageWidth))
{
DocumentPdf pdf = DocumentPdf.New(debugStatus, topRow, pageLength, leftMargin, pageWidth, pageCount);
this.Add(pdf);
return pdf;
}
else
throw new InvalidOperationException("pdf already exists");
}
public void Remove(int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth)
{
foreach (DocumentPdf pdf in this)
{
if (pdf.DebugStatus == debugStatus && pdf.TopRow == topRow && pdf.PageLength == pageLength && pdf.LeftMargin == leftMargin && pdf.PageWidth == pageWidth)
{
Remove(pdf);
break;
}
}
}
public bool Contains(int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth)
{
foreach (DocumentPdf pdf in this)
if (pdf.DebugStatus == debugStatus && pdf.TopRow == topRow && pdf.PageLength == pageLength && pdf.LeftMargin == leftMargin && pdf.PageWidth == pageWidth)
return true;
return false;
}
public bool ContainsDeleted(int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth)
{
foreach (DocumentPdf pdf in DeletedList)
if (pdf.DebugStatus == debugStatus && pdf.TopRow == topRow && pdf.PageLength == pageLength && pdf.LeftMargin == leftMargin && pdf.PageWidth == pageWidth)
return true;
return false;
}
public bool IsDirtyList(List