// ======================================================================== // 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 { /// /// DocumentInfo Generated by MyGeneration using the CSLA Object Mapping template /// [Serializable()] public partial class DocumentInfo : ReadOnlyBase { #region Business Methods private int _DocID; [System.ComponentModel.DataObjectField(true, true)] public int DocID { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _DocID; } } private string _LibTitle = string.Empty; public string LibTitle { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _LibTitle; } } private byte[] _DocContent; /// /// Actual content of a Word Document (RTF, DOC or XML Format) /// public byte[] DocContent { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _DocContent; } } private string _DocAscii = string.Empty; /// /// Used for searching /// public string DocAscii { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _DocAscii; } } 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; } } // TODO: Replace base DocumentInfo.ToString function as necessary /// /// Overrides Base ToString /// /// A string representation of current DocumentInfo //public override string ToString() //{ // return base.ToString(); //} // TODO: Check DocumentInfo.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 DocumentInfo protected override object GetIdValue() { return _DocID; } #endregion #region Factory Methods private DocumentInfo() { /* require use of factory methods */ } public Document Get() { return Document.Get(_DocID); } #endregion #region Data Access Portal internal DocumentInfo(SafeDataReader dr) { try { _DocID = dr.GetInt32("DocID"); _LibTitle = dr.GetString("LibTitle"); _DocContent = (byte[])dr.GetValue("DocContent"); _DocAscii = dr.GetString("DocAscii"); _Config = dr.GetString("Config"); _DTS = dr.GetDateTime("DTS"); _UserID = dr.GetString("UserID"); } catch (Exception ex) { Database.LogException("DocumentInfo.Constructor", ex); throw new DbCslaException("DocumentInfo.Constructor", ex); } } #endregion } // Class } // Namespace