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]); }
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"] }); }
///<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 }
/// <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(); 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(); #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 = "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"] }); }
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(); DataTable masterTable = new DataTable(masterTableName); DataSourceHelper.AddColumn(new DefineField(masterTable, "BELONGTOID", "附件关联标识", FieldSize.Size50) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ORDERID", "附件标识号") { DataType = LibDataType.Int32, ControlType = LibControlType.Number }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ORDERNUM", "序号") { DataType = LibDataType.Int32, ControlType = LibControlType.Number }); DataSourceHelper.AddColumn(new DefineField(masterTable, "ATTACHMENTNAME", "附件名") { DataType = LibDataType.Binary, ControlType = LibControlType.NText }); DataSourceHelper.AddColumn(new DefineField(masterTable, "CANUSE", "可用") { DataType = LibDataType.Boolean, ControlType = LibControlType.TextOption, ReadOnly = true }); //Zhangkj 20170104 添加附件记录行对应的文档库中的文档编号 DataSourceHelper.AddColumn(new DefineField(masterTable, "DOCID", "对应文档编号", FieldSize.Size50) { AllowCopy = false }); masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["BELONGTOID"], masterTable.Columns["ORDERID"] }; this.DataSet.Tables.Add(masterTable); DataTable bodyTable = new DataTable(bodyTableName); DataSourceHelper.AddColumn(new DefineField(bodyTable, "BELONGTOID", "附件关联标识", FieldSize.Size20) { AllowEmpty = false, AllowCopy = false }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "ORDERID", "附件标识号") { DataType = LibDataType.Int32, ControlType = LibControlType.Number }); DataSourceHelper.AddColumn(new DefineField(bodyTable, "FILENAME", "文件名", FieldSize.Size50)); DataSourceHelper.AddColumn(new DefineField(bodyTable, "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(bodyTable, "CREATETIME", "上传时间") { DataType = LibDataType.Int64, ControlType = LibControlType.DateTime }); DataSourceHelper.AddRemark(bodyTable); bodyTable.PrimaryKey = new DataColumn[] { bodyTable.Columns["BELONGTOID"], bodyTable.Columns["ORDERID"], bodyTable.Columns["CREATETIME"] }; this.DataSet.Tables.Add(bodyTable); this.DataSet.Relations.Add(string.Format("{0}_{1}", masterTableName, bodyTableName), new DataColumn[] { masterTable.Columns["BELONGTOID"], masterTable.Columns["ORDERID"] }, new DataColumn[] { bodyTable.Columns["BELONGTOID"], bodyTable.Columns["ORDERID"] }); }
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 = "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(); 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 = "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"] }); }