// ========================================================================
// 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;
namespace Volian.Object.Library
{
	/// 
	///	GroupInfo Generated by MyGeneration using the CSLA Object Mapping template
	/// 
	[Serializable()]
	public partial class GroupInfo : ReadOnlyBase
	{
	#region Business Methods
	
		private int _gid;
		[System.ComponentModel.DataObjectField(true, true)]
		public int Gid
		{
			[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
			get
			{
				CanReadProperty(true);
				return _gid;
			}
		}
		private string _groupname=string.Empty;
		[System.ComponentModel.DataObjectField(true, true)]
		public string GroupName
		{
			[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
			get
			{
				CanReadProperty(true);
				return _groupname;
			}
		}
		private int _grouptype;
		[System.ComponentModel.DataObjectField(true, true)]
		public int GroupType
		{
			[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
			get
			{
				CanReadProperty(true);
				return _grouptype;
			}
		}
		private string _config=string.Empty;
		[System.ComponentModel.DataObjectField(true, true)]
		public string Config
		{
			[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
			get
			{
				CanReadProperty(true);
				return _config;
			}
		}
		private DateTime _dts=new DateTime();
		[System.ComponentModel.DataObjectField(true, true)]
		public DateTime Dts
		{
			[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
			get
			{
				CanReadProperty(true);
				return _dts;
			}
		}
		private string _usrid=string.Empty;
		[System.ComponentModel.DataObjectField(true, true)]
		public string Usrid
		{
			[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
			get
			{
				CanReadProperty(true);
				return _usrid;
			}
		}
		// TODO: Replace base GroupInfo.ToString function as necessary
		/// 
		/// Overrides Base ToString
		/// 
		/// A string representation of current GroupInfo
		//public override string ToString()
		//{
		//  return base.ToString();
		//}
		// TODO: Check GroupInfo.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 GroupInfo
		protected override object GetIdValue()
		{
			return _gid;
		}
	#endregion
	#region Factory Methods
    private GroupInfo()
    { /* require use of factory methods */ }
	#endregion
	#region Data Access Portal
	internal GroupInfo(SafeDataReader dr)
    {
		try
		{
			_gid = dr.GetInt32("GID");
			_groupname = dr.GetString("GroupName");
			_grouptype = dr.GetInt32("GroupType");
			_config = dr.GetString("Config");
			_dts = dr.GetDateTime("DTS");
			_usrid = dr.GetString("UsrID");
		}
		catch(Exception ex)
		{
			Database.LogException("GroupInfo",ex);
		}
    }
	#endregion
	} // Class
} // Namespace