This commit is contained in:
2006-11-14 14:33:33 +00:00
commit a0cad33b0f
180 changed files with 40199 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
// ========================================================================
// 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>
/// StructureInfoList Generated by MyGeneration using the CSLA Object Mapping template
/// </summary>
[Serializable()]
public partial class StructureInfoList : ReadOnlyListBase<StructureInfoList, StructureInfo>
{
#region Factory Methods
/// <summary>
/// Return a list of all projects.
/// </summary>
public static StructureInfoList Get()
{
return DataPortal.Fetch<StructureInfoList>(new Criteria());
}
// TODO: Add alternative gets -
//public static StructureInfoList Get(<criteria>)
//{
// return DataPortal.Fetch<StructureInfoList>(new FilteredCriteria(<criteria>));
//}
private StructureInfoList()
{ /* 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 = "getStructures";
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
{
IsReadOnly = false;
while (dr.Read()) this.Add(new StructureInfo(dr));
IsReadOnly = true;
}
}
}
}
catch (Exception ex)
{
Database.LogException("StructureInfoList.DataPortal_Fetch", ex);
throw new DbCslaException("StructureInfoList.DataPortal_Fetch", ex);
}
this.RaiseListChangedEvents = true;
}
#endregion
} // Class
} // Namespace