using System;
using System.Data;
using System.Collections;
using BP.DA;
using BP.En;
using BP.Sys;
namespace BP.FrmTemplate
{
///
/// 表单属性
///
public class FrmCloudAttr : BP.Sys.MapDataAttr
{
///
/// 表单类型
///
public const string FK_FormTree = "FK_FormTree";
///
/// OrgNo
///
public const string FK_SortFunc = "FK_SortFunc";
///
/// 单据BIll类型.
///
public const string BillEntityType = "BillEntityType";
///
/// 是否是推荐
///
public const string IsTuiJian = "IsTuiJian";
}
///
/// 表单
///
public class FrmCloud : EntityNoName
{
#region 实现基本的方法
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.OpenForSysAdmin();
return uac;
}
}
///
/// 表单类型
///
public string FK_FormTree
{
get
{
return this.GetValStrByKey(FrmCloudAttr.FK_FormTree);
}
set
{
this.SetValByKey(FrmCloudAttr.FK_FormTree, value);
}
}
#endregion
#region 构造方法
///
/// 表单
///
public FrmCloud()
{
}
///
/// 表单
///
/// 表单编号
public FrmCloud(string no)
{
this.No = no.Trim();
if (this.No.Length == 0)
throw new Exception("@要查询的表单编号为空。");
this.Retrieve();
}
///
/// EnMap
///
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
Map map = new Map("Frm_Template", "表单");
map.AddTBStringPK(FrmCloudAttr.No, null, "编号", true, false, 4, 4, 4);
map.AddTBString(FrmCloudAttr.Name, null, "名称", true, false, 0, 100, 100);
map.AddTBString(FrmCloudAttr.FK_FormTree, null, "名称", true, false, 0, 100, 100);
map.AddTBString(FrmCloudAttr.FK_SortFunc, null, "名称", true, false, 0, 100, 100);
map.AddTBInt(FrmCloudAttr.BillEntityType, 0, "单据实体?", true, true);
map.AddBoolean(FrmCloudAttr.IsTuiJian, false, "是否是推荐", true, true);
map.AddTBStringDoc(FrmCloudAttr.Note, null, "备注", true, false);
//map.AddTBString(FrmCloudAttr.FK_SortFunc, null, "名称", true, false, 0, 100, 100);
//map.AddDDLEntities(FrmCloudAttr.FK_FormTree, null, "表单树类别", new Sort1s(), true);
//map.AddDDLEntities(FrmCloudAttr.FK_SortFunc, null, "功能用途", new SortFuncs(), true);
//map.AddDDLSysEnum(FrmCloudAttr.BillEntityType, 0, "单据实体?", true, true, FrmCloudAttr.BillEntityType, "@0=单据@1=实体", false);
//类别不是空.
map.AddHidden(FrmCloudAttr.FK_FormTree, "!=", "");
// map.AddDDLSysEnum()
map.AddSearchAttr(FrmCloudAttr.FK_FormTree);
map.AddSearchAttr(FrmCloudAttr.FK_SortFunc);
map.AddSearchAttr(FrmCloudAttr.BillEntityType);
this._enMap = map;
return this._enMap;
}
}
#endregion
}
///
/// 表单s
///
public class FrmClouds : EntitiesNoName
{
///
/// 表单
///
public FrmClouds() { }
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new FrmCloud();
}
}
#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((FrmCloud)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}