///<summary> ///构建数据库模型 ///</summary> protected override void BuildDataSet() { this.DataSet = new DataSet(); DataTable comType = new DataTable(tableName); //构建表结构 DataSourceHelper.AddColumn(new DefineField(comType, "ABNORMALREASONID", "原因代码", FieldSize.Size20) { AllowCopy = false, AllowEmpty = false, DataType = LibDataType.Text }); DataSourceHelper.AddColumn(new DefineField(comType, "ABNORMALREASONNAME", "原因名称", FieldSize.Size50) { AllowEmpty = false, DataType = LibDataType.NText }); DataSourceHelper.AddColumn(new DefineField(comType, "ABNORMALREASONTYPEID", "原因类别", FieldSize.Size20) { AllowEmpty = false, DataType = LibDataType.Text, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.AbnormalReasonType") { RelFields = new RelFieldCollection() { new RelField("ABNORMALREASONTYPENAME", LibDataType.NText, FieldSize.Size50, "原因类别名称") } } } }); DataSourceHelper.AddFixColumn(comType, this.BillType); //系统自动创建的内容 comType.PrimaryKey = new DataColumn[] { comType.Columns["ABNORMALREASONID"] }; //定义表的主键 this.DataSet.Tables.Add(comType); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "ABNORMALID"; DataTable dt = new DataTable(tableName); DataSourceHelper.AddColumn(new DefineField(dt, primaryName, "异常代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(dt, "ABNORMALNAME", "异常名称", FieldSize.Size50) { DataType = LibDataType.NText, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(dt, "ABNORMALTYPEID", "异常类别", FieldSize.Size20) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.AbnormalType") { RelFields = new RelFieldCollection() { new RelField("ABNORMALTYPENAME", LibDataType.NText, FieldSize.Size50, "异常类别名称") } } } }); DataSourceHelper.AddColumn(new DefineField(dt, "BIZATTR", "业务属性") { DataType = LibDataType.Int32, ControlType = LibControlType.TextOption, TextOption = new string[] { "生产计划", "生产过程", "采购", "仓储物流" } }); DataSourceHelper.AddColumn(new DefineField(dt, "DEPTID", "责任部门", FieldSize.Size20) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Dept") { RelFields = new RelFieldCollection() { new RelField("DEPTNAME", LibDataType.NText, FieldSize.Size50, "责任部门名称") } } } }); DataSourceHelper.AddColumn(new DefineField(dt, "CHANGETYPE", "所属类型") { DataType = LibDataType.Int32, ControlType = LibControlType.TextOption, TextOption = new string[] { "设计", "班组", "设备", "物料", "品质", "其它" } }); DataSourceHelper.AddFixColumn(dt, this.BillType); dt.PrimaryKey = new DataColumn[] { dt.Columns[primaryName] }; this.DataSet.Tables.Add(dt); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, "RPTSEARCHID", "条件代码", FieldSize.Size20) { AllowCopy = false, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGID", "功能代码", FieldSize.Size50) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "功能名称") } } } }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISON", "是否启用") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "USERID", "账户ID", FieldSize.Size20) { DataType = LibDataType.Text, ControlType = LibControlType.NText }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["RPTSEARCHID"] }; this.DataSet.Tables.Add(masterTable); DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, "RPTSEARCHID", "条件代码", FieldSize.Size20)); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "SEARCHFIELD", "选择字段", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource() { } } }); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns["RPTSEARCHID"], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), masterTable.Columns["RPTSEARCHID"], bodyTable.Columns["RPTSEARCHID"]); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "ROLEID"; DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "角色代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ROLENAME", "角色名称", FieldSize.Size50) { AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISUNLIMITED", "无限制") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] }; this.DataSet.Tables.Add(masterTable); DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "角色代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddRemark(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "PERMISSIONGROUPID", "权限组", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.PermissionGroup") { RelFields = new RelFieldCollection() { new RelField("PERMISSIONGROUPNAME", LibDataType.NText, FieldSize.Size50, "权限组名称") } } } }); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName]); }
///<summary> ///构建数据库模型 ///</summary> protected override void BuildDataSet() { this.DataSet = new DataSet(); DataTable comType = new DataTable(tableName); //构建表结构 DataSourceHelper.AddColumn(new DefineField(comType, "ABNORMALREASONTYPEID", "原因类别编号", FieldSize.Size50) { AllowCopy = false, AllowEmpty = false, DataType = LibDataType.Text }); DataSourceHelper.AddColumn(new DefineField(comType, "ABNORMALREASONTYPENAME", "原因类别名称", FieldSize.Size20) { DataType = LibDataType.NText, AllowEmpty = false }); DataSourceHelper.AddFixColumn(comType, this.BillType); //系统自动创建的内容 comType.PrimaryKey = new DataColumn[] { comType.Columns["ABNORMALREASONTYPEID"] }; //定义表的主键 this.DataSet.Tables.Add(comType); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "REASONID"; DataTable masterTable = new DataTable(TableName); DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "原因编号", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "REASONNAME", "原因名称", FieldSize.Size50) { DataType = LibDataType.NText, AllowEmpty = false }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] }; this.DataSet.Tables.Add(masterTable); }
///<summary> ///构建数据库模型 ///</summary> protected override void BuildDataSet() { this.DataSet = new DataSet(); DataTable table = new DataTable(tableName); //构建表结构 DataSourceHelper.AddColumn(new DefineField(table, "TYPEID", "单据类型代码", FieldSize.Size50) { DataType = LibDataType.Text, AllowCopy = false, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(table, "TYPENAME", "单据类型名称", FieldSize.Size20) { DataType = LibDataType.NText, AllowEmpty = false }); DataSourceHelper.AddDefaultCreateState(table); DataSourceHelper.AddFixColumn(table, this.BillType); table.PrimaryKey = new DataColumn[] { table.Columns["TYPEID"] }; this.DataSet.Tables.Add(table); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); DataTable comPost = new DataTable(comPostName); DataSourceHelper.AddColumn(new DefineField(comPost, "DUTYID", "职务代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(comPost, "DUTYNAME", "职务名称", FieldSize.Size50) { DataType = LibDataType.NText, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(comPost, "DUTYLEVEL", "职务级别") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero, Precision = 0, DefaultValue = 0, AllowEmpty = false }); DataSourceHelper.AddFixColumn(comPost, BillType); comPost.PrimaryKey = new DataColumn[] { comPost.Columns["DUTYID"] }; this.DataSet.Tables.Add(comPost); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, "SITEID", "站点代码", FieldSize.Size20) { AllowCopy = false, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "SITENAME", "站点名称", FieldSize.Size100) { AllowEmpty = false, DataType = LibDataType.NText, ControlType = LibControlType.NText }); DataSourceHelper.AddColumn(new DefineField(masterTable, "SHORTNAME", "简称", FieldSize.Size10) { AllowEmpty = false, DataType = LibDataType.NText, ControlType = LibControlType.NText }); DataSourceHelper.AddColumn(new DefineField(masterTable, "SITEURL", "站点地址", FieldSize.Size200) { AllowEmpty = false, DataType = LibDataType.NText, ControlType = LibControlType.NText }); DataSourceHelper.AddColumn(new DefineField(masterTable, "SVCURL", "服务地址", FieldSize.Size200) { AllowEmpty = true, DataType = LibDataType.NText, ControlType = LibControlType.NText }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISSLAVE", "是否从站") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, AllowEmpty = false, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISSENDTO", "是否向其发送同步数据") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, AllowEmpty = false, DefaultValue = true }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["SITEID"] }; this.DataSet.Tables.Add(masterTable); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "CODINGRULEID"; DataTable headTable = new DataTable(tableName); DataSourceHelper.AddColumn(new DefineField(headTable, primaryName, "规则代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(headTable, "CODINGRULENAME", "规则名称", FieldSize.Size50) { DataType = LibDataType.NText, ControlType = LibControlType.NText, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(headTable, "PROGID", "功能代码", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "功能名称") } } } }); DataSourceHelper.AddColumn(new DefineField(headTable, "CODINGRULELENGTH", "编码长度") { DataType = LibDataType.Int32, ReadOnly = true }); DataSourceHelper.AddFixColumn(headTable, this.BillType); headTable.PrimaryKey = new DataColumn[] { headTable.Columns[primaryName] }; this.DataSet.Tables.Add(headTable); DataTable bodyTable = new DataTable(tableDetailName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "规则代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "SECTIONEXPLAIN", "编码段说明", FieldSize.Size50) { DataType = LibDataType.NText, ControlType = LibControlType.NText }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "SECTIONTYPE", "编码段类型") { DataType = LibDataType.Int32, ControlType = LibControlType.TextOption, TextOption = new string[] { "固定值", "流水号", "动态段", "日期(yyyymmdd)", "日期(yymmdd)", "日期(ddmmyy)", "日期(ABmmdd)", "日期(yymm)" } }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "SECTIONLENGTH", "编码段长度") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterThanZero }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "FIELDNAME", "字段名", FieldSize.Size50) { ControlType = LibControlType.FieldControl, RelProgId = "A.PROGID" }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "SECTIONVALUE", "编码段内容", FieldSize.Size20)); DataSourceHelper.AddColumn(new DefineField(bodyTable, "DYRULEDETAIL", "动态规则明细") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, SubTableIndex = 2 }); DataSourceHelper.AddRemark(bodyTable); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; bodyTable.ExtendedProperties.Add(TableProperty.AllowEmpt, false); this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", tableName, tableDetailName), headTable.Columns[primaryName], bodyTable.Columns[primaryName]); DataTable dyRuleDetailTable = new DataTable(dyRuleDetailName); DataSourceHelper.AddColumn(new DefineField(dyRuleDetailTable, primaryName, "规则代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(dyRuleDetailTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(dyRuleDetailTable); DataSourceHelper.AddRowNo(dyRuleDetailTable); DataSourceHelper.AddColumn(new DefineField(dyRuleDetailTable, "FIELDVALUE", "字段值", FieldSize.Size100) { ControlType = LibControlType.Text, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(dyRuleDetailTable, "SECTIONVALUE", "编码值", FieldSize.Size10) { ControlType = LibControlType.Text, AllowEmpty = false }); DataSourceHelper.AddRemark(dyRuleDetailTable); dyRuleDetailTable.PrimaryKey = new DataColumn[] { dyRuleDetailTable.Columns[primaryName], dyRuleDetailTable.Columns["PARENTROWID"], dyRuleDetailTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(dyRuleDetailTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", tableDetailName, dyRuleDetailName), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { dyRuleDetailTable.Columns[primaryName], dyRuleDetailTable.Columns["PARENTROWID"] }); }
///<summary> ///异常报告单单据类型 数据模型 ///</summary> protected override void BuildDataSet() { this.DataSet = new DataSet(); #region 异常报告单单据类型 主表 DataTable masterTable = new DataTable(tableName); string primaryName = "TYPEID"; DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "单据类型代码", FieldSize.Size50) { DataType = LibDataType.Text, AllowCopy = false, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "TYPENAME", "单据类型名称", FieldSize.Size20) { DataType = LibDataType.NText, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISREPULSE", "可拒绝") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddColumn(new DefineField(masterTable, "DEFAULTCREATESTATE", "缺省创建状态") { AllowEmpty = false, DataType = LibDataType.Int32, ControlType = LibControlType.TextOption, DefaultValue = 1, TextOption = new string[] { "未生效", "生效" } }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["TYPEID"] }; this.DataSet.Tables.Add(masterTable); #endregion #region 异常报告单单据类型 子表 消息传递流程规则配置 DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "单据类型代码", FieldSize.Size50) { DataType = LibDataType.Text, AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITION", "使用条件", FieldSize.Size500) { DataType = LibDataType.Text, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITIONDESC", "使用条件说明", FieldSize.Size200) { DataType = LibDataType.Text }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "FLOWDETAIL", "消息传递流程明细") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, SubTableIndex = 2 }); DataSourceHelper.AddRemark(bodyTable); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", tableName, bodyTableName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName]); #endregion #region 异常报告单单据类型 消息传递流程规则配置 子子表 消息传递流程明细 DataTable subTable = new DataTable(subTableName); DataSourceHelper.AddColumn(new DefineField(subTable, primaryName, "单据类型代码", FieldSize.Size50) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(subTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(subTable); DataSourceHelper.AddRowNo(subTable); DataSourceHelper.AddColumn(new DefineField(subTable, "TRANSMITLEVEL", "传递层级") { DefaultValue = 1, DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterThanZero }); DataSourceHelper.AddColumn(new DefineField(subTable, "PERSONID", "接收人代码", FieldSize.Size20) { #region 人员 AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Person") { RelFields = new RelFieldCollection() { new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "接收人名称"), new RelField("POSITION", LibDataType.NText, FieldSize.Size50, "职位"), new RelField("PHONENO", LibDataType.Text, FieldSize.Size20, "电话"), new RelField("WECHAT", LibDataType.NText, FieldSize.Size50, "微信") } } } #endregion }); DataSourceHelper.AddColumn(new DefineField(subTable, "NEEDSMS", "发短信") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddColumn(new DefineField(subTable, "SENDWECHAT", "发微信") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddColumn(new DefineField(subTable, "CONTROLTIME", "响应时效") { DataType = LibDataType.Double, ControlType = LibControlType.Double }); DataSourceHelper.AddColumn(new DefineField(subTable, "TIMEUNIT", "时间单位") { DataType = LibDataType.Int32, ControlType = LibControlType.TextOption, TextOption = new string[] { "小时", "分钟" } }); DataSourceHelper.AddRemark(subTable); subTable.PrimaryKey = new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"], subTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(subTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", bodyTableName, subTableName), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"] }); #endregion }
protected override void BuildDataSet() { this.DataSet = new DataSet(); DataTable comPerson = new DataTable(comPersonName); DataSourceHelper.AddColumn(new DefineField(comPerson, primaryName, "人员代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(comPerson, "PERSONNAME", "人员名称", FieldSize.Size50) { DataType = LibDataType.NText, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(comPerson, "POSITION", "职位", FieldSize.Size50) { DataType = LibDataType.NText }); DataSourceHelper.AddColumn(new DefineField(comPerson, "NOWPERSON", "员工号", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(comPerson, "GENDER", "性别") { DataType = LibDataType.Int32, ControlType = LibControlType.TextOption, TextOption = new string[] { "男", "女" } }); Dictionary <string, bool> orderBys = new Dictionary <string, bool>(); orderBys.Add("SORTORDER", true); DataSourceHelper.AddColumn(new DefineField(comPerson, "DEPTID", "部门", FieldSize.Size20) { #region 部门 ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Dept") { RelFields = new RelFieldCollection() { new RelField("DEPTNAME", LibDataType.NText, FieldSize.Size50, "部门名称") }, //ContainsSub = true, //ExpandAll=true,//默认全部展开 //SearchFilterCount = 200,//筛选200条 //ParentColumnName = "SUPERDEPTID", //在关联的表中表示父数据的列 //OrderbyColumns = orderBys } }, //ControlType = LibControlType.IdNameTree //以树形结构展示,需要在RelativeSource属性后设置,否则会重置为IdName #endregion }); DataSourceHelper.AddColumn(new DefineField(comPerson, "WECHAT", "微信", FieldSize.Size50) { DataType = LibDataType.NText }); DataSourceHelper.AddColumn(new DefineField(comPerson, "MAIL", "邮箱", FieldSize.Size50) { AllowCopy = false, InputType = InputType.Email }); DataSourceHelper.AddColumn(new DefineField(comPerson, "PHONENO", "手机", FieldSize.Size20) { DataType = LibDataType.Text, ControlType = LibControlType.Text }); //施卢威 20170214 用于集团内部通讯 DataSourceHelper.AddColumn(new DefineField(comPerson, "CORNET", "短号", FieldSize.Size20) { DataType = LibDataType.Text, ControlType = LibControlType.Text }); //施卢威 20170214 用于APP用户头像展示 DataSourceHelper.AddColumn(new DefineField(comPerson, "HEADPORTRAIT", "头像", FieldSize.Size500) { DataType = LibDataType.NText }); DataSourceHelper.AddColumn(new DefineField(comPerson, "ROLETYPE", "人员类型") { AllowCopy = false, DataType = LibDataType.Int32, ControlType = LibControlType.TextOption, TextOption = new string[] { "普通工人", "班组长" }, DefaultValue = 0 }); DataSourceHelper.AddFixColumn(comPerson, this.BillType); comPerson.PrimaryKey = new DataColumn[] { comPerson.Columns["PERSONID"] }; this.DataSet.Tables.Add(comPerson); //#region 人员消息订阅 //DataTable bodyTable = new DataTable(bodyTableName); //DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "人员代码", FieldSize.Size20) { AllowEmpty = false, ReadOnly = true }); //DataSourceHelper.AddRowId(bodyTable); //DataSourceHelper.AddRowNo(bodyTable); //DataSourceHelper.AddColumn(new DefineField(bodyTable, "PROGID", "功能代码", FieldSize.Size50) //{ // AllowEmpty = false, // ControlType = LibControlType.IdName, // RelativeSource = new RelativeSourceCollection(){ // new RelativeSource("axp.FuncList"){ // RelFields = new RelFieldCollection(){ // new RelField("PROGNAME", LibDataType.NText,FieldSize.Size50,"功能名称") // } // } // } //}); //DataSourceHelper.AddColumn(new DefineField(bodyTable, "SUBSCRIBETYPE", "订阅类型") //{ // DataType = LibDataType.Int32, // AllowEmpty = false, // ControlType = LibControlType.TextOption, // TextOption = new string[] { "订阅", "拒收" }, // DefaultValue = 0 //}); //DataSourceHelper.AddColumn(new DefineField(bodyTable, "NOTICETYPE", "渠道类型") //{ // DataType = LibDataType.Int32, // AllowEmpty = false, // ControlType = LibControlType.KeyValueOption, // KeyValueOption = GetNoticeTypeKeyValue(),//根据渠道类型的枚举生成键值对 // DefaultValue = 0 //}); //DataSourceHelper.AddColumn(new DefineField(bodyTable, "CONDITION", "生效条件") { DataType = LibDataType.Binary, ControlType = LibControlType.Text, ReadOnly = true }); //DataSourceHelper.AddColumn(new DefineField(bodyTable, "HASCONDITION", "存在生效条件") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, FieldType = FieldType.Virtual, ReadOnly = true }); //DataSourceHelper.AddColumn(new DefineField(bodyTable, "ISBILLACTION", "操作种类") { ReadOnly = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, SubTableIndex = 2 }); //DataSourceHelper.AddRemark(bodyTable); //bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns["PERSONID"], bodyTable.Columns["ROW_ID"] }; //this.DataSet.Tables.Add(bodyTable); //this.DataSet.Relations.Add(string.Format("{0}_{1}", comPerson, bodyTable), comPerson.Columns["PERSONID"], bodyTable.Columns["PERSONID"]); ////DataTable subTable = new DataTable(subDetailTableName); ////DataSourceHelper.AddColumn(new DefineField(subTable, primaryName, "人员代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); ////DataSourceHelper.AddRowId(subTable, "PARENTROWID", "父行标识"); ////DataSourceHelper.AddRowId(subTable); ////DataSourceHelper.AddRowNo(subTable); ////DataSourceHelper.AddColumn(new DefineField(subTable, "OPERATE", "表单操作") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, ReadOnly = true }); ////DataSourceHelper.AddColumn(new DefineField(subTable, "OPERATEPOWERNAME", "操作", FieldSize.Size50) ////{ //// DataType = LibDataType.NText, ControlType = LibControlType.NText, ReadOnly = true ////}); ////DataSourceHelper.AddColumn(new DefineField(subTable, "CHECK", "选择") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); ////DataSourceHelper.AddRemark(subTable); ////subTable.PrimaryKey = new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"], subTable.Columns["ROW_ID"] }; ////this.DataSet.Tables.Add(subTable); ////this.DataSet.Relations.Add(string.Format("{0}_{1}", bodyTableName, subTableName), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"] }); //#endregion }
/// <summary> /// 创建数据集合 /// </summary> protected override void BuildDataSet() { this.DataSet = new DataSet(); #region 文档目录 //文档目录 DataTable dmDir = new DataTable(dmDirTableName); //目录代码ReadOnly为true是为了通过前台功能按钮来设置 DataSourceHelper.AddColumn(new DefineField(dmDir, dmDirPKID, "目录代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(dmDir, "DIRNAME", "目录名称", FieldSize.Size100) { DataType = LibDataType.NText, AllowEmpty = false, }); //此项仅后台统计本级目录下的文档数,不包含子目录下的文档数 DataSourceHelper.AddColumn(new DefineField(dmDir, "DOCCOUNT", "文档数") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(dmDir, "PARENTDIRID", "父目录代码", FieldSize.Size20) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("dm.Directory") { RelFields = new RelFieldCollection() { new RelField("DIRNAME", LibDataType.NText, FieldSize.Size50, "父目录名称", "PARENTDIRNAME"), new RelField("DIRPATH", LibDataType.NText, FieldSize.Size2000, "父目录存储路径", "PARENTDIRPATH") }, SelConditions = new SelConditionCollection() { //必须是相同目录类型的才能作为父目录,不能引用自身或自身的子目录(BeforeUpdate时再判断) new SelCondition() { Condition = "A.DIRTYPE = @A.DIRTYPE AND A.DIRID<> @A.DIRID " } } } } }); //目录类型只能在创建时根据其对应的根目录类型确定,不可直接修改 DataSourceHelper.AddColumn(new DefineField(dmDir, "DIRTYPE", "目录类型") { DataType = LibDataType.Int32, AllowEmpty = false, ReadOnly = true, ControlType = LibControlType.TextOption, TextOption = new string[] { "公共", "个人" }, DefaultValue = DirTypeEnum.Public, }); //目录在文档库磁盘上的文件夹名称(不包含路径) DataSourceHelper.AddColumn(new DefineField(dmDir, "DIRPATH", "存储路径", FieldSize.Size2000) { DataType = LibDataType.NText, ControlType = LibControlType.NText, ReadOnly = true }); //虚字段 目录链接,根据目录的父目录关系,构造形如"\公共文档\财务部文档"的目录链接地址样式。前端不可修改 DataSourceHelper.AddColumn(new DefineField(dmDir, "DIRLINKADDRESS", "目录链接", FieldSize.Size2000) { ControlType = LibControlType.Id, ReadOnly = true, FieldType = FieldType.Virtual }); //用于同一级目录下的子目录排序 DataSourceHelper.AddColumn(new DefineField(dmDir, "SORTORDER", "目录排序") { DataType = LibDataType.Int32, ControlType = LibControlType.Number }); DataSourceHelper.AddFixColumn(dmDir, BillType); #region 为显示目录下的文档信息添加的虚字段 DataSourceHelper.AddColumn(new DefineField(dmDir, "DOCID", "文档编号", FieldSize.Size50) { DataType = LibDataType.Text, AllowCopy = false, FieldType = FieldType.Virtual }); DataSourceHelper.AddColumn(new DefineField(dmDir, "DOCNAME", "文档名称", FieldSize.Size200) { DataType = LibDataType.NText, ReadOnly = true, FieldType = FieldType.Virtual }); //如果类型是目录,则为目录名 //是否是目录,此字段为虚字段,后台设置,用于向前端传递信息 DataSourceHelper.AddColumn(new DefineField(dmDir, "ISDIR", "是否目录") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, FieldType = FieldType.Virtual }); //如txt,doc等,如果用于展示目录信息则此项固定为“目录” DataSourceHelper.AddColumn(new DefineField(dmDir, "DOCTYPE", "类型", FieldSize.Size20) { DataType = LibDataType.NText, ReadOnly = true, FieldType = FieldType.Virtual }); DataSourceHelper.AddColumn(new DefineField(dmDir, "LOCKSTATE", "锁定状态") { DataType = LibDataType.Int32, ReadOnly = true, ControlType = LibControlType.TextOption, TextOption = new string[] { "未锁定", "已锁定" }, FieldType = FieldType.Virtual }); //此项仅后台设置的文档的大小,以M为单位,保留2位小数 DataSourceHelper.AddColumn(new DefineField(dmDir, "DOCSIZE", "大小(M)") { DataType = LibDataType.Numeric, ControlType = LibControlType.Double, Precision = 2, ReadOnly = true, FieldType = FieldType.Virtual }); //此路径为文档的多个修订版和设定版文件所在的目录名称(不包含其他路径) DataSourceHelper.AddColumn(new DefineField(dmDir, "SAVEPATH", "文档存储路径", FieldSize.Size2000) { DataType = LibDataType.NText, ControlType = LibControlType.NText, ReadOnly = true, FieldType = FieldType.Virtual }); #endregion dmDir.PrimaryKey = new DataColumn[] { dmDir.Columns[dmDirPKID] }; this.DataSet.Tables.Add(dmDir); #endregion #region 文档目录的权限 //文档目录的权限 DataTable dmDirPermission = new DataTable(dmDirPermissionTableName); DataSourceHelper.AddColumn(new DefineField(dmDirPermission, "DIRID", "目录代码", FieldSize.Size20) { ControlType = LibControlType.Id, AllowEmpty = false, ReadOnly = true }); DataSourceHelper.AddRowId(dmDirPermission); DataSourceHelper.AddRowNo(dmDirPermission); //权限拥有者类型,如部门、用户组、个人,如果此权限是属于部门的,则部门下的所有人都有相应的权限 DataSourceHelper.AddColumn(new DefineField(dmDirPermission, "BELONGTYPE", "拥有者类型") { DataType = LibDataType.Int32, AllowEmpty = false, ControlType = LibControlType.TextOption, TextOption = new string[] { "部门", "用户组", "个人" } }); //此项根据拥有者类型确定是部门代码,还是个人或用户组代码(后续扩展) DataSourceHelper.AddColumn(new DefineField(dmDirPermission, "BELONGID", "拥有者代码", FieldSize.Size20) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Dept") { GroupCondation = "B.BELONGTYPE=0", GroupIndex = 0, //RelPK="A.DEPTID", RelFields = new RelFieldCollection() { new RelField("DEPTNAME", LibDataType.NText, FieldSize.Size50, "部门名称") //如果拥有者类型是部门的则代码是部门代码,名称显示部门名称 } //, ////测试更多列属性用于关键字筛选 //IdNameFilterFields=new RelFieldCollection() //{ // new RelField("CREATORID",LibDataType.NText,FieldSize.Size20,"创建者标识"), // new RelField("CREATETIME",LibDataType.Int32,FieldSize.Size20,"时间"), //} }, new RelativeSource("com.Person") { GroupCondation = "B.BELONGTYPE=2", GroupIndex = 1, //RelPK="A.PERSONID", RelFields = new RelFieldCollection() { new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "人员名称")//如果拥有者类型是个人的则代码是个人代码,名称显示人员名称 } } } }); //是否设置了操作权限 DataSourceHelper.AddColumn(new DefineField(dmDirPermission, "ISOPERATEPOWER", "操作权限") { ReadOnly = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, SubTableIndex = 2 }); //权限值,是权限项组合的按位与 得出的Int32值。通过SubBill的页面获得 DataSourceHelper.AddColumn(new DefineField(dmDirPermission, "OPERATEMARK", "操作权限标识") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, ReadOnly = true }); dmDirPermission.PrimaryKey = new DataColumn[] { dmDirPermission.Columns["DIRID"], dmDirPermission.Columns["ROW_ID"] }; this.DataSet.Tables.Add(dmDirPermission); this.DataSet.Relations.Add(string.Format("{0}_{1}", dmDirTableName, dmDirPermissionTableName), new DataColumn[] { dmDir.Columns[dmDirPKID] }, new DataColumn[] { dmDirPermission.Columns[dmDirPKID] }); #endregion #region 操作权限SubBill DataTable subTable = new DataTable(dmSubTableName); DataSourceHelper.AddColumn(new DefineField(subTable, dmDirPKID, "目录代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(subTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(subTable); DataSourceHelper.AddRowNo(subTable); DataSourceHelper.AddColumn(new DefineField(subTable, "OPERATEPOWERID", "操作代码") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(subTable, "OPERATEPOWERNAME", "操作", FieldSize.Size50) { DataType = LibDataType.NText, ControlType = LibControlType.NText, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(subTable, "CANUSE", "具备权限") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddRemark(subTable); subTable.PrimaryKey = new DataColumn[] { subTable.Columns[dmDirPKID], subTable.Columns["PARENTROWID"], subTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(subTable); this.DataSet.Relations.Add(PermissionDetailSubRelationName, new DataColumn[] { dmDirPermission.Columns[dmDirPKID], dmDirPermission.Columns["ROW_ID"] }, new DataColumn[] { subTable.Columns[dmDirPKID], subTable.Columns["PARENTROWID"] }); #endregion }
protected override void BuildDataSet() { this.DataSet = new DataSet(); DataTable comDept = new DataTable(comDeptName); DataSourceHelper.AddColumn(new DefineField(comDept, "DEPTID", "部门代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(comDept, "DEPTNAME", "部门名称", FieldSize.Size50) { DataType = LibDataType.NText, AllowEmpty = false }); Dictionary <string, bool> orderBys = new Dictionary <string, bool>(); orderBys.Add("SORTORDER", true); DataSourceHelper.AddColumn(new DefineField(comDept, "SUPERDEPTID", "上级部门", FieldSize.Size20) { RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Dept") { RelFields = new RelFieldCollection() { new RelField("DEPTNAME", LibDataType.NText, FieldSize.Size50, "上级部门名称", "PARENTDEPTNAME") }, ContainsSub = false, //不显示子数据 ExpandAll = true, //默认全部展开 SearchFilterCount = 200, //筛选200条 ParentColumnName = "SUPERDEPTID", OrderbyColumns = orderBys } }, ControlType = LibControlType.IdNameTree //以树形结构展示,需要在RelativeSource属性后设置,否则会重置为IdName }); DataSourceHelper.AddColumn(new DefineField(comDept, "SORTORDER", "序号") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero, Precision = 0, DefaultValue = 0, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(comDept, "DEPTLEVEL", "部门级别") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero, Precision = 0, DefaultValue = 0, AllowEmpty = false }); DataSourceHelper.AddFixColumn(comDept, BillType); comDept.PrimaryKey = new DataColumn[] { comDept.Columns["DEPTID"] }; this.DataSet.Tables.Add(comDept); #region 部门岗位人员表 //部门下的各个岗位对应的人员 DataTable comDeptDutyPerson = new DataTable(comDeptDutyPersonName); DataSourceHelper.AddColumn(new DefineField(comDeptDutyPerson, "DEPTID", "部门代码", FieldSize.Size20) { ControlType = LibControlType.Id, AllowEmpty = false, ReadOnly = true }); DataSourceHelper.AddRowId(comDeptDutyPerson); DataSourceHelper.AddRowNo(comDeptDutyPerson); //岗位 DataSourceHelper.AddColumn(new DefineField(comDeptDutyPerson, "DUTYID", "岗位", FieldSize.Size20) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Duty") { RelFields = new RelFieldCollection() { new RelField("DUTYNAME", LibDataType.NText, FieldSize.Size50, "岗位名称") } } } }); //人员 DataSourceHelper.AddColumn(new DefineField(comDeptDutyPerson, "PERSONID", "人员", FieldSize.Size20) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Person") { RelFields = new RelFieldCollection() { new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "人员名称") } } } }); //岗位任职表中相同岗位的高低序号,对于一个部门中同一岗位下有多个人时,可按照序号从小到大表示职位在部门内的从高到低顺序,例如第一副经理、第二副经理 DataSourceHelper.AddColumn(new DefineField(comDeptDutyPerson, "PERSONORDER", "序号") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero, Precision = 0, DefaultValue = 0, AllowEmpty = false }); DataSourceHelper.AddRemark(comDeptDutyPerson);//备注 //comDeptDutyPerson.ExtendedProperties.Add(TableProperty.UsingApproveRow, true);//启用行审核的测试 //DataSourceHelper.AddApproveRowFixColumn(comDeptDutyPerson); comDeptDutyPerson.PrimaryKey = new DataColumn[] { comDeptDutyPerson.Columns["DEPTID"], comDeptDutyPerson.Columns["ROW_ID"] }; this.DataSet.Tables.Add(comDeptDutyPerson); this.DataSet.Relations.Add(string.Format("{0}_{1}", comDeptName, comDeptDutyPersonName), new DataColumn[] { comDept.Columns["DEPTID"] }, new DataColumn[] { comDeptDutyPerson.Columns["DEPTID"] }); #endregion }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "APPROVEFLOWID"; DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "审核流配置代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "APPROVEFLOWNAME", "审核流配置名称", FieldSize.Size50) { AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGID", "功能代码", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "功能名称") } } } }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISAPPROVEROW", "行记录审核") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); //Zhangkj 20170322 DataSourceHelper.AddColumn(new DefineField(masterTable, "CANEDITWHENDOING", "审核中可修改") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "CANEDITWHENDONE", "审核后可修改") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "CANDELETEWHENDONE", "审核后可删除") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = false }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] }; this.DataSet.Tables.Add(masterTable); DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "审核流配置代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITION", "使用条件", FieldSize.Size500) { ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITIONDESC", "使用条件说明", FieldSize.Size200)); //审核流程的排序号 Zhangkj 20170322 DataSourceHelper.AddColumn(new DefineField(bodyTable, "SORTORDER", "序号") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero, Precision = 0, DefaultValue = 0, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "FLOWDETAIL", "审核流程明细") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, SubTableIndex = 2 }); DataSourceHelper.AddRemark(bodyTable); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName]); DataTable subTable = new DataTable(subTableName); DataSourceHelper.AddColumn(new DefineField(subTable, primaryName, "审核流配置代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(subTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(subTable); DataSourceHelper.AddRowNo(subTable); DataSourceHelper.AddColumn(new DefineField(subTable, "FLOWLEVEL", "审核层级") { DefaultValue = 1, DataType = LibDataType.Int32, ControlType = LibControlType.Number, Precision = 0, QtyLimit = LibQtyLimit.GreaterThanZero }); DataSourceHelper.AddColumn(new DefineField(subTable, "PERSONID", "审核人代码", FieldSize.Size20) { //AllowEmpty = false, //具体审核人和岗位两个只要有一个填写了就可以 ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Person") { RelFields = new RelFieldCollection() { new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "审核人名称"), new RelField("POSITION", LibDataType.NText, FieldSize.Size50, "职位") } } } }); Dictionary <string, bool> orderBys = new Dictionary <string, bool>(); orderBys.Add("SORTORDER", true); DataSourceHelper.AddColumn(new DefineField(subTable, "DEPTID", "部门代码", FieldSize.Size20) { RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Dept") { RelFields = new RelFieldCollection() { new RelField("DEPTNAME", LibDataType.NText, FieldSize.Size50, "部门名称") }, ContainsSub = true, ExpandAll = true, //默认全部展开 SearchFilterCount = 200, //筛选200条 ParentColumnName = "SUPERDEPTID", //在关联的表中表示父数据的列 OrderbyColumns = orderBys } }, ControlType = LibControlType.IdNameTree //以树形结构展示,需要在RelativeSource属性后设置,否则会重置为IdName }); //动态部门字段 DataSourceHelper.AddColumn(new DefineField(subTable, "DEPTIDCOLUMN", "动态部门字段", FieldSize.Size400) { ControlType = LibControlType.KeyValueOption, KeyValueOption = new LibTextOptionCollection() { new LibTextOption() { Key = "", Value = "" } } }); DataSourceHelper.AddColumn(new DefineField(subTable, "DUTYID", "岗位代码", FieldSize.Size20) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Duty") { RelFields = new RelFieldCollection() { new RelField("DUTYNAME", LibDataType.NText, FieldSize.Size50, "岗位名称"), new RelField("DUTYLEVEL", LibDataType.NText, FieldSize.Size50, "职务级别"), } } } }); //启用了岗位上溯则会在找不到岗位时查找本部门的更高级岗位。默认为false DataSourceHelper.AddColumn(new DefineField(subTable, "ISDUTYUP", "岗位上溯") { DefaultValue = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); //启用了部门上溯则会在找不到岗位时查找上级部门中的岗位。默认为true DataSourceHelper.AddColumn(new DefineField(subTable, "ISDEPTUP", "部门上溯") { DefaultValue = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); //审核人不能是提交人本人。默认为true DataSourceHelper.AddColumn(new DefineField(subTable, "NOTSELF", "非本人") { DefaultValue = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); //审核人必须是职级比自己高的人。仅对于通过提交人直属组织树查找到岗位有效,也就是未通过“部门”和“动态部门字段”确定部门,而是通过提交人的所属部门查找到的岗位 DataSourceHelper.AddColumn(new DefineField(subTable, "MUSTHIGHLEVEL", "职级高") { DefaultValue = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); //是否可跳过。当根据配置找不到具体执行人时,如果可跳过则跳过此审核过程,否则认为找不到执行人、审核流配置有误 DataSourceHelper.AddColumn(new DefineField(subTable, "CANJUMP", "可跳过") { DefaultValue = false, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); //同人默认”配置:如果本次审核过程的审核执行人与之前的审核过程中审核执行人是同一个人,则默认为本次审核过程与之前的一致。默认为true,即同一个审核执行人对同一个单据的同一次提交审核一次给出意见即可 DataSourceHelper.AddColumn(new DefineField(subTable, "ISSAMEDEFAULT", "同人默认") { DefaultValue = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddColumn(new DefineField(subTable, "INDEPENDENT", "独立决策权") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddRemark(subTable); subTable.PrimaryKey = new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"], subTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(subTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", bodyTableName, subTableName), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"] }); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "CALENDARID"; DataTable mainTable = new DataTable(mainTableName); DataSourceHelper.AddColumn(new DefineField(mainTable, primaryName, "行事历代码", FieldSize.Size20) { AllowCopy = false, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(mainTable, "CALENDARNAME", "行事历名称", FieldSize.Size50) { AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(mainTable, "ISWORKSATURDAY", "周六上班") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddColumn(new DefineField(mainTable, "ISWORKSUNDAY", "周日上班") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddFixColumn(mainTable, this.BillType); mainTable.PrimaryKey = new DataColumn[] { mainTable.Columns[primaryName] }; this.DataSet.Tables.Add(mainTable); DataTable subTable = new DataTable(subTableName); DataSourceHelper.AddColumn(new DefineField(subTable, primaryName, "行事历代码", FieldSize.Size20) { AllowCopy = false, AllowEmpty = false }); DataSourceHelper.AddRowId(subTable); DataSourceHelper.AddRowNo(subTable); DataSourceHelper.AddColumn(new DefineField(subTable, "YEAR", "年份") { DataType = LibDataType.Int32, AllowEmpty = false, ControlType = LibControlType.Number }); DataSourceHelper.AddColumn(new DefineField(subTable, "MONTH", "月份") { DataType = LibDataType.Int32, ControlType = LibControlType.Number }); DataSourceHelper.AddColumn(new DefineField(subTable, "WEEKDAY", "工作日") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(subTable, "NONWORKDAY", "非工作日") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(subTable, "HOLIDAYDETAIL", "节假日明细") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, SubTableIndex = 2 }); DataSourceHelper.AddColumn(new DefineField(subTable, "WORKMARK", "工作日标识") { DataType = LibDataType.Int32, ReadOnly = true }); subTable.PrimaryKey = new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["ROW_ID"] }; subTable.ExtendedProperties.Add(TableProperty.AllowEmpt, false); this.DataSet.Tables.Add(subTable); this.DataSet.Relations.Add(new DataRelation(string.Format("{0}_{1}", mainTableName, subTableName), mainTable.Columns[primaryName], subTable.Columns[primaryName])); DataTable holidayDetailTable = new DataTable(holidayTableName); DataSourceHelper.AddColumn(new DefineField(holidayDetailTable, primaryName, "行事历代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(holidayDetailTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(holidayDetailTable); DataSourceHelper.AddRowNo(holidayDetailTable); DataSourceHelper.AddColumn(new DefineField(holidayDetailTable, "HOLIDAYDATE", "日期") { DataType = LibDataType.Int32, ControlType = LibControlType.Date, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(holidayDetailTable, "ISWORK", "是否上班") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddRemark(holidayDetailTable); holidayDetailTable.PrimaryKey = new DataColumn[] { holidayDetailTable.Columns[primaryName], holidayDetailTable.Columns["PARENTROWID"], holidayDetailTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(holidayDetailTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", subTableName, holidayTableName), new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["ROW_ID"] }, new DataColumn[] { holidayDetailTable.Columns[primaryName], holidayDetailTable.Columns["PARENTROWID"] }); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "GUID"; DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, "GUID", "唯一标识", FieldSize.Size50) { AllowEmpty = false, ReadOnly = true }); DataSourceHelper.AddRowId(masterTable); DataSourceHelper.AddColumn(new DefineField(masterTable, "SRCPROGID", "源单代码", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "源单名称", "SRCPROGNAME") } } } }); DataSourceHelper.AddColumn(new DefineField(masterTable, "SRCTYPEID", "源单类型", FieldSize.Size50) { AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "OBJPROGID", "目的单代码", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "目的单名称", "OBJPROGNAME") } } } }); DataSourceHelper.AddColumn(new DefineField(masterTable, "CONDITION", "条件", FieldSize.Size500)); DataSourceHelper.AddColumn(new DefineField(masterTable, "ENABLE", "启用") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = 1 }); DataSourceHelper.AddColumn(new DefineField(masterTable, "SETDATADETAIL", "赋值明细表") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, SubTableIndex = 1, ReadOnly = true }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName], masterTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(masterTable); DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, "GUID", "唯一标识", FieldSize.Size50) { ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "PARENTROW_ID", "父行标识") { ReadOnly = true, DataType = LibDataType.Int32, ControlType = LibControlType.Text }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "SRCPROGID", "源单代码", FieldSize.Size50) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "源单名称", "SRCPROGNAME") } } } }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "OBJPROGID", "目的单代码", FieldSize.Size50) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "目的单名称", "OBJPROGNAME") } } } }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "SRCTABLEINDEX", "源单表索引") { DataType = LibDataType.Int32, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "SRCFIELDNAME", "源单字段名", FieldSize.Size20) { ControlType = LibControlType.FieldControl, RelProgId = "B.SRCPROGID", AllowEmpty = false, RelTableIndex = "B.SRCTABLEINDEX" }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "OBJTABLEINDEX", "目的单表索引") { DataType = LibDataType.Int32, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "OBJFIELDNAME", "目的单字段名", FieldSize.Size20) { ControlType = LibControlType.FieldControl, RelProgId = "B.OBJPROGID", AllowEmpty = false, RelTableIndex = "B.OBJTABLEINDEX" }); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["PARENTROW_ID"], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); //this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName]); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), new DataColumn[] { masterTable.Columns["GUID"], masterTable.Columns["ROW_ID"], masterTable.Columns["SRCPROGID"], masterTable.Columns["OBJPROGID"] }, new DataColumn[] { bodyTable.Columns["GUID"], bodyTable.Columns["PARENTROW_ID"], bodyTable.Columns["SRCPROGID"], bodyTable.Columns["OBJPROGID"] }); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "TASKID"; DataTable masterTable = new DataTable(tableName); DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "任务代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "TASKNAME", "任务名称", FieldSize.Size50) { DataType = LibDataType.NText, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGID", "功能代码", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "功能名称") } } } }); DataSourceHelper.AddColumn(new DefineField(masterTable, "BUSINESSTASKID", "业务任务", FieldSize.Size100) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.BusinessTask") { RelPK = "A.PROGID", RelFields = new RelFieldCollection() { new RelField("BUSINESSTASKNAME", LibDataType.NText, FieldSize.Size50, "业务任务名称") { DataType = LibDataType.NText } } } } }); DataSourceHelper.AddColumn(new DefineField(masterTable, "CALENDARID", "行事历", FieldSize.Size20) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Calendar") { RelFields = new RelFieldCollection() { new RelField("CALENDARNAME", LibDataType.NText, FieldSize.Size50, "行事历名称") { DataType = LibDataType.NText } } } } }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISJUSTWORKDAY", "仅工作日") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddColumn(new DefineField(masterTable, "EXECDATE", "指定执行日期") { DataType = LibDataType.Int32, ControlType = LibControlType.Date }); DataSourceHelper.AddColumn(new DefineField(masterTable, "INTERVALTIME", "间隔执行分钟") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISMONDAY", "周一") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISTUESDAY", "周二") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISWEDNESDAY", "周三") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISTHURSDAY", "周四") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISFRIDAY", "周五") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISSATURDAY", "周六") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISSUNDAY", "周日") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "REPEATDATEMARK", "重复日期标识") { DataType = LibDataType.Int32, ReadOnly = true, ControlType = LibControlType.Number }); DataSourceHelper.AddColumn(new DefineField(masterTable, "EXECCONDITION", "执行条件") { DataType = LibDataType.Binary, ControlType = LibControlType.Text, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "TITLE", "发送信息标题", FieldSize.Size200) { DataType = LibDataType.NText, ControlType = LibControlType.NText, ColumnSpan = 4 }); DataSourceHelper.AddColumn(new DefineField(masterTable, "MAINCONTENT", "发送信息", FieldSize.Size500) { DataType = LibDataType.NText, ControlType = LibControlType.NText, ColumnSpan = 4, RowSpan = 2 }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] }; this.DataSet.Tables.Add(masterTable); DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "任务代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "EXECTIME", "执行时间点") { DataType = LibDataType.Int32, ControlType = LibControlType.HourMinute }); DataSourceHelper.AddRemark(bodyTable); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(new DataRelation(string.Format("{0}_{1}", tableName, bodyTableName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName])); DataTable subTable = new DataTable(subTableName); DataSourceHelper.AddColumn(new DefineField(subTable, primaryName, "任务代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(subTable); DataSourceHelper.AddRowNo(subTable); DataSourceHelper.AddColumn(new DefineField(subTable, "PERSONID", "人员代码", FieldSize.Size20) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Person") { RelFields = new RelFieldCollection() { new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "人员名称"), new RelField("DEPTID", LibDataType.Text, FieldSize.Size20, "部门") { ControlType = LibControlType.IdName }, new RelField("DEPTNAME", LibDataType.NText, FieldSize.Size50, "部门名称") { ControlType = LibControlType.NText } } } } }); DataSourceHelper.AddRemark(subTable); subTable.PrimaryKey = new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(subTable); this.DataSet.Relations.Add(new DataRelation(string.Format("{0}_{1}", tableName, subTable), masterTable.Columns[primaryName], subTable.Columns[primaryName])); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "Id"; DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "用户账号", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "Name", "用户名称", FieldSize.Size50)); DataSourceHelper.AddColumn(new DefineField(masterTable, "Password", "用户密码", FieldSize.Size50) { AllowCondition = false, InputType = InputType.Password }); DataSourceHelper.AddColumn(new DefineField(masterTable, "UserImage", "用户头像", FieldSize.Size50)); DataSourceHelper.AddColumn(new DefineField(masterTable, "PERSONID", "人员代码", FieldSize.Size20) { ControlType = LibControlType.IdName, SelectSql = "Select A.PERSONID as Id,A.PERSONNAME as Name From COMPERSON A", SelectFields = "A.PERSONNAME", RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Person") { RelFields = new RelFieldCollection() { new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "人员名称"), //new RelField("PHONENO",LibDataType.Text,FieldSize.Size20,"手机","PERSONPHONE"), //new RelField("CORNET",LibDataType.Text,FieldSize.Size20,"短号","PERSONPHONENO"), //new RelField("HEADPORTRAIT",LibDataType.NText,FieldSize.Size500,"头像","PERSONHEADPORTRAIT"), //new RelField("MAIL",LibDataType.Text,FieldSize.Size50,"邮箱","PERSONMAIL") } } } }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ROLEID", "角色", FieldSize.Size20) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.Role") { RelFields = new RelFieldCollection() { new RelField("ROLENAME", LibDataType.NText, FieldSize.Size50, "角色名称") } } } }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PhoneId", "手机标识", FieldSize.Size50) { AllowCondition = false, InputType = InputType.Password }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ISUSE", "启用") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "WALLPAPER", "壁纸", FieldSize.Size100) { DataType = LibDataType.NText, ControlType = LibControlType.NText, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(masterTable, "WALLPAPERSTRETCH", "充满桌面") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, DefaultValue = true }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] }; this.DataSet.Tables.Add(masterTable); ///* // 系统账户对应的各个APP信息 DataTable bodyTable = new DataTable(tableAppName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "用户账号", FieldSize.Size20)); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); LibTextOptionCollection appTypeOptionList = new LibTextOptionCollection(); appTypeOptionList.Add(new LibTextOption() { Key = ((int)AppType.LeaderMobile).ToString(), Value = "App" }); appTypeOptionList.Add(new LibTextOption() { Key = ((int)AppType.PDA).ToString(), Value = "PDA" }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "CLIENTTYPE", "APP类型") { DataType = LibDataType.Int32, ControlType = LibControlType.KeyValueOption,// 需要以键值对的形式给出选项,以便Int32的值可以与枚举项的值对应 KeyValueOption = appTypeOptionList }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "CLIENTID", "客户端ID", FieldSize.Size100)); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, tableAppName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName]); // 账户可以登录的网站 DataTable siteTable = new DataTable(siteTableName); DataSourceHelper.AddColumn(new DefineField(siteTable, primaryName, "用户账号", FieldSize.Size20)); DataSourceHelper.AddRowId(siteTable); DataSourceHelper.AddRowNo(siteTable); DataSourceHelper.AddColumn(new DefineField(siteTable, "SITEID", "站点", FieldSize.Size20) { RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.LinkSite") { RelFields = new RelFieldCollection() { new RelField("SHORTNAME", LibDataType.NText, FieldSize.Size100, "站点名称") } } } }); siteTable.PrimaryKey = new DataColumn[] { siteTable.Columns[primaryName], siteTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(siteTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, siteTableName), masterTable.Columns[primaryName], siteTable.Columns[primaryName]); //*/ }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "PRINTTPLID"; DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "打印模板代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PRINTTPLNAME", "打印模板名称", FieldSize.Size50) { AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGID", "功能代码", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "功能名称") } } } }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] }; this.DataSet.Tables.Add(masterTable); DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "打印模板代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITION", "使用条件", FieldSize.Size500)); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITIONDESC", "使用条件说明", FieldSize.Size200)); DataSourceHelper.AddColumn(new DefineField(bodyTable, "PRINTDETAIL", "打印明细") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, SubTableIndex = 2 }); DataSourceHelper.AddRemark(bodyTable); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName]); DataTable subTable = new DataTable(subTableName); DataSourceHelper.AddColumn(new DefineField(subTable, primaryName, "打印模板代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(subTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(subTable); DataSourceHelper.AddRowNo(subTable); DataSourceHelper.AddColumn(new DefineField(subTable, "ISTPL", "模板设计") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(subTable, "FIELDDETAIL", "字段明细") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, SubTableIndex = 3 }); DataSourceHelper.AddColumn(new DefineField(subTable, "TPLJS", "模板脚本") { DataType = LibDataType.Binary, ControlType = LibControlType.NText, ReadOnly = true }); DataSourceHelper.AddRemark(subTable); subTable.PrimaryKey = new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"], subTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(subTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", bodyTableName, subTableName), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"] }); DataTable mapTable = new DataTable(mapTableName); DataSourceHelper.AddColumn(new DefineField(mapTable, primaryName, "打印模板代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(mapTable, "GRANDFATHERROWID", "主行标识"); DataSourceHelper.AddRowId(mapTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(mapTable); DataSourceHelper.AddRowNo(mapTable); DataSourceHelper.AddColumn(new DefineField(mapTable, "TPLPARAM", "参数", FieldSize.Size50) { DataType = LibDataType.Text, ControlType = LibControlType.Text, ReadOnly = true, AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(mapTable, "TABLEINDEX", "对应表索引") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero }); DataSourceHelper.AddColumn(new DefineField(mapTable, "FIELDNAME", "对应字段", FieldSize.Size50) { ControlType = LibControlType.FieldControl, RelProgId = "A.PROGID", AllowEmpty = false, RelTableIndex = "C.TABLEINDEX" }); DataSourceHelper.AddRemark(mapTable); mapTable.PrimaryKey = new DataColumn[] { mapTable.Columns[primaryName], mapTable.Columns["GRANDFATHERROWID"], mapTable.Columns["PARENTROWID"], mapTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(mapTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", subTableName, mapTableName), new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"], subTable.Columns["ROW_ID"] }, new DataColumn[] { mapTable.Columns[primaryName], mapTable.Columns["GRANDFATHERROWID"], mapTable.Columns["PARENTROWID"] }); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "BILLNO"; DataTable headTable = new DataTable(tableName); DataSourceHelper.AddColumn(new DefineField(headTable, primaryName, "单据编号", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false, DataType = LibDataType.Text }); DataSourceHelper.AddColumn(new DefineField(headTable, "TYPEID", "单据类型", FieldSize.Size20) { AllowEmpty = false, DataType = LibDataType.Text, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.LiaisonType") { RelFields = new RelFieldCollection() { new RelField("TYPENAME", LibDataType.NText, FieldSize.Size50, "单据类型名称") } } } }); DataSourceHelper.AddBillDate(headTable); DataSourceHelper.AddColumn(new DefineField(headTable, "PRIORITYSTATE", "急缓程度") { DataType = LibDataType.Int32, ControlType = LibControlType.TextOption, DefaultValue = 1, TextOption = new string[] { "轻缓", "普通", "紧急" } }); DataSourceHelper.AddColumn(new DefineField(headTable, "PERSONID", "接收人", FieldSize.Size20) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Person") { RelFields = new RelFieldCollection() { new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "接收人名称") }, SetValueFields = new SetValueFieldCollection() { new SetValueField("DEPTID"), new SetValueField("DEPTNAME") } } } }); DataSourceHelper.AddColumn(new DefineField(headTable, "DEPTID", "接收部门", FieldSize.Size20) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Dept") { RelFields = new RelFieldCollection() { new RelField("DEPTNAME", LibDataType.NText, FieldSize.Size50, "接收部门名称") } } } }); DataSourceHelper.AddColumn(new DefineField(headTable, "TITLE", "主题", FieldSize.Size200) { ColumnSpan = 3, RowSpan = 1 }); DataSourceHelper.AddColumn(new DefineField(headTable, "MAINCONTENT", "主要内容", FieldSize.Size1000) { ColumnSpan = 2, RowSpan = 4 }); DataSourceHelper.AddColumn(new DefineField(headTable, "REPLYCONTENT", "回执情况", FieldSize.Size1000) { ColumnSpan = 2, RowSpan = 4 }); DataSourceHelper.AddColumn(new DefineField(headTable, "SENDPERSONID", "签发人", FieldSize.Size20) { AllowEmpty = false, DataType = LibDataType.Text, ControlType = LibControlType.NText, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Person") { RelFields = new RelFieldCollection() { new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "签发人名称", "SENDPERSONNAME"), new RelField("DEPTID", LibDataType.Text, FieldSize.Size50, "签发部门", "SENDDEPTID") { ControlType = LibControlType.IdName }, new RelField("DEPTNAME", LibDataType.NText, FieldSize.Size50, "签发部门名称", "SENDDEPTNAME") } } } }); DataSourceHelper.AddColumn(new DefineField(headTable, "INFOID", "附带信息", FieldSize.Size100) { ColumnSpan = 1, ReadOnly = true }); DataSourceHelper.AddFixColumn(headTable, this.BillType); headTable.PrimaryKey = new DataColumn[] { headTable.Columns[primaryName] }; this.DataSet.Tables.Add(headTable); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); #region 单据业务流配置 主表 string primaryName = "BUSINESSFLOWCONFIGID"; DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "业务流配置代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false, ControlType = LibControlType.Text }); DataSourceHelper.AddColumn(new DefineField(masterTable, "BUSINESSFLOWCONFIGNAME", "业务流配置名称", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.NText }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGID", "功能代码", FieldSize.Size50) { #region 功能清单 AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "功能名称") } } } #endregion }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] }; this.DataSet.Tables.Add(masterTable); #endregion #region 单据业务流配置 子表 单据业务流配置规则配置 DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "业务流配置代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false, ControlType = LibControlType.Text }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITION", "使用条件", FieldSize.Size500) { DataType = LibDataType.Text, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITIONDESC", "使用条件说明", FieldSize.Size200) { DataType = LibDataType.Text }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "BUSINESSPUSHFLOWDETAIL", "业务流配置明细") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, SubTableIndex = 2 }); DataSourceHelper.AddRemark(bodyTable); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName]); #endregion #region 单据业务流配置 单据业务流配置规则配置 子子表 业务流配置明细 DataTable subTable = new DataTable(subTableName); DataSourceHelper.AddColumn(new DefineField(subTable, primaryName, "业务流配置代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false, ControlType = LibControlType.Text }); DataSourceHelper.AddRowId(subTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(subTable); DataSourceHelper.AddRowNo(subTable); DataSourceHelper.AddColumn(new DefineField(subTable, "PERSONID", "接收人代码", FieldSize.Size20) { #region 人员 AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("com.Person") { RelFields = new RelFieldCollection() { new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "接收人名称"), new RelField("POSITION", LibDataType.NText, FieldSize.Size50, "职位"), new RelField("PHONENO", LibDataType.Text, FieldSize.Size20, "电话"), new RelField("WECHAT", LibDataType.NText, FieldSize.Size50, "微信") } } } #endregion }); DataSourceHelper.AddColumn(new DefineField(subTable, "NEEDSMS", "发短信") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddColumn(new DefineField(subTable, "SENDWECHAT", "发微信") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddRemark(subTable); subTable.PrimaryKey = new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"], subTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(subTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", bodyTableName, subTableName), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"] }); #endregion }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "PERMISSIONGROUPID"; DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "权限组代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PERMISSIONGROUPNAME", "权限组名称", FieldSize.Size50) { AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PARENTGROUPID", "父权限组", FieldSize.Size50) { ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.PermissionGroup") { RelFields = new RelFieldCollection() { new RelField("PERMISSIONGROUPNAME", LibDataType.NText, FieldSize.Size50, "父权限组名称", "PARENTGROUPNAME") } } } }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] }; this.DataSet.Tables.Add(masterTable); DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "权限组代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "PROGID", "功能代码", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "功能名称") } } } }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "SHOWCONDITION", "浏览条件") { DataType = LibDataType.Binary, ControlType = LibControlType.Text, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "HASSHOWCONDITION", "存在浏览条件") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, FieldType = FieldType.Virtual, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "ISOPERATEPOWER", "操作权限") { ReadOnly = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, SubTableIndex = 2 }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "ISFIELDPOWER", "字段权限") { ReadOnly = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, SubTableIndex = 3 }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "ISBUTTONPOWER", "功能权限") { ReadOnly = true, DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, SubTableIndex = 4 }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "OPERATEMARK", "操作权限标识") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, ReadOnly = true }); DataSourceHelper.AddRemark(bodyTable); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName]); DataTable subTable = new DataTable(subTableName); DataSourceHelper.AddColumn(new DefineField(subTable, primaryName, "权限组代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(subTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(subTable); DataSourceHelper.AddRowNo(subTable); DataSourceHelper.AddColumn(new DefineField(subTable, "OPERATEPOWERID", "操作代码") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(subTable, "OPERATEPOWERNAME", "操作", FieldSize.Size50) { DataType = LibDataType.NText, ControlType = LibControlType.NText, ReadOnly = true }); DataSourceHelper.AddColumn(new DefineField(subTable, "CANUSE", "具备权限") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo }); DataSourceHelper.AddRemark(subTable); subTable.PrimaryKey = new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"], subTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(subTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", bodyTableName, subTableName), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"] }); DataTable fieldTable = new DataTable(fieldTableName); DataSourceHelper.AddColumn(new DefineField(fieldTable, primaryName, "权限组代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(fieldTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(fieldTable); DataSourceHelper.AddRowNo(fieldTable); DataSourceHelper.AddColumn(new DefineField(fieldTable, "TABLEINDEX", "表索引") { DataType = LibDataType.Int32, ControlType = LibControlType.Number, QtyLimit = LibQtyLimit.GreaterOrEqualThanZero }); DataSourceHelper.AddColumn(new DefineField(fieldTable, "FIELDNAME", "字段名", FieldSize.Size50) { ControlType = LibControlType.FieldControl, RelProgId = "B.PROGID", AllowEmpty = false, RelTableIndex = "D.TABLEINDEX" }); DataSourceHelper.AddColumn(new DefineField(fieldTable, "FIELDPOWER", "权限选项") { DataType = LibDataType.Int32, ControlType = LibControlType.TextOption, TextOption = new string[] { "不能查看", "不能编辑" } }); DataSourceHelper.AddColumn(new DefineField(fieldTable, "USECONDITION", "控制条件", FieldSize.Size500)); DataSourceHelper.AddRemark(fieldTable); fieldTable.PrimaryKey = new DataColumn[] { fieldTable.Columns[primaryName], fieldTable.Columns["PARENTROWID"], fieldTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(fieldTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", bodyTableName, fieldTable), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { fieldTable.Columns[primaryName], fieldTable.Columns["PARENTROWID"] }); DataTable buttonTable = new DataTable(buttonTableName); DataSourceHelper.AddColumn(new DefineField(buttonTable, primaryName, "权限组代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(buttonTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(buttonTable); DataSourceHelper.AddRowNo(buttonTable); DataSourceHelper.AddColumn(new DefineField(buttonTable, "BUTTONID", "功能按钮", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncButton") { RelPK = "B.PROGID", RelFields = new RelFieldCollection() { new RelField("BUTTONNAME", LibDataType.NText, FieldSize.Size50, "功能按钮名称") } } } }); DataSourceHelper.AddColumn(new DefineField(buttonTable, "CANUSE", "具备权限") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, DefaultValue = true }); DataSourceHelper.AddRemark(buttonTable); buttonTable.PrimaryKey = new DataColumn[] { buttonTable.Columns[primaryName], buttonTable.Columns["PARENTROWID"], buttonTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(buttonTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", bodyTableName, buttonTable), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { buttonTable.Columns[primaryName], buttonTable.Columns["PARENTROWID"] }); }
protected override void BuildDataSet() { this.DataSet = new DataSet(); string primaryName = "ATTACHMENTTPLID"; DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "模板代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ATTACHMENTTPLNAME", "模板名称", FieldSize.Size50) { AllowEmpty = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGID", "功能代码", FieldSize.Size50) { AllowEmpty = false, ControlType = LibControlType.IdName, RelativeSource = new RelativeSourceCollection() { new RelativeSource("axp.FuncList") { RelFields = new RelFieldCollection() { new RelField("PROGNAME", LibDataType.NText, FieldSize.Size50, "功能名称") } } } }); DataSourceHelper.AddFixColumn(masterTable, this.BillType); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] }; this.DataSet.Tables.Add(masterTable); DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, primaryName, "模板代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(bodyTable); DataSourceHelper.AddRowNo(bodyTable); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITION", "使用条件", FieldSize.Size500)); DataSourceHelper.AddColumn(new DefineField(bodyTable, "USECONDITIONDESC", "使用条件说明", FieldSize.Size200) { DataType = LibDataType.NText, ControlType = LibControlType.NText }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "ATTACHMENTDETAIL", "附件明细") { DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true, SubTableIndex = 2 }); DataSourceHelper.AddRemark(bodyTable); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), masterTable.Columns[primaryName], bodyTable.Columns[primaryName]); DataTable subTable = new DataTable(subTableName); DataSourceHelper.AddColumn(new DefineField(subTable, primaryName, "模板代码", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddRowId(subTable, "PARENTROWID", "父行标识"); DataSourceHelper.AddRowId(subTable); DataSourceHelper.AddRowNo(subTable); DataSourceHelper.AddColumn(new DefineField(subTable, "ATTACHMENTNAME", "附件名", FieldSize.Size200) { DataType = LibDataType.NText, ControlType = LibControlType.NText }); DataSourceHelper.AddRemark(subTable); subTable.PrimaryKey = new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"], subTable.Columns["ROW_ID"] }; this.DataSet.Tables.Add(subTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", bodyTableName, subTableName), new DataColumn[] { bodyTable.Columns[primaryName], bodyTable.Columns["ROW_ID"] }, new DataColumn[] { subTable.Columns[primaryName], subTable.Columns["PARENTROWID"] }); }