Files
SourceCode/PROMS/proms/Volian.CSLA.Library/Generated/SectionInfo.cs
2006-11-14 14:33:33 +00:00

199 lines
5.4 KiB
C#

// ========================================================================
// Copyright 2006 - 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;
namespace Volian.CSLA.Library
{
/// <summary>
/// SectionInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary>
[Serializable()]
public partial class SectionInfo : ReadOnlyBase<SectionInfo>
{
#region Business Methods
private int _SectID;
[System.ComponentModel.DataObjectField(true, true)]
public int SectID
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _SectID;
}
}
private string _Number = string.Empty;
public string Number
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _Number;
}
}
private string _Title = string.Empty;
public string Title
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _Title;
}
}
private byte _ContentType;
/// <summary>
/// 0 Nothing, 1 Structure, 2 Document
/// </summary>
public byte ContentType
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _ContentType;
}
}
private int _ContentID;
public int ContentID
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _ContentID;
}
}
private string _Format = string.Empty;
public string Format
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _Format;
}
}
private string _Config = string.Empty;
public string Config
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _Config;
}
}
private DateTime _DTS = new DateTime();
public DateTime DTS
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _DTS;
}
}
private string _UserID = string.Empty;
public string UserID
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _UserID;
}
}
private int _ZSectioncount = 0;
/// <summary>
/// Count of ZSection for this Section
/// </summary>
public int ZSectionCount
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
return _ZSectioncount;
}
}
private ZSectionInfoList _ZSections = null;
public ZSectionInfoList ZSections
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty(true);
if (_ZSections == null)
_ZSections = ZSectionInfoList.GetBySection(_SectID);
return _ZSections;
}
}
// TODO: Replace base SectionInfo.ToString function as necessary
/// <summary>
/// Overrides Base ToString
/// </summary>
/// <returns>A string representation of current SectionInfo</returns>
//public override string ToString()
//{
// return base.ToString();
//}
// TODO: Check SectionInfo.GetIdValue to assure that the ID returned is unique
/// <summary>
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// </summary>
/// <returns>A Unique ID for the current SectionInfo</returns>
protected override object GetIdValue()
{
return _SectID;
}
#endregion
#region Factory Methods
private SectionInfo()
{ /* require use of factory methods */ }
public Section Get()
{
return Section.Get(_SectID);
}
#endregion
#region Data Access Portal
internal SectionInfo(SafeDataReader dr)
{
try
{
_SectID = dr.GetInt32("SectID");
_Number = dr.GetString("Number");
_Title = dr.GetString("Title");
_ContentType = dr.GetByte("ContentType");
_ContentID = dr.GetInt32("ContentID");
_Format = dr.GetString("Format");
_Config = dr.GetString("Config");
_DTS = dr.GetDateTime("DTS");
_UserID = dr.GetString("UserID");
_ZSectioncount = dr.GetInt32("ZSectionCount");
}
catch (Exception ex)
{
Database.LogException("SectionInfo.Constructor", ex);
throw new DbCslaException("SectionInfo.Constructor", ex);
}
}
#endregion
} // Class
} // Namespace