using System;
using System.Collections;
using BP.DA;
using BP.En;
namespace BP.Sys
{
///
/// 单选框
///
public class FrmRBAttr : EntityMyPKAttr
{
///
/// 主表
///
public const string FK_MapData = "FK_MapData";
///
/// KeyOfEn
///
public const string KeyOfEn = "KeyOfEn";
///
/// IntKey
///
public const string IntKey = "IntKey";
///
/// EnumKey
///
public const string EnumKey = "EnumKey";
///
/// 标签
///
public const string Lab = "Lab";
///
/// 脚本
///
public const string Script = "Script";
///
/// 配置信息
///
public const string FieldsCfg = "FieldsCfg";
///
/// 提示信息
///
public const string Tip = "Tip";
///
/// 字体大小,AtPara中属性,added by liuxc,2017-05-22
///
public const string FontSize = "FontSize";
///
/// 设置的值
///
public const string SetVal = "SetVal";
}
///
/// 单选框
///
public class FrmRB : EntityMyPK
{
#region 属性
///
/// 提示
///
public string Tip
{
get
{
return this.GetValStringByKey(FrmRBAttr.Tip);
}
set
{
this.SetValByKey(FrmRBAttr.Tip, value);
}
}
///
/// 字段设置值
///
public string SetVal
{
get
{
return this.GetValStringByKey(FrmRBAttr.SetVal);
}
set
{
this.SetValByKey(FrmRBAttr.SetVal, value);
}
}
///
/// 要执行的脚本
///
public string Script
{
get
{
return this.GetValStringByKey(FrmRBAttr.Script);
}
set
{
this.SetValByKey(FrmRBAttr.Script, value);
}
}
///
/// 字段-配置信息
///
public string FieldsCfg
{
get
{
return this.GetValStringByKey(FrmRBAttr.FieldsCfg);
}
set
{
this.SetValByKey(FrmRBAttr.FieldsCfg, value);
}
}
public string Lab
{
get
{
return this.GetValStringByKey(FrmRBAttr.Lab);
}
}
public void setLab(string val)
{
this.SetValByKey(FrmRBAttr.Lab, val);
}
public string KeyOfEn
{
get
{
return this.GetValStringByKey(FrmRBAttr.KeyOfEn);
}
set
{
this.SetValByKey(FrmRBAttr.KeyOfEn, value);
}
}
public void setKeyOfEn(string val)
{
this.SetValByKey(FrmRBAttr.KeyOfEn, val);
}
public int IntKey
{
get
{
return this.GetValIntByKey(FrmRBAttr.IntKey);
}
}
public void setIntKey(int val)
{
this.SetValByKey(FrmRBAttr.IntKey, val);
}
public string FK_MapData
{
get
{
return this.GetValStrByKey(FrmRBAttr.FK_MapData);
}
}
public void setFK_MapData(string val)
{
this.SetValByKey(FrmRBAttr.FK_MapData, val);
}
public string EnumKey
{
get
{
return this.GetValStrByKey(FrmRBAttr.EnumKey);
}
}
public void setEnumKey(string val)
{
this.SetValByKey(FrmRBAttr.EnumKey, val);
}
public int FontSize
{
get
{
return this.GetParaInt(FrmRBAttr.FontSize, 12);
}
set
{
this.SetPara(FrmRBAttr.FontSize, value);
}
}
#endregion
#region 构造方法
///
/// 单选框
///
public FrmRB()
{
}
public FrmRB(string mypk)
{
this.setMyPK(mypk);
this.Retrieve();
}
///
/// EnMap
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Sys_FrmRB", "单选框");
map.IndexField = FrmRBAttr.FK_MapData;
map.AddMyPK();
map.AddTBString(FrmRBAttr.FK_MapData, null, "表单ID", true, false, 0, 200, 20);
map.AddTBString(FrmRBAttr.KeyOfEn, null, "字段", true, false, 0, 200, 20);
map.AddTBString(FrmRBAttr.EnumKey, null, "枚举值", true, false, 0, 30, 20);
map.AddTBString(FrmRBAttr.Lab, null, "标签", true, false, 0, 500, 20);
map.AddTBInt(FrmRBAttr.IntKey, 0, "IntKey", true, false);
map.AddTBInt(MapAttrAttr.UIIsEnable, 0, "是否启用", true, false);
//要执行的脚本.
map.AddTBString(FrmRBAttr.Script, null, "要执行的脚本", true, false, 0, 4000, 20);
map.AddTBString(FrmRBAttr.FieldsCfg, null, "配置信息@FieldName=Sta", true, false, 0, 4000, 20);
map.AddTBString(FrmRBAttr.SetVal, null, "设置的值", true, false, 0, 200, 20);
map.AddTBString(FrmRBAttr.Tip, null, "选择后提示的信息", true, false, 0, 1000, 20);
map.AddTBAtParas(500);
this._enMap = map;
return this._enMap;
}
}
#endregion
protected override bool beforeInsert()
{
this.setMyPK(this.FK_MapData + "_" + this.KeyOfEn + "_" + this.IntKey);
return base.beforeInsert();
}
protected override bool beforeUpdateInsertAction()
{
this.setMyPK(this.FK_MapData + "_" + this.KeyOfEn + "_" + this.IntKey);
return base.beforeUpdateInsertAction();
}
}
///
/// 单选框s
///
public class FrmRBs : EntitiesMyPK
{
#region 构造
///
/// 单选框s
///
public FrmRBs()
{
}
///
/// 单选框s
///
/// s
public FrmRBs(string frmID)
{
this.Retrieve(MapAttrAttr.FK_MapData, frmID);
}
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new FrmRB();
}
}
#endregion
#region 为了适应自动翻译成java的需要,把实体转换成List.
///
/// 转化成 java list,C#不能调用.
///
/// List
public System.Collections.Generic.IList ToJavaList()
{
return (System.Collections.Generic.IList)this;
}
///
/// 转化成list
///
/// List
public System.Collections.Generic.List Tolist()
{
System.Collections.Generic.List list = new System.Collections.Generic.List();
for (int i = 0; i < this.Count; i++)
{
list.Add((FrmRB)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}