This commit is contained in:
Jsj
2007-11-20 20:12:45 +00:00
parent d0793524be
commit 6e00716c47
149 changed files with 71953 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
// ========================================================================
// Copyright 2007 - 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;
using System.ComponentModel;
using Csla.Validation;
using System.Reflection;
namespace VEPROMS.CSLA.Library
{
/// <summary>
/// CommonRules Generated by MyGeneration using the CSLA Object Mapping template
/// </summary>
public static class CommonRules
{
public static bool Required(object target, Csla.Validation.RuleArgs e)
{
PropertyInfo propertyInfoObj = target.GetType().GetProperty(e.PropertyName);
if (propertyInfoObj == null) return true;
if (propertyInfoObj.GetValue(target, null) == null)
{
e.Description = e.PropertyName + " is a required field";
return false;
}
return true;
}
}
}