214 lines
5.8 KiB
C#
214 lines
5.8 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>
|
|
/// FolderInfo Generated by MyGeneration using the CSLA Object Mapping template
|
|
/// </summary>
|
|
[Serializable()]
|
|
public partial class FolderInfo : ReadOnlyBase<FolderInfo>
|
|
{
|
|
#region Business Methods
|
|
private int _FolderID;
|
|
[System.ComponentModel.DataObjectField(true, true)]
|
|
public int FolderID
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _FolderID;
|
|
}
|
|
}
|
|
private int _ParentID;
|
|
/// <summary>
|
|
/// {child Folders.FolderID}
|
|
/// </summary>
|
|
public int ParentID
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _ParentID;
|
|
}
|
|
}
|
|
private int _DBID;
|
|
public int DBID
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _DBID;
|
|
}
|
|
}
|
|
private string _Name = string.Empty;
|
|
public string Name
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _Name;
|
|
}
|
|
}
|
|
private string _Title = string.Empty;
|
|
public string Title
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _Title;
|
|
}
|
|
}
|
|
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 _UsrID = string.Empty;
|
|
public string UsrID
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _UsrID;
|
|
}
|
|
}
|
|
private int _Assignmentcount = 0;
|
|
/// <summary>
|
|
/// Count of Assignment for this Folder
|
|
/// </summary>
|
|
public int AssignmentCount
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _Assignmentcount;
|
|
}
|
|
}
|
|
private AssignmentInfoList _Assignments = null;
|
|
public AssignmentInfoList Assignments
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
if (_Assignments == null)
|
|
_Assignments = AssignmentInfoList.GetByFolder(_FolderID);
|
|
return _Assignments;
|
|
}
|
|
}
|
|
private int _DocVersioncount = 0;
|
|
/// <summary>
|
|
/// Count of DocVersion for this Folder
|
|
/// </summary>
|
|
public int DocVersionCount
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _DocVersioncount;
|
|
}
|
|
}
|
|
private DocVersionInfoList _DocVersions = null;
|
|
public DocVersionInfoList DocVersions
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
if (_DocVersions == null)
|
|
_DocVersions = DocVersionInfoList.GetByFolder(_FolderID);
|
|
return _DocVersions;
|
|
}
|
|
}
|
|
// TODO: Replace base FolderInfo.ToString function as necessary
|
|
/// <summary>
|
|
/// Overrides Base ToString
|
|
/// </summary>
|
|
/// <returns>A string representation of current FolderInfo</returns>
|
|
//public override string ToString()
|
|
//{
|
|
// return base.ToString();
|
|
//}
|
|
// TODO: Check FolderInfo.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 FolderInfo</returns>
|
|
protected override object GetIdValue()
|
|
{
|
|
return _FolderID;
|
|
}
|
|
#endregion
|
|
#region Factory Methods
|
|
private FolderInfo()
|
|
{ /* require use of factory methods */ }
|
|
public Folder Get()
|
|
{
|
|
return Folder.Get(_FolderID);
|
|
}
|
|
#endregion
|
|
#region Data Access Portal
|
|
internal FolderInfo(SafeDataReader dr)
|
|
{
|
|
try
|
|
{
|
|
_FolderID = dr.GetInt32("FolderID");
|
|
_ParentID = dr.GetInt32("ParentID");
|
|
_DBID = dr.GetInt32("DBID");
|
|
_Name = dr.GetString("Name");
|
|
_Title = dr.GetString("Title");
|
|
_Config = dr.GetString("Config");
|
|
_DTS = dr.GetDateTime("DTS");
|
|
_UsrID = dr.GetString("UsrID");
|
|
_Assignmentcount = dr.GetInt32("AssignmentCount");
|
|
_DocVersioncount = dr.GetInt32("DocVersionCount");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Database.LogException("FolderInfo.Constructor", ex);
|
|
throw new DbCslaException("FolderInfo.Constructor", ex);
|
|
}
|
|
}
|
|
#endregion
|
|
} // Class
|
|
} // Namespace
|