using System; using System.Data; using BP.DA; using BP.En; using BP.Port; namespace BP.TA { /// /// 項目属性 /// public class TemplateAttr : EntityNoNameAttr { #region 基本属性 /// /// 标题 /// public const string StarterNo = "StarterNo"; /// /// 項目内容 /// public const string StarterName = "StarterName"; /// /// 按表单字段項目 /// public const string PrjSta = "PrjSta"; /// /// 表单字段 /// public const string PRI = "PRI"; /// /// 是否启用項目到角色 /// public const string WCL = "WCL"; /// /// 记录日期 /// public const string RDT = "RDT"; public const string PrjDesc = "PrjDesc"; public const string TaskModel = "TaskModel"; #endregion } /// /// 項目 /// public class Template : EntityNoName { #region 属性. public string TaskModel { get { return this.GetValStringByKey(TemplateAttr.TaskModel); } set { this.SetValByKey(TemplateAttr.TaskModel, value); } } public string PrjDesc { get { return this.GetValStringByKey(TemplateAttr.PrjDesc); } set { this.SetValByKey(TemplateAttr.PrjDesc, value); } } public int PRI { get { return this.GetValIntByKey(TemplateAttr.PRI); } set { this.SetValByKey(TemplateAttr.PRI, value); } } public int PrjSta { get { return this.GetValIntByKey(TemplateAttr.PrjSta); } set { this.SetValByKey(TemplateAttr.PrjSta, value); } } public int WCL { get { return this.GetValIntByKey(TemplateAttr.WCL); } set { this.SetValByKey(TemplateAttr.WCL, value); } } public string StarterNo { get { return this.GetValStringByKey(TemplateAttr.StarterNo); } set { this.SetValByKey(TemplateAttr.StarterNo, value); } } public string StarterName { get { return this.GetValStringByKey(TemplateAttr.StarterName); } set { this.SetValByKey(TemplateAttr.StarterName, value); } } public string RDT { get { return this.GetValStringByKey(TemplateAttr.RDT); } set { this.SetValByKey(TemplateAttr.RDT, value); } } #endregion 属性. #region 构造函数 /// /// 項目设置 /// public Template() { } /// /// 項目设置 /// /// public Template(string no) { this.No = no; this.Retrieve(); } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("TA_Template", "項目"); map.AddTBStringPK(TemplateAttr.No, null, "编号", true, true, 5, 5, 5); map.AddTBString(TemplateAttr.Name, null, "名称", true, true, 0, 100, 10); map.AddTBString(TemplateAttr.TaskModel, null, "模式", true, true, 0, 100, 10); map.AddTBStringDoc(TemplateAttr.PrjDesc, null, "项目描述", true, false, true); map.AddTBInt(TemplateAttr.PrjSta, 0, "状态", true, true); map.AddTBInt(TemplateAttr.PRI, 0, "优先级", true, true); map.AddTBInt(TemplateAttr.WCL, 0, "完成率", true, true); map.AddTBString(TemplateAttr.StarterNo, null, "发起人", true, false, 0, 100, 10, true); map.AddTBString(TemplateAttr.StarterName, null, "名称", true, false, 0, 100, 10, true); map.AddTBDateTime(TemplateAttr.RDT, null, "发起日期", true, false); this._enMap = map; return this._enMap; } } #endregion } /// /// 項目s /// public class Templates : EntitiesNoName { #region 方法 /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new Template(); } } /// /// 項目 /// public Templates() { } #endregion #region 为了适应自动翻译成java的需要,把实体转换成List. /// /// 转化成 java list,C#不能调用. /// /// List public System.Collections.Generic.IList