Пример #1
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, "EXECTASKDATAID", "执行标识号", FieldSize.Size50));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "CREATETIME", "创建时间")
            {
                DataType = LibDataType.Int64, ControlType = LibControlType.DateTime
            });
            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, "RESULTDATA", "结果数据")
            {
                DataType = LibDataType.Binary, ControlType = LibControlType.NText
            });
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["EXECTASKDATAID"] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #2
0
        ///<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);
        }
Пример #3
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            DataTable masterTable = new DataTable(masterTableName);

            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.Size50)
            {
                AllowCopy = false, AllowEmpty = false
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "BUSINESSTASKNAME", "任务名称", FieldSize.Size50)
            {
                ControlType = LibControlType.NText
            });
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["PROGID"], masterTable.Columns["BUSINESSTASKID"] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #4
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            DataTable headTable = new DataTable();

            DataSourceHelper.AddColumn(new DefineField(headTable, "KEY", "主键", FieldSize.Size20));
            headTable.PrimaryKey = new DataColumn[] { headTable.Columns["KEY"] };
            this.DataSet.Tables.Add(headTable);
        }
Пример #5
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, "EXCEL", "Excel", FieldSize.Size50));
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["EXCEL"] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #6
0
        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);
        }
Пример #7
0
        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"]);
        }
Пример #8
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, "NEWSID", "消息代码", FieldSize.Size50));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "USERID", "用户账号", FieldSize.Size20));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "TITLE", "主题", FieldSize.Size200)
            {
                DataType = LibDataType.NText, ControlType = LibControlType.NText
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "MAINCONTENT", "主要内容", FieldSize.Size1000)
            {
                DataType = LibDataType.Binary, ControlType = LibControlType.NText
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "INFOID", "附带信息", FieldSize.Size100)
            {
                ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "CREATETIME", "时间")
            {
                DataType = LibDataType.Int64, ControlType = LibControlType.DateTime
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "PERSONID", "发送人", FieldSize.Size20)
            {
                ControlType    = LibControlType.IdName,
                RelativeSource = new RelativeSourceCollection()
                {
                    new RelativeSource("com.Person")
                    {
                        RelFields = new RelFieldCollection()
                        {
                            new RelField("PERSONNAME", LibDataType.NText, FieldSize.Size50, "发送人名称")
                        }
                    }
                }
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "ISREAD", "已读")
            {
                DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo
            });
            DBIndexCollection dbList = new DBIndexCollection();

            dbList.Add(new DBIndex("NEWS_CREATETIME_IDX", new DBIndexFieldCollection()
            {
                new DBIndexField("CREATETIME")
            }));
            masterTable.ExtendedProperties.Add(TableProperty.DBIndex, dbList);
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["NEWSID"] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #9
0
        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]);
        }
Пример #10
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, "INTERNALID", "单据内码", FieldSize.Size50));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "FROMROWID", "行标识号")
            {
                DataType = LibDataType.Int32, ControlType = LibControlType.Number
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "CREATETIME", "创建时间")
            {
                DataType = LibDataType.Int64, ControlType = LibControlType.DateTime
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "REASONID", "变动原因", FieldSize.Size20)
            {
                ControlType    = LibControlType.IdName,
                RelativeSource = new RelativeSourceCollection()
                {
                    new RelativeSource("axp.ChangeDataReason")
                    {
                        RelFields = new RelFieldCollection()
                        {
                            new RelField("REASONNAME", LibDataType.NText, FieldSize.Size50, "变动原因名称")
                        }
                    }
                }
            });
            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, "VERSIONDATA", "版本数据")
            {
                DataType = LibDataType.Binary, ControlType = LibControlType.NText
            });
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["INTERNALID"], masterTable.Columns["FROMROWID"], masterTable.Columns["CREATETIME"] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #11
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            string    primaryName = "TASKID";
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "任务代码", FieldSize.Size50));
            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)
            {
                AllowCopy = false, AllowEmpty = false
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "EXECDATE", "执行日期")
            {
                DataType = LibDataType.Int32, ControlType = LibControlType.Date
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "EXECTIME", "执行时间")
            {
                DataType = LibDataType.Int32, ControlType = LibControlType.Time
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "EXECCONDITION", "执行条件")
            {
                DataType = LibDataType.Binary, ControlType = LibControlType.Text, ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "INTERNALID", "内码", FieldSize.Size50)
            {
                DataType = LibDataType.Text, ControlType = LibControlType.Text
            });
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #12
0
        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);
        }
