// ======================================================================== // 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 { /// /// PermissionInfo Generated by MyGeneration using the CSLA Object Mapping template /// [Serializable()] public partial class PermissionInfo : ReadOnlyBase { #region Business Methods private int _PID; [System.ComponentModel.DataObjectField(true, true)] public int PID { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _PID; } } private int _RID; public int RID { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _RID; } } private int _PermLevel; /// /// 0 - None, 1 - Security, 2 - System, 3 - RO, 4 - Procdures, 5 - Sections, 6 - Steps, 7 - Comments /// public int PermLevel { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _PermLevel; } } private int _VersionType; /// /// 0 - None, 1 - Working Draft, 2 - Approved, (3 - All) /// public int VersionType { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _VersionType; } } private int _PermValue; /// /// 1 - Read, 2 - Write, 4 - Create, 8 - Delete (15 - All) /// public int PermValue { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _PermValue; } } private int _PermAD; /// /// 0 - Allow, 1 - Deny /// public int PermAD { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { CanReadProperty(true); return _PermAD; } } 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 PermissionInfo.ToString function as necessary /// /// Overrides Base ToString /// /// A string representation of current PermissionInfo //public override string ToString() //{ // return base.ToString(); //} // TODO: Check PermissionInfo.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 PermissionInfo protected override object GetIdValue() { return _PID; } #endregion #region Factory Methods private PermissionInfo() { /* require use of factory methods */ } public Permission Get() { return Permission.Get(_PID); } #endregion #region Data Access Portal internal PermissionInfo(SafeDataReader dr) { try { _PID = dr.GetInt32("PID"); _RID = dr.GetInt32("RID"); _PermLevel = dr.GetInt32("PermLevel"); _VersionType = dr.GetInt32("VersionType"); _PermValue = dr.GetInt32("PermValue"); _PermAD = dr.GetInt32("PermAD"); _StartDate = dr.GetSmartDate("StartDate").Text; _EndDate = dr.GetSmartDate("EndDate").Text; _DTS = dr.GetDateTime("DTS"); _UsrID = dr.GetString("UsrID"); } catch (Exception ex) { Database.LogException("PermissionInfo.Constructor", ex); throw new DbCslaException("PermissionInfo.Constructor", ex); } } #endregion } // Class } // Namespace