using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; namespace Technewlogic.Crud { public class CrudPropertyMetadata : ICrudPropertyMetadata { public CrudPropertyMetadata() : this(true) { } public CrudPropertyMetadata(bool initialState) { DisplayInGrid = initialState; DisplayInDetails = initialState; DisplayInModification = initialState; IsEnabledInEdit = initialState; IsEnabledInNew = initialState; } public CrudPropertyMetadata(string displayName) : this(true, displayName) { } public CrudPropertyMetadata(bool initialState, string displayName) : this(initialState) { _displayName = displayName; } private readonly string _displayName = string.Empty; #region ICrudPropertyMetadata Members public bool DisplayInDetails { get; set; } public bool DisplayInGrid { get; set; } public bool DisplayInModification { get; set; } public bool IsEnabledInEdit { get; set; } public bool IsEnabledInNew { get; set; } public string GetDisplayName(PropertyInfo pi) { return string.IsNullOrEmpty(_displayName) ? pi.Name : _displayName; } #endregion } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)