Пример #13
0
        ///<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);
        }
Пример #14
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            string    primaryName = "PROGID";
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "功能标识", FieldSize.Size50)
            {
                ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGNAME", "功能名称", FieldSize.Size50)
            {
                DataType = LibDataType.NText, ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "CONFIGPACK", "配置包", FieldSize.Size20)
            {
                ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "CANMENU", "允许挂菜单")
            {
                DataType = LibDataType.Boolean, ControlType = LibControlType.YesNo, ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "KEYCODE", "快捷码", FieldSize.Size20)
            {
                ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "PERMISSION", "权限标识")
            {
                DataType = LibDataType.Int32, ControlType = LibControlType.Number, ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "BILLTYPE", "功能种类")
            {
                DataType    = LibDataType.Int32,
                ControlType = LibControlType.TextOption,
                TextOption  = new string[] { "主数据", "单据", "数据维护功能", "自定义功能", "报表", "日报表" },
                ReadOnly    = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGTAG", "功能标签", FieldSize.Size100)
            {
                ReadOnly = true
            });
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #15
0
        ///<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);
        }
Пример #16
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, "MENUITEM", "清单名称", FieldSize.Size50));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGID", "功能代码", FieldSize.Size50));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "PROGNAME", "功能名称", FieldSize.Size50));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "BILLTYPE", "功能种类")
            {
                DataType    = LibDataType.Int32,
                ControlType = LibControlType.TextOption,
                TextOption  = new string[] { "主数据", "单据", "数据维护功能", "自定义功能", "报表", "日报表" },
                ReadOnly    = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "ENTRYPARAM", "入口参数", FieldSize.Size200));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "PUBLISHDATE", "发布日期", FieldSize.Size200));
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["PROGID"], masterTable.Columns["ENTRYPARAM"] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #17
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            string    primaryName = "PROGID";
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "功能标识", FieldSize.Size50)
            {
                ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "BUTTONID", "按钮标识", FieldSize.Size50)
            {
                ReadOnly = true
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "BUTTONNAME", "按钮名称", FieldSize.Size50)
            {
                ReadOnly = true, ControlType = LibControlType.NText, DataType = LibDataType.NText
            });
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName], masterTable.Columns["BUTTONID"] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #18
0
        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);
        }
Пример #19
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, "USERID", "账号", FieldSize.Size20));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "CREATETIME", "句柄创建时间")
            {
                DataType = LibDataType.Int64, ControlType = LibControlType.DateTime
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "HANDLETYPE", "终端类型")
            {
                DataType = LibDataType.Int32
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "FREETIME", "句柄释放时间")
            {
                DataType = LibDataType.Int64, ControlType = LibControlType.DateTime
            });
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns["USERID"], masterTable.Columns["CREATETIME"] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #20
0
        protected override void BuildDataSet()
        {
            this.DataSet = new DataSet();
            string    primaryName = "PURCHASERID";
            DataTable masterTable = new DataTable(masterTableName);

            DataSourceHelper.AddColumn(new DefineField(masterTable, primaryName, "客户代码", FieldSize.Size20));
            DataSourceHelper.AddColumn(new DefineField(masterTable, "PURCHASERNAME", "客户名称", FieldSize.Size50)
            {
                DataType = LibDataType.NText
            });
            //-1为不限制使用数
            DataSourceHelper.AddColumn(new DefineField(masterTable, "MAXUSERCOUNT", "最大用户数")
            {
                DataType = LibDataType.Int32, ControlType = LibControlType.Number, DefaultValue = -1
            });
            DataSourceHelper.AddColumn(new DefineField(masterTable, "MAXWORKSTATIONCOUNT", "最大站点数")
            {
                DataType = LibDataType.Int32, ControlType = LibControlType.Number, DefaultValue = -1
            });
            masterTable.PrimaryKey = new DataColumn[] { masterTable.Columns[primaryName] };
            this.DataSet.Tables.Add(masterTable);
        }
Пример #21
0
        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);
        }
Пример #22
0
        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);
        }
Пример #23
0
        ///<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
        }
Пример #24
0
        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
        }
Пример #25
0
        /// <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
        }
Пример #26
0
        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"] });
        }
Пример #27
0
        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"] });
        }
Пример #28
0
        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
        }
Пример #29
0
        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"] });
        }
Пример #30
0
        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"] });
        }