using System;
using System.Collections;
using BP.DA;
using BP.En;
using BP;
namespace BP.Sys
{
///
/// 百分比显示方式
///
public enum PercentModel
{
///
/// 不显示
///
None,
///
/// 纵向
///
Vertical,
///
/// 横向
///
Transverse,
}
///
/// RptTemplateAttr
///
public class RptTemplateAttr : EntityOIDAttr
{
///
/// 类名称
///
public const string EnsName = "EnsName";
///
/// 描述
///
public const string MyPK = "MyPK";
///
/// D1
///
public const string D1 = "D1";
///
/// d2
///
public const string D2 = "D2";
///
/// d3
///
public const string D3 = "D3";
///
/// 要分析的对象s
///
public const string AlObjs = "AlObjs";
///
/// 记录人
///
public const string Height = "Height";
///
/// EnsName
///
public const string Width = "Width";
///
/// 是否显示大合计
///
public const string IsSumBig = "IsSumBig";
///
/// 是否显示小合计
///
public const string IsSumLittle = "IsSumLittle";
///
/// 是否显示右合计
///
public const string IsSumRight = "IsSumRight";
///
/// 比率显示方式
///
public const string PercentModel = "PercentModel";
///
/// 人员
///
public const string FK_Emp = "FK_Emp";
}
///
/// 报表模板
///
public class RptTemplate: Entity
{
#region 基本属性
///
/// 集合类名称
///
public string EnsName
{
get
{
return this.GetValStringByKey(RptTemplateAttr.EnsName) ;
}
set
{
this.SetValByKey(RptTemplateAttr.EnsName,value) ;
}
}
public string FK_Emp
{
get
{
return this.GetValStringByKey(RptTemplateAttr.FK_Emp);
}
set
{
this.SetValByKey(RptTemplateAttr.FK_Emp, value);
}
}
///
/// 描述
///
public string MyPK
{
get
{
return this.GetValStringByKey(RptTemplateAttr.MyPK ) ;
}
set
{
this.SetValByKey(RptTemplateAttr.MyPK,value) ;
}
}
public void setMyPK(string val)
{
this.SetValByKey(RptTemplateAttr.MyPK, val);
}
///
/// D1
///
public string D1
{
get
{
return this.GetValStringByKey(RptTemplateAttr.D1) ;
}
set
{
this.SetValByKey(RptTemplateAttr.D1,value) ;
}
}
///
/// D2
///
public string D2
{
get
{
return this.GetValStringByKey(RptTemplateAttr.D2) ;
}
set
{
this.SetValByKey(RptTemplateAttr.D2,value) ;
}
}
///
/// D3
///
public string D3
{
get
{
return this.GetValStringByKey(RptTemplateAttr.D3) ;
}
set
{
this.SetValByKey(RptTemplateAttr.D3,value) ;
}
}
public string AlObjsText
{
get
{
return this.GetValStringByKey(RptTemplateAttr.AlObjs ) ;
}
}
///
/// 分析的对象
/// 数据格式 @分析对象1@分析对象2@分析对象3@
///
public string AlObjs
{
get
{
return this.GetValStringByKey(RptTemplateAttr.AlObjs) ;
}
set
{
this.SetValByKey(RptTemplateAttr.AlObjs,value) ;
}
}
public int Height
{
get
{
return this.GetValIntByKey(RptTemplateAttr.Height ) ;
}
set
{
this.SetValByKey(RptTemplateAttr.Height,value) ;
}
}
public int Width
{
get
{
return this.GetValIntByKey(RptTemplateAttr.Width ) ;
}
set
{
this.SetValByKey(RptTemplateAttr.Width,value) ;
}
}
///
/// 是否显示大合计
///
public bool IsSumBig
{
get
{
return this.GetValBooleanByKey(RptTemplateAttr.IsSumBig ) ;
}
set
{
this.SetValByKey(RptTemplateAttr.IsSumBig,value) ;
}
}
///
/// 小合计
///
public bool IsSumLittle
{
get
{
return this.GetValBooleanByKey(RptTemplateAttr.IsSumLittle ) ;
}
set
{
this.SetValByKey(RptTemplateAttr.IsSumLittle,value) ;
}
}
///
/// 是否现实右合计。
///
public bool IsSumRight
{
get
{
return this.GetValBooleanByKey(RptTemplateAttr.IsSumRight ) ;
}
set
{
this.SetValByKey(RptTemplateAttr.IsSumRight,value) ;
}
}
public PercentModel PercentModel
{
get
{
return (PercentModel)this.GetValIntByKey(RptTemplateAttr.PercentModel ) ;
}
set
{
this.SetValByKey(RptTemplateAttr.PercentModel,(int)value) ;
}
}
#endregion
#region 构造方法
public override UAC HisUAC
{
get
{
UAC uac = new UAC();
uac.IsUpdate=true;
uac.IsView=true;
return base.HisUAC;
}
}
///
///
///
public RptTemplate()
{
}
///
/// 类
///
///
public RptTemplate(string ensName)
{
this.EnsName = ensName;
this.FK_Emp = Web.WebUser.No;
this.setMyPK(Web.WebUser.No + "@" + EnsName);
try
{
this.Retrieve();
}
catch
{
this.Insert();
}
}
///
/// 报表模板
///
public override Map EnMap
{
get
{
if (this._enMap!=null)
return this._enMap;
Map map = new Map("Sys_RptTemplate", "报表模板");
map.DepositaryOfEntity=Depositary.Application;
map.EnType=EnType.Sys;
map.AddMyPK();
map.AddTBString(RptTemplateAttr.EnsName,null,"类名",false,false,0,500,20);
map.AddTBString(RptTemplateAttr.FK_Emp, null, "操作员", true, false, 0,100, 20);
map.AddTBString(RptTemplateAttr.D1,null,"D1",false,true,0,90,10);
map.AddTBString(RptTemplateAttr.D2,null,"D2",false,true,0,90,10);
map.AddTBString(RptTemplateAttr.D3,null,"D3",false,true,0,90,10);
map.AddTBString(RptTemplateAttr.AlObjs,null,"要分析的对象",false,true,0,90,10);
map.AddTBInt(RptTemplateAttr.Height,600,"Height",false,true);
map.AddTBInt(RptTemplateAttr.Width,800,"Width",false,true);
map.AddBoolean(RptTemplateAttr.IsSumBig,false,"是否显示大合计",false,true);
map.AddBoolean(RptTemplateAttr.IsSumLittle,false,"是否显示小合计",false,true);
map.AddBoolean(RptTemplateAttr.IsSumRight,false,"是否显示右合计",false,true);
map.AddTBInt(RptTemplateAttr.PercentModel,0,"比率显示方式",false,true);
this._enMap=map;
return this._enMap;
}
}
#endregion
}
///
/// 实体集合
///
public class RptTemplates : Entities
{
#region 构造
public RptTemplates()
{
}
///
/// 查询
///
///
public RptTemplates(string EnsName)
{
QueryObject qo = new QueryObject(this);
qo.AddWhere(RptTemplateAttr.EnsName, EnsName);
qo.DoQuery();
}
///
/// 得到它的 Entity
///
public override Entity GetNewEntity
{
get
{
return new RptTemplate();
}
}
#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((RptTemplate)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}