Commit for development environment setup
This commit is contained in:
40
PROMS/VEPROMS.CSLA.Library/NewGenerated/CommonRules.cs
Normal file
40
PROMS/VEPROMS.CSLA.Library/NewGenerated/CommonRules.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user