using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using BP.En; namespace BP.Sys { /// /// 属性 /// public class GEEntityExcelFrmAttr { /// /// 文件路径 /// public const string FilePath = "FilePath"; /// /// 记录时间 /// public const string RDT = "RDT"; /// /// 最后修改人 /// public const string LastEditer = "LastEditer"; } /// /// excel表单实体 /// public class GEEntityExcelFrm : EntityOID { #region 属性。 /// /// 最后修改人 /// public string LastEditer { get { return this.GetValStringByKey(GEEntityExcelFrmAttr.LastEditer); } set { this.SetValByKey(GEEntityExcelFrmAttr.LastEditer, value); } } /// /// 记录时间 /// public string RDT { get { return this.GetValStringByKey(GEEntityExcelFrmAttr.RDT); } set { this.SetValByKey(GEEntityExcelFrmAttr.RDT, value); } } /// /// 文件路径 /// public string FilePath { get { return this.GetValStringByKey(GEEntityExcelFrmAttr.FilePath); } set { this.SetValByKey(GEEntityExcelFrmAttr.FilePath, value); } } #endregion 属性。 #region 构造函数 public override string PK { get { return "OID"; } } public override string PKField { get { return "OID"; } } public override string ToString() { return this.FK_MapData; } public override string ClassID { get { return this.FK_MapData; } } /// /// 主键 /// public string FK_MapData = null; /// /// 通用实体 /// public GEEntityExcelFrm() { } /// /// 通用实体 /// /// 节点ID public GEEntityExcelFrm(string fk_mapdata) { this.FK_MapData=fk_mapdata; } /// /// 通用实体 /// /// 节点ID /// OID public GEEntityExcelFrm(string fk_mapdata, int oid) { this.FK_MapData= fk_mapdata; this.OID = oid; int i =this.RetrieveFromDBSources(); } #endregion #region Map /// /// 重写基类方法= /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; if (this.FK_MapData == null) throw new Exception("没有给" + this.FK_MapData + "值,您不能获取它的Map。"); this._enMap = BP.Sys.MapData.GenerHisMap(this.FK_MapData); return this._enMap; } } /// /// GEEntitys /// public override Entities GetNewEntities { get { if (this.FK_MapData == null) return new GEEntityExcelFrms(); return new GEEntityExcelFrms(this.FK_MapData); } } #endregion #region 其他属性. private ArrayList _Dtls = null; public ArrayList Dtls { get { if (_Dtls == null) _Dtls = new ArrayList(); return _Dtls; } } #endregion 其他属性. } /// /// excel表单实体s /// public class GEEntityExcelFrms : EntitiesOID { #region 重载基类方法 public override string ToString() { return this.FK_MapData; } /// /// 主键 /// public string FK_MapData = null; #endregion #region 方法 /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { //if (this.FK_MapData == null) // throw new Exception("@没有能 FK_MapData 给值。"); if (this.FK_MapData == null) return new GEEntity(); return new GEEntity(this.FK_MapData); } } /// /// 通用实体ID /// public GEEntityExcelFrms() { } /// /// 通用实体ID /// /// public GEEntityExcelFrms(string fk_mapdata) { this.FK_MapData= fk_mapdata; } #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((GEEntityExcelFrm)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }