using System; using System.Collections; using BP.DA; using BP.En; using BP; namespace BP.Sys { /// /// 数据批阅 /// public class FrmDBRemarkAttr { /// /// 名称 /// public const string FrmID = "FrmID"; /// /// 字段 /// public const string Field = "Field"; /// /// 主键值 /// public const string RefPKVal = "RefPKVal"; /// /// 记录人 /// public const string RecNo = "RecNo"; /// /// 记录人姓名 /// public const string RecName = "RecName"; /// /// 记录日期 /// public const string RDT = "RDT"; /// /// 轨迹ID /// public const string Remark = "Remark"; } /// /// 数据批阅 /// public class FrmDBRemark : EntityMyPK { #region 基本属性 /// /// 权限控制 /// public override UAC HisUAC { get { var uac = new UAC(); uac.Readonly(); uac.IsView = false; return uac; } } public string Remark { get { return this.GetValStringByKey(FrmDBRemarkAttr.Remark); } set { this.SetValByKey(FrmDBRemarkAttr.Remark, value); } } public string FrmID { get { return this.GetValStringByKey(FrmDBRemarkAttr.FrmID); } set { this.SetValByKey(FrmDBRemarkAttr.FrmID, value); } } /// /// FK_Emp /// public string RecNo { get { return this.GetValStringByKey(FrmDBRemarkAttr.RecNo); } set { this.SetValByKey(FrmDBRemarkAttr.RecNo, value); } } public string RecName { get { return this.GetValStringByKey(FrmDBRemarkAttr.RecName); } set { this.SetValByKey(FrmDBRemarkAttr.RecName, value); } } public string RDT { get { return this.GetValStringByKey(FrmDBRemarkAttr.RDT); } set { this.SetValByKey(FrmDBRemarkAttr.RDT, value); } } #endregion #region 构造方法 /// /// 数据批阅 /// public FrmDBRemark() { } /// /// EnMap /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("Sys_FrmDBRemark", "数据批阅"); map.AddMyPK(); map.AddTBString(FrmDBRemarkAttr.FrmID, null, "表单ID", true, true, 0, 100, 20); map.AddTBString(FrmDBRemarkAttr.RefPKVal, null, "PKVal", true, true, 0, 40, 20); map.AddTBString(FrmDBRemarkAttr.Field, null, "字段", true, true, 0, 60, 20); map.AddTBString(FrmDBRemarkAttr.Remark, null, "备注", true, true, 0, 500, 20); map.AddTBString(FrmDBRemarkAttr.RecNo, null, "记录人", true, true, 0, 50, 20); map.AddTBString(FrmDBRemarkAttr.RecName, null, "字段", true, true, 0, 60, 20); map.AddTBDateTime(FrmDBRemarkAttr.RDT, null, "记录时间", true, true); this._enMap = map; return this._enMap; } } #endregion protected override bool beforeInsert() { this.setMyPK(DBAccess.GenerGUID()); this.RDT = DataType.CurrentDateTime; if (DataType.IsNullOrEmpty(this.RecNo) == true) { this.RecNo = BP.Web.WebUser.No; this.RecName = BP.Web.WebUser.Name; } return base.beforeInsert(); } #region 重写 public override Entities GetNewEntities { get { return new FrmDBRemarks(); } } #endregion 重写 } /// /// 数据批阅s /// public class FrmDBRemarks : EntitiesMyPK { #region 构造 public FrmDBRemarks() { } #endregion #region 重写 /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new FrmDBRemark(); } } #endregion #region 为了适应自动翻译成java的需要,把实体转换成List. /// /// 转化成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((FrmDBRemark)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. #region 为了适应自动翻译成java的需要,把实体转换成IList, c#代码调用会出错误。 /// /// 转化成list /// /// List public System.Collections.Generic.IList ToJavaList() { return (System.Collections.Generic.IList)this; } #endregion 为了适应自动翻译成java的需要,把实体转换成IList, c#代码调用会出错误。 } }