Commit for development environment setup
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
|
||||
// ========================================================================
|
||||
// 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>
|
||||
/// PermissionRoles Generated by MyGeneration using the CSLA Object Mapping template
|
||||
/// </summary>
|
||||
[Serializable()]
|
||||
public partial class PermissionRoles : BusinessListBase<PermissionRoles,PermissionRole>
|
||||
{
|
||||
// No Columns to retrieve
|
||||
#region Factory Methods
|
||||
|
||||
internal static PermissionRoles New()
|
||||
{
|
||||
return new PermissionRoles();
|
||||
}
|
||||
|
||||
internal static PermissionRoles Get(SafeDataReader dr)
|
||||
{
|
||||
return new PermissionRoles(dr);
|
||||
}
|
||||
|
||||
private PermissionRoles()
|
||||
{
|
||||
MarkAsChild();
|
||||
}
|
||||
|
||||
private PermissionRoles(SafeDataReader dr)
|
||||
{
|
||||
MarkAsChild();
|
||||
Fetch(dr);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Data Access Portal
|
||||
|
||||
// called to load data from the database
|
||||
private void Fetch(SafeDataReader dr)
|
||||
{
|
||||
this.RaiseListChangedEvents = false;
|
||||
while (dr.Read())
|
||||
this.Add(PermissionRole.Get(dr));
|
||||
this.RaiseListChangedEvents = true;
|
||||
}
|
||||
|
||||
internal void Update(Permission permission,SqlConnection cn)
|
||||
{
|
||||
this.RaiseListChangedEvents = false;
|
||||
// update (thus deleting) any deleted child objects
|
||||
foreach (PermissionRole obj in DeletedList)
|
||||
obj.DeleteSelf(permission,cn);
|
||||
// now that they are deleted, remove them from memory too
|
||||
DeletedList.Clear();
|
||||
|
||||
// add/update any current child objects
|
||||
foreach (PermissionRole obj in this)
|
||||
{
|
||||
if (obj.IsNew)
|
||||
obj.Insert(permission,cn);
|
||||
else
|
||||
obj.Update(permission,cn);
|
||||
}
|
||||
this.RaiseListChangedEvents = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
} // Class
|
||||
} // Namespace
|
Reference in New Issue
Block a user