using System;
using System.Collections;
using BP.DA;
using BP.En;
using BP;
namespace BP.Sys
{
///
/// abc_afs
///
public class GroupEnsTemplateAttr : EntityOIDAttr
{
///
/// 名称
///
public const string Name = "Name";
///
/// 实体名称
///
public const string EnName = "EnName";
///
/// 属性
///
public const string Attrs = "Attrs";
///
/// 操作列
///
public const string OperateCol = "OperateCol";
///
/// 记录人
///
public const string Rec = "Rec";
///
/// EnsName
///
public const string EnsName = "EnsName";
}
///
/// 报表模板
///
public class GroupEnsTemplate: EntityOID
{
#region 基本属性
///
/// 集合类名称
///
public string EnsName
{
get
{
return this.GetValStringByKey(GroupEnsTemplateAttr.EnsName) ;
}
set
{
this.SetValByKey(GroupEnsTemplateAttr.EnsName,value) ;
}
}
///
/// 实体名称
///
public string OperateCol
{
get
{
return this.GetValStringByKey(GroupEnsTemplateAttr.OperateCol ) ;
}
set
{
this.SetValByKey(GroupEnsTemplateAttr.OperateCol,value) ;
}
}
///
/// 数据源
///
public string Attrs
{
get
{
return this.GetValStringByKey(GroupEnsTemplateAttr.Attrs ) ;
}
set
{
this.SetValByKey(GroupEnsTemplateAttr.Attrs,value) ;
}
}
///
/// 名称
///
public string Name
{
get
{
return this.GetValStringByKey(GroupEnsTemplateAttr.Name ) ;
}
set
{
this.SetValByKey(GroupEnsTemplateAttr.Name,value) ;
}
}
public string EnName
{
get
{
return this.GetValStringByKey(GroupEnsTemplateAttr.EnName ) ;
}
set
{
this.SetValByKey(GroupEnsTemplateAttr.EnName,value) ;
}
}
public string Rec
{
get
{
return this.GetValStringByKey(GroupEnsTemplateAttr.Rec ) ;
}
set
{
this.SetValByKey(GroupEnsTemplateAttr.Rec,value) ;
}
}
#endregion
#region 构造方法
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.IsUpdate=true;
uac.IsView=true;
return base.HisUAC;
}
}
///
/// 系统实体
///
public GroupEnsTemplate()
{
}
///
/// EnMap
///
public override Map EnMap
{
get
{
if (this._enMap!=null)
return this._enMap;
Map map = new Map("Sys_GroupEnsTemplate", "报表模板");
map.DepositaryOfEntity=Depositary.None;
map.EnType=EnType.Sys;
map.AddTBIntPKOID();
map.AddTBString(GroupEnsTemplateAttr.EnName,null,"表称",false,false,0,500,20);
map.AddTBString(GroupEnsTemplateAttr.Name,null,"报表名",true,false,0,500,20);
map.AddTBString(GroupEnsTemplateAttr.EnsName,null,"报表类名",false,true,0,90,10);
map.AddTBString(GroupEnsTemplateAttr.OperateCol,null,"操作属性",false,true,0,90,10);
map.AddTBString(GroupEnsTemplateAttr.Attrs,null,"运算属性",false,true,0,90,10);
map.AddTBString(GroupEnsTemplateAttr.Rec,null,"记录人",false,true,0,90,10);
this._enMap=map;
return this._enMap;
}
}
#endregion
#region 查询方法
///
/// 报表模板
///
/// fk_emp
/// className
/// attrs
/// 查询返回个数
public int Search(string fk_emp, string className, string attrs)
{
QueryObject qo = new QueryObject(this);
qo.AddWhere(GroupEnsTemplateAttr.Rec, fk_emp);
qo.addAnd();
qo.AddWhere(GroupEnsTemplateAttr.Attrs, className);
qo.addAnd();
qo.AddWhere(GroupEnsTemplateAttr.EnsName, className);
return qo.DoQuery();
}
#endregion
}
///
/// 实体集合
///
public class GroupEnsTemplates : EntitiesOID
{
#region 构造
public GroupEnsTemplates()
{
}
///
///
///
///
public GroupEnsTemplates(string emp)
{
QueryObject qo = new QueryObject(this);
qo.AddWhere(GroupEnsTemplateAttr.Rec, emp);
qo.addOr();
qo.AddWhere(GroupEnsTemplateAttr.Rec,"admin");
qo.DoQuery();
}
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new GroupEnsTemplate();
}
}
#endregion
#region 查询方法
#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((GroupEnsTemplate)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}