Commit for development environment setup
This commit is contained in:
78
PROMS/VEPROMS_Security/Volian.Object.Library/UserInfoList.cs
Normal file
78
PROMS/VEPROMS_Security/Volian.Object.Library/UserInfoList.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
// ========================================================================
|
||||
// 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
|
||||
{
|
||||
/// <summary>
|
||||
/// UserInfoList Generated by MyGeneration using the CSLA Object Mapping template
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public partial class UserInfoList : ReadOnlyListBase<UserInfoList,UserInfo>
|
||||
{
|
||||
#region Factory Methods
|
||||
/// <summary>
|
||||
/// Return a list of all projects.
|
||||
/// </summary>
|
||||
public static UserInfoList Get()
|
||||
{
|
||||
return DataPortal.Fetch<UserInfoList>(new Criteria());
|
||||
}
|
||||
|
||||
|
||||
// TODO: Add alternative gets -
|
||||
//public static UserInfoList Get(<criteria>)
|
||||
//{
|
||||
// return DataPortal.Fetch<UserInfoList>(new FilteredCriteria(<criteria>));
|
||||
//}
|
||||
|
||||
private UserInfoList()
|
||||
{ /* require use of factory methods */ }
|
||||
|
||||
#endregion
|
||||
#region Data Access Portal
|
||||
[Serializable()]
|
||||
private class Criteria
|
||||
{ /* no criteria - retrieve all rows */ }
|
||||
|
||||
private void DataPortal_Fetch(Criteria criteria)
|
||||
{
|
||||
this.RaiseListChangedEvents = false;
|
||||
try{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "getUsers";
|
||||
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
|
||||
{
|
||||
IsReadOnly = false;
|
||||
while (dr.Read())this.Add(new UserInfo(dr));
|
||||
IsReadOnly = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Database.LogException("UserInfoList",ex);
|
||||
}
|
||||
this.RaiseListChangedEvents = true;
|
||||
}
|
||||
#endregion
|
||||
} // Class
|
||||
} // Namespace
|
Reference in New Issue
Block a user