148 lines
4.1 KiB
C#
148 lines
4.1 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>
|
|
/// MembershipInfo Generated by MyGeneration using the CSLA Object Mapping template
|
|
/// </summary>
|
|
[Serializable()]
|
|
public partial class MembershipInfo : ReadOnlyBase<MembershipInfo>
|
|
{
|
|
#region Business Methods
|
|
private int _UGID;
|
|
[System.ComponentModel.DataObjectField(true, true)]
|
|
public int UGID
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _UGID;
|
|
}
|
|
}
|
|
private int _UID;
|
|
public int UID
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _UID;
|
|
}
|
|
}
|
|
private int _GID;
|
|
public int GID
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _GID;
|
|
}
|
|
}
|
|
private string _StartDate = string.Empty;
|
|
public string StartDate
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _StartDate;
|
|
}
|
|
}
|
|
private string _EndDate = string.Empty;
|
|
public string EndDate
|
|
{
|
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
CanReadProperty(true);
|
|
return _EndDate;
|
|
}
|
|
}
|
|
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;
|
|
}
|
|
}
|
|
// TODO: Replace base MembershipInfo.ToString function as necessary
|
|
/// <summary>
|
|
/// Overrides Base ToString
|
|
/// </summary>
|
|
/// <returns>A string representation of current MembershipInfo</returns>
|
|
//public override string ToString()
|
|
//{
|
|
// return base.ToString();
|
|
//}
|
|
// TODO: Check MembershipInfo.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 MembershipInfo</returns>
|
|
protected override object GetIdValue()
|
|
{
|
|
return _UGID;
|
|
}
|
|
#endregion
|
|
#region Factory Methods
|
|
private MembershipInfo()
|
|
{ /* require use of factory methods */ }
|
|
public Membership Get()
|
|
{
|
|
return Membership.Get(_UGID);
|
|
}
|
|
#endregion
|
|
#region Data Access Portal
|
|
internal MembershipInfo(SafeDataReader dr)
|
|
{
|
|
try
|
|
{
|
|
_UGID = dr.GetInt32("UGID");
|
|
_UID = dr.GetInt32("UID");
|
|
_GID = dr.GetInt32("GID");
|
|
_StartDate = dr.GetSmartDate("StartDate").Text;
|
|
_EndDate = dr.GetSmartDate("EndDate").Text;
|
|
_DTS = dr.GetDateTime("DTS");
|
|
_UsrID = dr.GetString("UsrID");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Database.LogException("MembershipInfo.Constructor", ex);
|
|
throw new DbCslaException("MembershipInfo.Constructor", ex);
|
|
}
|
|
}
|
|
#endregion
|
|
} // Class
|
|
} // Namespace
|