232 lines
6.4 KiB
C#
232 lines
6.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>
|
|
/// StructureInfo Generated by MyGeneration using the CSLA Object Mapping template
|
|
/// </summary>
|
|
[Serializable()]
|
|
public partial class StructureInfo : ReadOnlyBase<StructureInfo>
|
|
{
|
|
#region Business Methods
|
|
private int _StructureID;
|
|
[System.ComponentModel.DataObjectField(true, true)]
|
|
public int StructureID
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _StructureID;
|
|
}
|
|
}
|
|
private int _FromType;
|
|
/// <summary>
|
|
/// 0 - Parent, 1 - Previous
|
|
/// </summary>
|
|
public int FromType
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _FromType;
|
|
}
|
|
}
|
|
private int _FromID;
|
|
public int FromID
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _FromID;
|
|
}
|
|
}
|
|
private int _ContentType;
|
|
/// <summary>
|
|
/// 0 - Structure, 1 - Procedure, 2 - Section, 3 - Step, 4 - Branch
|
|
/// </summary>
|
|
public int 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 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 _RoUsagecount = 0;
|
|
/// <summary>
|
|
/// Count of RoUsage for this Structure
|
|
/// </summary>
|
|
public int RoUsageCount
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _RoUsagecount;
|
|
}
|
|
}
|
|
private RoUsageInfoList _RoUsages = null;
|
|
public RoUsageInfoList RoUsages
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
if (_RoUsages == null)
|
|
_RoUsages = RoUsageInfoList.GetByStructure(_StructureID);
|
|
return _RoUsages;
|
|
}
|
|
}
|
|
private int _Transitioncount = 0;
|
|
/// <summary>
|
|
/// Count of Transition for this Structure
|
|
/// </summary>
|
|
public int TransitionCount
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _Transitioncount;
|
|
}
|
|
}
|
|
private TransitionInfoList _Transitions = null;
|
|
public TransitionInfoList Transitions
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
if (_Transitions == null)
|
|
_Transitions = TransitionInfoList.GetByStructure(_StructureID);
|
|
return _Transitions;
|
|
}
|
|
}
|
|
private int _ZStructcount = 0;
|
|
/// <summary>
|
|
/// Count of ZStruct for this Structure
|
|
/// </summary>
|
|
public int ZStructCount
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _ZStructcount;
|
|
}
|
|
}
|
|
private ZStructInfoList _ZStructs = null;
|
|
public ZStructInfoList ZStructs
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
if (_ZStructs == null)
|
|
_ZStructs = ZStructInfoList.GetByStructure(_StructureID);
|
|
return _ZStructs;
|
|
}
|
|
}
|
|
// TODO: Replace base StructureInfo.ToString function as necessary
|
|
/// <summary>
|
|
/// Overrides Base ToString
|
|
/// </summary>
|
|
/// <returns>A string representation of current StructureInfo</returns>
|
|
//public override string ToString()
|
|
//{
|
|
// return base.ToString();
|
|
//}
|
|
// TODO: Check StructureInfo.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 StructureInfo</returns>
|
|
protected override object GetIdValue()
|
|
{
|
|
return _StructureID;
|
|
}
|
|
#endregion
|
|
#region Factory Methods
|
|
private StructureInfo()
|
|
{ /* require use of factory methods */ }
|
|
public Structure Get()
|
|
{
|
|
return Structure.Get(_StructureID);
|
|
}
|
|
#endregion
|
|
#region Data Access Portal
|
|
internal StructureInfo(SafeDataReader dr)
|
|
{
|
|
try
|
|
{
|
|
_StructureID = dr.GetInt32("StructureID");
|
|
_FromType = dr.GetInt32("FromType");
|
|
_FromID = dr.GetInt32("FromID");
|
|
_ContentType = dr.GetInt32("ContentType");
|
|
_ContentID = dr.GetInt32("ContentID");
|
|
_DTS = dr.GetDateTime("DTS");
|
|
_UserID = dr.GetString("UserID");
|
|
_RoUsagecount = dr.GetInt32("RoUsageCount");
|
|
_Transitioncount = dr.GetInt32("TransitionCount");
|
|
_ZStructcount = dr.GetInt32("ZStructCount");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Database.LogException("StructureInfo.Constructor", ex);
|
|
throw new DbCslaException("StructureInfo.Constructor", ex);
|
|
}
|
|
}
|
|
#endregion
|
|
} // Class
|
|
} // Namespace
|