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

📄 dataset1.cs

📁 基于C#和SQL开发的合同管理系统。 可以实现一些简单的添加、删除功能。
💻 CS
📖 第 1 页 / 共 2 页
字号:
                base.OnRowChanging(e);
                if ((this.CONTRACTRowChanging != null)) {
                    this.CONTRACTRowChanging(this, new CONTRACTRowChangeEvent(((CONTRACTRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CONTRACTRowDeleted != null)) {
                    this.CONTRACTRowDeleted(this, new CONTRACTRowChangeEvent(((CONTRACTRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CONTRACTRowDeleting != null)) {
                    this.CONTRACTRowDeleting(this, new CONTRACTRowChangeEvent(((CONTRACTRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCONTRACTRow(CONTRACTRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class CONTRACTRow : DataRow {
            
            private CONTRACTDataTable tableCONTRACT;
            
            internal CONTRACTRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableCONTRACT = ((CONTRACTDataTable)(this.Table));
            }
            
            public string 合同号 {
                get {
                    return ((string)(this[this.tableCONTRACT.合同号Column]));
                }
                set {
                    this[this.tableCONTRACT.合同号Column] = value;
                }
            }
            
            public string 合同名称 {
                get {
                    try {
                        return ((string)(this[this.tableCONTRACT.合同名称Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableCONTRACT.合同名称Column] = value;
                }
            }
            
            public System.Decimal 合同额 {
                get {
                    return ((System.Decimal)(this[this.tableCONTRACT.合同额Column]));
                }
                set {
                    this[this.tableCONTRACT.合同额Column] = value;
                }
            }
            
            public System.DateTime 签定日期 {
                get {
                    try {
                        return ((System.DateTime)(this[this.tableCONTRACT.签定日期Column]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set {
                    this[this.tableCONTRACT.签定日期Column] = value;
                }
            }
            
            public string 销售人 {
                get {
                    return ((string)(this[this.tableCONTRACT.销售人Column]));
                }
                set {
                    this[this.tableCONTRACT.销售人Column] = value;
                }
            }
            
            public bool Is合同名称Null() {
                return this.IsNull(this.tableCONTRACT.合同名称Column);
            }
            
            public void Set合同名称Null() {
                this[this.tableCONTRACT.合同名称Column] = System.Convert.DBNull;
            }
            
            public bool Is签定日期Null() {
                return this.IsNull(this.tableCONTRACT.签定日期Column);
            }
            
            public void Set签定日期Null() {
                this[this.tableCONTRACT.签定日期Column] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class CONTRACTRowChangeEvent : EventArgs {
            
            private CONTRACTRow eventRow;
            
            private DataRowAction eventAction;
            
            public CONTRACTRowChangeEvent(CONTRACTRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CONTRACTRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EMPLOYEEDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnEMPLOYEE_ID;
            
            internal EMPLOYEEDataTable() : 
                    base("EMPLOYEE") {
                this.InitClass();
            }
            
            internal EMPLOYEEDataTable(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 EMPLOYEE_IDColumn {
                get {
                    return this.columnEMPLOYEE_ID;
                }
            }
            
            public EMPLOYEERow this[int index] {
                get {
                    return ((EMPLOYEERow)(this.Rows[index]));
                }
            }
            
            public event EMPLOYEERowChangeEventHandler EMPLOYEERowChanged;
            
            public event EMPLOYEERowChangeEventHandler EMPLOYEERowChanging;
            
            public event EMPLOYEERowChangeEventHandler EMPLOYEERowDeleted;
            
            public event EMPLOYEERowChangeEventHandler EMPLOYEERowDeleting;
            
            public void AddEMPLOYEERow(EMPLOYEERow row) {
                this.Rows.Add(row);
            }
            
            public EMPLOYEERow AddEMPLOYEERow(System.Decimal EMPLOYEE_ID) {
                EMPLOYEERow rowEMPLOYEERow = ((EMPLOYEERow)(this.NewRow()));
                rowEMPLOYEERow.ItemArray = new object[] {
                        EMPLOYEE_ID};
                this.Rows.Add(rowEMPLOYEERow);
                return rowEMPLOYEERow;
            }
            
            public EMPLOYEERow FindByEMPLOYEE_ID(System.Decimal EMPLOYEE_ID) {
                return ((EMPLOYEERow)(this.Rows.Find(new object[] {
                            EMPLOYEE_ID})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                EMPLOYEEDataTable cln = ((EMPLOYEEDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new EMPLOYEEDataTable();
            }
            
            internal void InitVars() {
                this.columnEMPLOYEE_ID = this.Columns["EMPLOYEE_ID"];
            }
            
            private void InitClass() {
                this.columnEMPLOYEE_ID = new DataColumn("EMPLOYEE_ID", typeof(System.Decimal), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnEMPLOYEE_ID);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnEMPLOYEE_ID}, true));
                this.columnEMPLOYEE_ID.AllowDBNull = false;
                this.columnEMPLOYEE_ID.Unique = true;
            }
            
            public EMPLOYEERow NewEMPLOYEERow() {
                return ((EMPLOYEERow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new EMPLOYEERow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(EMPLOYEERow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.EMPLOYEERowChanged != null)) {
                    this.EMPLOYEERowChanged(this, new EMPLOYEERowChangeEvent(((EMPLOYEERow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.EMPLOYEERowChanging != null)) {
                    this.EMPLOYEERowChanging(this, new EMPLOYEERowChangeEvent(((EMPLOYEERow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.EMPLOYEERowDeleted != null)) {
                    this.EMPLOYEERowDeleted(this, new EMPLOYEERowChangeEvent(((EMPLOYEERow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.EMPLOYEERowDeleting != null)) {
                    this.EMPLOYEERowDeleting(this, new EMPLOYEERowChangeEvent(((EMPLOYEERow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveEMPLOYEERow(EMPLOYEERow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EMPLOYEERow : DataRow {
            
            private EMPLOYEEDataTable tableEMPLOYEE;
            
            internal EMPLOYEERow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableEMPLOYEE = ((EMPLOYEEDataTable)(this.Table));
            }
            
            public System.Decimal EMPLOYEE_ID {
                get {
                    return ((System.Decimal)(this[this.tableEMPLOYEE.EMPLOYEE_IDColumn]));
                }
                set {
                    this[this.tableEMPLOYEE.EMPLOYEE_IDColumn] = value;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EMPLOYEERowChangeEvent : EventArgs {
            
            private EMPLOYEERow eventRow;
            
            private DataRowAction eventAction;
            
            public EMPLOYEERowChangeEvent(EMPLOYEERow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public EMPLOYEERow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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