using BP.DA; using BP.En; namespace BP.CCBill.Template { /// /// 集合方法属性 /// public class CollectionAttr : EntityNoNameAttr { #region 基本属性. /// /// 表单ID /// public const string FrmID = "FrmID"; /// /// 方法ID /// public const string MethodID = "MethodID"; /// /// 图标 /// public const string Icon = "Icon"; /// /// 方法打开模式 /// public const string MethodModel = "MethodModel"; /// /// 标记 /// public const string Mark = "Mark"; /// /// tag /// public const string Tag1 = "Tag1"; /// /// 显示方式. /// public const string ShowModel = "ShowModel"; /// /// 处理内容 /// public const string CollectionDoc_Url = "CollectionDoc_Url"; /// /// 内容类型 /// public const string CollectionDocTypeOfFunc = "CollectionDocTypeOfFunc"; /// /// 处理内容s /// public const string Docs = "Docs"; /// /// 执行警告信息-对功能方法有效 /// public const string WarningMsg = "WarningMsg"; /// /// 成功提示信息 /// public const string MsgSuccess = "MsgSuccess"; /// /// 失败提示信息 /// public const string MsgErr = "MsgErr"; /// /// 执行完毕后干啥? /// public const string WhatAreYouTodo = "WhatAreYouTodo"; /// /// Idx /// public const string Idx = "Idx"; #endregion 基本属性. #region 外观. /// /// 宽度. /// public const string PopWidth = "PopWidth"; /// /// 高度 /// public const string PopHeight = "PopHeight"; #endregion 外观. /// /// 是否启用 /// public const string IsEnable = "IsEnable"; /// /// 流程编号 /// public const string FlowNo = "FlowNo"; } /// /// 集合方法 /// public class Collection : EntityNoName { #region 基本属性 /// /// 表单ID /// public string FrmID { get { return this.GetValStringByKey(CollectionAttr.FrmID); } set { this.SetValByKey(CollectionAttr.FrmID, value); } } public string Icon { get { return this.GetValStringByKey(CollectionAttr.Icon); } set { this.SetValByKey(CollectionAttr.Icon, value); } } /// /// 方法ID /// public string MethodID { get { return this.GetValStringByKey(CollectionAttr.MethodID); } set { this.SetValByKey(CollectionAttr.MethodID, value); } } public string FlowNo { get { return this.GetValStringByKey(CollectionAttr.FlowNo); } set { this.SetValByKey(CollectionAttr.FlowNo, value); } } /// /// 模式 /// public string MethodModel { get { return this.GetValStringByKey(CollectionAttr.MethodModel); } set { this.SetValByKey(CollectionAttr.MethodModel, value); } } /// /// 标记 /// public string Mark { get { return this.GetValStringByKey(CollectionAttr.Mark); } set { this.SetValByKey(CollectionAttr.Mark, value); } } /// /// tag1 /// public string Tag1 { get { return this.GetValStringByKey(CollectionAttr.Tag1); } set { this.SetValByKey(CollectionAttr.Tag1, value); } } public int Idx { get { return this.GetValIntByKey(CollectionAttr.Idx); } set { this.SetValByKey(CollectionAttr.Idx, value); } } #endregion #region 构造方法 /// /// 集合方法 /// public Collection() { } /// /// 集合方法 /// /// public Collection(string no) { this.No = no; this.Retrieve(); } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("Frm_Collection", "集合方法"); map.AddGroupAttr("基本属性"); //主键. map.AddTBStringPK(CollectionAttr.No, null, "编号", true, true, 0, 50, 10); map.AddTBString(CollectionAttr.Name, null, "方法名", true, false, 0, 300, 10); map.AddTBString(CollectionAttr.MethodID, null, "方法ID", true, true, 0, 300, 10); //功能标记. map.AddTBString(CollectionAttr.MethodModel, null, "方法模式", true, true, 0, 300, 10); map.AddTBString(CollectionAttr.Tag1, null, "Tag1", true, true, 0, 300, 10); map.AddTBString(CollectionAttr.Mark, null, "Mark", true, true, 0, 300, 10); map.AddTBString(CollectionAttr.FrmID, null, "表单ID", true, true, 0, 300, 10); map.AddTBString(CollectionAttr.FlowNo, null, "流程编号", true, true, 0, 10, 10); map.AddTBString(CollectionAttr.Icon, null, "图标", true, false, 0, 50, 10, true); //临时存储. map.AddTBString(CollectionAttr.Docs, null, "方法内容", true, false, 0, 300, 10); //是否启用? map.AddBoolean(CollectionAttr.IsEnable, true, "是否启用?", true, true, true); map.AddTBInt(CollectionAttr.Idx, 0, "Idx", true, false); map.AddDDLSysEnum(MethodAttr.RefMethodType, 0, "页面打开方式", true, true, "RefMethodTypeLink", "@0=模态窗口打开@1=新窗口打开@2=右侧窗口打开@4=转到新页面"); #region 外观. map.AddGroupAttr("外观"); map.AddTBInt(CollectionAttr.PopHeight, 0, "弹窗高度", true, false); map.AddTBInt(CollectionAttr.PopWidth, 0, "弹窗宽度", true, false); #endregion 外观. #region 对功能有效 map.AddGroupAttr("对功能有效"); //对功能有效. map.AddTBString(CollectionAttr.WarningMsg, null, "功能执行警告信息", true, false, 0, 300, 10); map.AddTBString(CollectionAttr.MsgSuccess, null, "成功提示信息", true, false, 0, 300, 10, true); map.AddTBString(CollectionAttr.MsgErr, null, "失败提示信息", true, false, 0, 300, 10, true); map.AddDDLSysEnum(CollectionAttr.WhatAreYouTodo, 0, "执行完毕后干啥?", true, true, CollectionAttr.WhatAreYouTodo, "@0=关闭提示窗口@1=关闭提示窗口并刷新@2=转入到Search.htm页面上去"); #endregion 对功能有效 this._enMap = map; return this._enMap; } } #endregion #region 移动. public void DoUp() { this.DoOrderUp(CollectionAttr.FrmID, this.FrmID, CollectionAttr.Idx); } public void DoDown() { this.DoOrderDown(CollectionAttr.FrmID, this.FrmID, CollectionAttr.Idx); } #endregion 移动. protected override bool beforeInsert() { if (DataType.IsNullOrEmpty(this.No) == true) this.No = DBAccess.GenerGUID(); return base.beforeInsert(); } } /// /// 集合方法 /// public class Collections : EntitiesNoName { /// /// 集合方法 /// public Collections() { } /// /// 集合方法 /// /// 方法IDID public Collections(int nodeid) { QueryObject qo = new QueryObject(this); qo.AddWhere(CollectionAttr.MethodID, nodeid); qo.DoQuery(); } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new Collection(); } } #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((Collection)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }