// ======================================================================== // 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 { /// /// SectionInfo Generated by MyGeneration using the CSLA Object Mapping template /// [Serializable()] public partial class SectionInfo : ReadOnlyBase { #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; /// /// 0 Nothing, 1 Structure, 2 Document /// 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; /// /// Count of ZSection for this Section /// 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 /// /// Overrides Base ToString /// /// A string representation of current SectionInfo //public override string ToString() //{ // return base.ToString(); //} // TODO: Check SectionInfo.GetIdValue to assure that the ID returned is unique /// /// Overrides Base GetIdValue - Used internally by CSLA to determine equality /// /// A Unique ID for the current SectionInfo 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