using BP.En; namespace BP.CCBill.Template { /// /// 单据查询角色属性 /// public class FrmStationDeptAttr { /// /// 表单 /// public const string FK_Frm = "FK_Frm"; /// /// 工作角色 /// public const string FK_Station = "FK_Station"; /// /// 部门 /// public const string FK_Dept = "FK_Dept"; } /// /// 单据查询角色 /// 单据查询角色有两部分组成. /// public class FrmStationDept : EntityMM { #region 基本属性 /// /// UI界面上的访问控制 /// public override UAC HisUAC { get { UAC uac = new UAC(); uac.OpenAll(); return uac; } } /// ///单据 /// public string FK_Frm { get { return this.GetValStringByKey(FrmStationDeptAttr.FK_Frm); } set { this.SetValByKey(FrmStationDeptAttr.FK_Frm, value); } } /// /// 工作角色 /// public string FK_Station { get { return this.GetValStringByKey(FrmStationDeptAttr.FK_Station); } set { this.SetValByKey(FrmStationDeptAttr.FK_Station, value); } } public string DeptNo { get { return this.GetValStringByKey(FrmStationDeptAttr.FK_Dept); } set { this.SetValByKey(FrmStationDeptAttr.FK_Dept, value); } } #endregion #region 构造方法 /// /// 单据工作角色 /// public FrmStationDept() { } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("Frm_StationDept", "单据角色部门"); map.AddTBStringPK(FrmStationDeptAttr.FK_Frm, null, "单据编号", false, false, 1, 190, 20); map.AddDDLEntitiesPK(FrmStationDeptAttr.FK_Station, null, "工作角色", new BP.Port.Stations(), true); map.AddDDLEntitiesPK(FrmStationDeptAttr.FK_Dept, null, "部门", new BP.Port.Depts(), true); this._enMap = map; return this._enMap; } } #endregion } /// /// 单据查询角色 /// public class FrmStationDepts : EntitiesMM { /// /// 单据查询角色 /// public FrmStationDepts() { } /// /// 单据查询角色 /// /// 单据ID public FrmStationDepts(string frmID) { QueryObject qo = new QueryObject(this); qo.AddWhere(FrmStationDeptAttr.FK_Frm, frmID); qo.DoQuery(); } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new FrmStationDept(); } } #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((FrmStationDept)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成 List. } }