⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userentity.cs

📁 基于sqlserver2k,reporting service的扩展(auth,render,deliver==)应用(mssql,RS,AS,BI)
💻 CS
📖 第 1 页 / 共 2 页
字号:
                }
            }
            
            public void RemoveUserRow(UserRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class UserRow : DataRow {
            
            private UserDataTable tableUser;
            
            internal UserRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableUser = ((UserDataTable)(this.Table));
            }
            
            public string Identity {
                get {
                    return ((string)(this[this.tableUser.IdentityColumn]));
                }
                set {
                    this[this.tableUser.IdentityColumn] = value;
                }
            }
            
            public string Name {
                get {
                    if (this.IsNameNull()) {
                        return null;
                    }
                    else {
                        return ((string)(this[this.tableUser.NameColumn]));
                    }
                }
                set {
                    this[this.tableUser.NameColumn] = value;
                }
            }
            
            public bool IsNameNull() {
                return this.IsNull(this.tableUser.NameColumn);
            }
            
            public void SetNameNull() {
                this[this.tableUser.NameColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class UserRowChangeEvent : EventArgs {
            
            private UserRow eventRow;
            
            private DataRowAction eventAction;
            
            public UserRowChangeEvent(UserRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public UserRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class OperationsDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnId;
            
            private DataColumn columnName;
            
            private DataColumn columnDescription;
            
            internal OperationsDataTable() : 
                    base("Operations") {
                this.InitClass();
            }
            
            internal OperationsDataTable(DataTable table) : 
                    base(table.TableName) {
                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
                    this.CaseSensitive = table.CaseSensitive;
                }
                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
                    this.Locale = table.Locale;
                }
                if ((table.Namespace != table.DataSet.Namespace)) {
                    this.Namespace = table.Namespace;
                }
                this.Prefix = table.Prefix;
                this.MinimumCapacity = table.MinimumCapacity;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn IdColumn {
                get {
                    return this.columnId;
                }
            }
            
            internal DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            internal DataColumn DescriptionColumn {
                get {
                    return this.columnDescription;
                }
            }
            
            public OperationsRow this[int index] {
                get {
                    return ((OperationsRow)(this.Rows[index]));
                }
            }
            
            public event OperationsRowChangeEventHandler OperationsRowChanged;
            
            public event OperationsRowChangeEventHandler OperationsRowChanging;
            
            public event OperationsRowChangeEventHandler OperationsRowDeleted;
            
            public event OperationsRowChangeEventHandler OperationsRowDeleting;
            
            public void AddOperationsRow(OperationsRow row) {
                this.Rows.Add(row);
            }
            
            public OperationsRow AddOperationsRow(int Id, string Name, string Description) {
                OperationsRow rowOperationsRow = ((OperationsRow)(this.NewRow()));
                rowOperationsRow.ItemArray = new object[] {
                        Id,
                        Name,
                        Description};
                this.Rows.Add(rowOperationsRow);
                return rowOperationsRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                OperationsDataTable cln = ((OperationsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new OperationsDataTable();
            }
            
            internal void InitVars() {
                this.columnId = this.Columns["Id"];
                this.columnName = this.Columns["Name"];
                this.columnDescription = this.Columns["Description"];
            }
            
            private void InitClass() {
                this.columnId = new DataColumn("Id", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnId);
                this.columnName = new DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnName);
                this.columnDescription = new DataColumn("Description", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnDescription);
                this.columnId.AllowDBNull = false;
                this.columnName.AllowDBNull = false;
                this.columnDescription.AllowDBNull = false;
            }
            
            public OperationsRow NewOperationsRow() {
                return ((OperationsRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new OperationsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(OperationsRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.OperationsRowChanged != null)) {
                    this.OperationsRowChanged(this, new OperationsRowChangeEvent(((OperationsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.OperationsRowChanging != null)) {
                    this.OperationsRowChanging(this, new OperationsRowChangeEvent(((OperationsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.OperationsRowDeleted != null)) {
                    this.OperationsRowDeleted(this, new OperationsRowChangeEvent(((OperationsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.OperationsRowDeleting != null)) {
                    this.OperationsRowDeleting(this, new OperationsRowChangeEvent(((OperationsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveOperationsRow(OperationsRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class OperationsRow : DataRow {
            
            private OperationsDataTable tableOperations;
            
            internal OperationsRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableOperations = ((OperationsDataTable)(this.Table));
            }
            
            public int Id {
                get {
                    return ((int)(this[this.tableOperations.IdColumn]));
                }
                set {
                    this[this.tableOperations.IdColumn] = value;
                }
            }
            
            public string Name {
                get {
                    return ((string)(this[this.tableOperations.NameColumn]));
                }
                set {
                    this[this.tableOperations.NameColumn] = value;
                }
            }
            
            public string Description {
                get {
                    return ((string)(this[this.tableOperations.DescriptionColumn]));
                }
                set {
                    this[this.tableOperations.DescriptionColumn] = value;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class OperationsRowChangeEvent : EventArgs {
            
            private OperationsRow eventRow;
            
            private DataRowAction eventAction;
            
            public OperationsRowChangeEvent(OperationsRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public OperationsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -