|
/*
* Copyright � 2005-2006 Danilo Mendez <danilo.mendez@kontac.net>
* Adolfo Socorro <ajs@esolutionspr.com>
* www.kontac.net
* All rights reserved.
* Released under both BSD license and Lesser GPL library license.
* Whenever there is any discrepancy between the two licenses,
* the BSD license will take precedence.
*/
using System;
using System.Collections.Generic;
using System.Text;
using SmartCode.Model;
namespace SmartCode.Studio.Controls
{
internal class TablePropertyWrapper : NamedPropertyWrapper
{
public TablePropertyWrapper(ExplorerTreeNode treeNode, Table table)
: base(treeNode, table)
{
}
private Table CurrentTable
{
get
{
return namedObject as Table;
}
}
[DisplayText("PropSchema", "PropSchemaDesc", "DatabaseCategory")]
public String Schema
{
get { return CurrentTable.Schema; }
set { CurrentTable.Schema = value; }
}
[DisplayText("PropCollectionName", "PropCollectionNameDesc", "ClientProfileCategory")]
public string CollectionName
{
get
{
return CurrentTable.ClientProfile.CollectionName;
}
set
{
CurrentTable.ClientProfile.CollectionName = value;
}
}
[DisplayText("PropIsPersistent", "PropIsPersistentDesc", "ClientProfileCategory")]
public bool IsPersistent
{
get
{
return CurrentTable.ClientProfile.IsPersistent;
}
set
{
CurrentTable.ClientProfile.IsPersistent = value;
}
}
[DisplayText("PropAllowUpdate", "PropAllowUpdateDesc", "ClientProfileCategory")]
public bool AllowUpdate
{
get
{
return CurrentTable.ClientProfile.AllowUpdate;
}
set
{
CurrentTable.ClientProfile.AllowUpdate = value;
}
}
[DisplayText("PropAllowDelete", "PropAllowDeleteDesc", "ClientProfileCategory")]
public bool AllowDelete
{
get
{
return CurrentTable.ClientProfile.AllowDelete;
}
set
{
CurrentTable.ClientProfile.AllowDelete = value;
}
}
[DisplayText("PropAllowCopy", "PropAllowCopyDesc", "ClientProfileCategory")]
public bool AllowCopy
{
get
{
return CurrentTable.ClientProfile.AllowCopy;
}
set
{
CurrentTable.ClientProfile.AllowCopy = value;
}
}
[DisplayText("PropAllowInsert", "PropAllowInsertDesc", "ClientProfileCategory")]
public bool AllowInsert
{
get
{
return CurrentTable.ClientProfile.AllowInsert;
}
set
{
CurrentTable.ClientProfile.AllowInsert = value;
}
}
}
}
|
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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Danilo is the creator of
SmartRules, a Business Rules Engine. He is an industry consultant working primarily with companies interested in implementing dynamic rules programming concepts to add flexibility to their architectures on web, CE, and desktop platforms. He operates his own website,
Kontac, where you will find more information.
To contact Danilo, email him at danilo.mendez@gmail.com.