using System; using BP.Web; using BP.En; namespace BP.CCFast { /// /// 独立运行流程设置 属性 /// public class StandAloneFlowAttr : EntityNoNameAttr { /// /// 名称 /// public const string Name = "Name"; /// /// 功能ID /// public const string Docs = "Docs"; /// /// 组织编号 /// public const string OrgNo = "OrgNo"; /// /// 记录人 /// public const string Rec = "Rec"; /// /// 记录日期 /// public const string RDT = "RDT"; /// /// 年月 /// public const string NianYue = "NianYue"; public const string IsStar = "IsStar"; } /// /// 独立运行流程设置 /// public class StandAloneFlow : EntityNoName { #region 基本属性 /// /// 组织编号 /// public string OrgNo { get { return this.GetValStrByKey(StandAloneFlowAttr.OrgNo); } set { this.SetValByKey(StandAloneFlowAttr.OrgNo, value); } } /// /// 记录人 /// public string Rec { get { return this.GetValStrByKey(StandAloneFlowAttr.Rec); } set { this.SetValByKey(StandAloneFlowAttr.Rec, value); } } /// /// 记录日期 /// public string RDT { get { return this.GetValStrByKey(StandAloneFlowAttr.RDT); } set { this.SetValByKey(StandAloneFlowAttr.RDT, value); } } /// /// 年月 /// public string NianYue { get { return this.GetValStrByKey(StandAloneFlowAttr.NianYue); } set { this.SetValByKey(StandAloneFlowAttr.NianYue, value); } } #endregion #region 构造方法 /// /// 权限控制 /// public override UAC HisUAC { get { UAC uac = new UAC(); if (WebUser.IsAdmin) { uac.IsUpdate = true; return uac; } return base.HisUAC; } } /// /// 独立运行流程设置 /// public StandAloneFlow() { } public StandAloneFlow(string mypk) { this.No = mypk; this.Retrieve(); } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("WF_Flow", "独立运行流程设置"); map.AddTBStringPK(StandAloneFlowAttr.No, null, "流程编号", true, true, 0, 100, 10); map.AddTBString(StandAloneFlowAttr.Name, null, "流程名称", true, false, 0, 300, 10); // map.AddBoolean(StandAloneFlowAttr.IsStar, false, "是否标星", false, false); //map.AddTBString(StandAloneFlowAttr.Is, null, "流程名称", true, false, 0, 300, 10); //map.AddTBStringDoc(StandAloneFlowAttr.Docs, null, "内容", true, false); //map.AddTBString(StandAloneFlowAttr.OrgNo, null, "OrgNo", false, false, 0, 100, 10); //map.AddTBString(StandAloneFlowAttr.Rec, null, "记录人", false, false, 0, 100, 10, true); //map.AddTBDateTime(StandAloneFlowAttr.RDT, null, "记录时间", false, false); //map.AddTBString(StandAloneFlowAttr.NianYue, null, "NianYue", false, false, 0, 10, 10); //map.AddTBInt(StandAloneFlowAttr.IsStar, 0, "是否标星", false, false); this._enMap = map; return this._enMap; } } #endregion #region 执行方法. protected override bool beforeInsert() { throw new Exception("err@"); // return base.beforeInsert(); } #endregion 执行方法. } /// /// 独立运行流程设置 s /// public class StandAloneFlows : EntitiesNoName { /// /// 独立运行流程设置 /// public StandAloneFlows() { } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new StandAloneFlow(); } } #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((StandAloneFlow)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }