You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

266 lines
6.6 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Data;
using System.Collections;
using BP.DA;
using BP.En;
namespace BP.Sys
{
public class GEEntityWordFrmAttr
{
/// <summary>
/// 文件路径
/// </summary>
public const string FilePath="FilePath";
/// <summary>
/// 记录时间
/// </summary>
public const string RDT="RDT";
/// <summary>
/// 最后修改人
/// </summary>
public const string LastEditer="LastEditer";
public const string OID="OID";
}
/// <summary>
/// 通用实体
/// </summary>
public class GEEntityWordFrm : Entity
{
#region 属性。
public int OID
{
get
{
return this.GetValIntByKey(GEEntityWordFrmAttr.OID);
}
set
{
this.SetValByKey(GEEntityWordFrmAttr.OID,value);
}
}
/// <summary>
/// 最后修改人
/// </summary>
public string LastEditer
{
get
{
return this.GetValStringByKey(GEEntityWordFrmAttr.LastEditer);
}
set
{
this.SetValByKey(GEEntityWordFrmAttr.LastEditer,value);
}
}
/// <summary>
/// 记录时间
/// </summary>
public string RDT
{
get
{
return this.GetValStringByKey(GEEntityWordFrmAttr.RDT);
}
set
{
this.SetValByKey(GEEntityWordFrmAttr.RDT,value);
}
}
/// <summary>
/// 文件路径
/// </summary>
public string FilePath
{
get
{
return this.GetValStringByKey(GEEntityWordFrmAttr.FilePath);
}
set
{
this.SetValByKey(GEEntityWordFrmAttr.FilePath, value);
}
}
#endregion 属性。
#region 构造函数
public override string PK
{
get
{
return "OID";
}
}
public override string PKField
{
get
{
return "OID";
}
}
public override string ToString()
{
return this.FrmID;
}
public override string ClassID
{
get
{
return this.FrmID;
}
}
/// <summary>
/// 主键
/// </summary>
public string FrmID = null;
/// <summary>
/// 通用实体
/// </summary>
public GEEntityWordFrm()
{
}
/// <summary>
/// 通用实体
/// </summary>
/// <param name="nodeid">节点ID</param>
public GEEntityWordFrm(string fk_mapdata)
{
this.FrmID = fk_mapdata;
}
/// <summary>
/// 通用实体
/// </summary>
/// <param name="nodeid">节点ID</param>
/// <param name="_oid">OID</param>
public GEEntityWordFrm(string fk_mapdata, object pk)
{
this.FrmID= fk_mapdata;
this.PKVal = pk;
this.Retrieve();
}
#endregion
#region Map
/// <summary>
/// 重写基类方法
/// </summary>
public override Map EnMap
{
get
{
if (this._enMap != null)
return this._enMap;
if (this.FrmID == null)
throw new Exception("没有给" + this.FrmID + "值您不能获取它的Map。");
this._enMap = BP.Sys.MapData.GenerHisMap(this.FrmID);
return this._enMap;
}
}
/// <summary>
/// GEEntitys
/// </summary>
public override Entities GetNewEntities
{
get
{
if (this.FrmID == null)
return new GEEntityWordFrms();
return new GEEntityWordFrms(this.FrmID);
}
}
#endregion
private ArrayList _Dtls = null;
public ArrayList Dtls
{
get
{
if (_Dtls == null)
_Dtls = new ArrayList();
return _Dtls;
}
}
}
/// <summary>
/// 通用实体s
/// </summary>
public class GEEntityWordFrms : EntitiesOID
{
#region 重载基类方法
public override string ToString()
{
//if (this.FrmID == null)
// throw new Exception("@没有能 FK_MapData 给值。");
return this.FrmID;
}
/// <summary>
/// 主键
/// </summary>
public string FrmID = null;
#endregion
#region 方法
/// <summary>
/// 得到它的 Entity
/// </summary>
public override Entity GetNewEntity
{
get
{
//if (this.FrmID == null)
// throw new Exception("@没有能 FK_MapData 给值。");
if (this.FrmID == null)
return new GEEntity();
return new GEEntity(this.FrmID);
}
}
/// <summary>
/// 通用实体ID
/// </summary>
public GEEntityWordFrms()
{
}
/// <summary>
/// 通用实体ID
/// </summary>
/// <param name="fk_mapdtl"></param>
public GEEntityWordFrms(string fk_mapdata)
{
this.FrmID = fk_mapdata;
}
#endregion
#region 为了适应自动翻译成java的需要,把实体转换成List.
/// <summary>
/// 转化成 java list,C#不能调用.
/// </summary>
/// <returns>List</returns>
public System.Collections.Generic.IList<GEEntityWordFrm> ToJavaList()
{
return (System.Collections.Generic.IList<GEEntityWordFrm>)this;
}
/// <summary>
/// 转化成list
/// </summary>
/// <returns>List</returns>
public System.Collections.Generic.List<GEEntityWordFrm> Tolist()
{
System.Collections.Generic.List<GEEntityWordFrm> list = new System.Collections.Generic.List<GEEntityWordFrm>();
for (int i = 0; i < this.Count; i++)
{
list.Add((GEEntityWordFrm)this[i]);
}
return list;
}
#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
}