using System;
using System.Data;
using System.Collections;
using BP.DA;
using BP.En;
using BP.Cloud;
using BP.Sys;
namespace BP.Cloud
{
///
/// 市场属性
///
public class MarketAttr : BP.En.EntityNoNameAttr
{
///
/// Email
///
public const string Email = "Email";
public const string Tel = "Tel";
public const string Linker = "Linker";
public const string ADUrl = "ADUrl";
public const string GUID = "GUID";
}
///
/// 市场
///
public class Market : EntityNoName
{
#region 属性.
public string Linker
{
get
{
return this.GetValStringByKey(MarketAttr.Linker);
}
set
{
this.SetValByKey(MarketAttr.Linker, value);
}
}
///
/// GUID
///
public string GUID
{
get
{
return this.GetValStringByKey(MarketAttr.GUID);
}
set
{
this.SetValByKey(MarketAttr.GUID, value);
}
}
public string Email
{
get
{
return this.GetValStringByKey(MarketAttr.Email);
}
set
{
this.SetValByKey(MarketAttr.Email, value);
}
}
#endregion 属性.
#region 构造方法
///
/// 市场
///
public Market()
{
}
///
/// 市场
///
///
public Market(string _No) : base(_No) { }
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
if (BP.Web.WebUser.No.Equals("admin") == true)
uac.OpenForSysAdmin();
return uac;
}
}
#endregion
///
/// 市场Map
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Port_Market", "市场");
map.AddTBStringPK(MarketAttr.No, null, "编号", true, false, 0, 30, 30);
map.AddTBString(MarketAttr.Name, null, "名称", true, false, 0, 200, 200, true);
map.AddTBString(MarketAttr.Email, null, "Email", true, false, 0, 200, 200, true);
map.AddTBString(MarketAttr.Tel, null, "Tel", true, false, 0, 200, 200, true);
map.AddTBString(MarketAttr.Linker, null, "Linker", true, false, 0, 200, 200, true);
map.AddTBString(MarketAttr.ADUrl, null, "ADUrl", true, false, 0, 200, 200, true);
map.AddTBString(MarketAttr.GUID, null, "GUID", true, false, 0, 200, 200, true);
this._enMap = map;
return this._enMap;
}
}
}
///
/// 市场
///
public class Markets : EntitiesTree
{
///
/// 市场s
///
public Markets() { }
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new Market();
}
}
}
}