//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行库版本:2.0.50727.1882
//
//     对此文件的更改可能会导致不正确的行为，并且如果
//     重新生成代码，这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

#pragma warning disable 1591

namespace HRManagerSystem {
    
    
    /// <summary>
    ///Represents a strongly typed in-memory cache of data.
    ///</summary>
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [global::System.Serializable()]
    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
    [global::System.ComponentModel.ToolboxItem(true)]
    [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
    [global::System.Xml.Serialization.XmlRootAttribute("HR_DBDataSet")]
    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
    public partial class HR_DBDataSet : global::System.Data.DataSet {
        
        private T_StaffRecordsDataTable tableT_StaffRecords;
        
        private T_TrainingsDataTable tableT_Trainings;
        
        private global::System.Data.DataRelation relationFK_Ｔ_Trainings_T_StaffRecords;
        
        private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public HR_DBDataSet() {
            this.BeginInit();
            this.InitClass();
            global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            base.Tables.CollectionChanged += schemaChangedHandler;
            base.Relations.CollectionChanged += schemaChangedHandler;
            this.EndInit();
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected HR_DBDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : 
                base(info, context, false) {
            if ((this.IsBinarySerialized(info, context) == true)) {
                this.InitVars(false);
                global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
                this.Tables.CollectionChanged += schemaChangedHandler1;
                this.Relations.CollectionChanged += schemaChangedHandler1;
                return;
            }
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
                global::System.Data.DataSet ds = new global::System.Data.DataSet();
                ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
                if ((ds.Tables["T_StaffRecords"] != null)) {
                    base.Tables.Add(new T_StaffRecordsDataTable(ds.Tables["T_StaffRecords"]));
                }
                if ((ds.Tables["T_Trainings"] != null)) {
                    base.Tables.Add(new T_TrainingsDataTable(ds.Tables["T_Trainings"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
            }
            this.GetSerializationData(info, context);
            global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            base.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Browsable(false)]
        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
        public T_StaffRecordsDataTable T_StaffRecords {
            get {
                return this.tableT_StaffRecords;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Browsable(false)]
        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
        public T_TrainingsDataTable T_Trainings {
            get {
                return this.tableT_Trainings;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.BrowsableAttribute(true)]
        [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
        public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
            get {
                return this._schemaSerializationMode;
            }
            set {
                this._schemaSerializationMode = value;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new global::System.Data.DataTableCollection Tables {
            get {
                return base.Tables;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new global::System.Data.DataRelationCollection Relations {
            get {
                return base.Relations;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override void InitializeDerivedDataSet() {
            this.BeginInit();
            this.InitClass();
            this.EndInit();
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public override global::System.Data.DataSet Clone() {
            HR_DBDataSet cln = ((HR_DBDataSet)(base.Clone()));
            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return cln;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
            if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
                this.Reset();
                global::System.Data.DataSet ds = new global::System.Data.DataSet();
                ds.ReadXml(reader);
                if ((ds.Tables["T_StaffRecords"] != null)) {
                    base.Tables.Add(new T_StaffRecordsDataTable(ds.Tables["T_StaffRecords"]));
                }
                if ((ds.Tables["T_Trainings"] != null)) {
                    base.Tables.Add(new T_TrainingsDataTable(ds.Tables["T_Trainings"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.ReadXml(reader);
                this.InitVars();
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
            this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
            stream.Position = 0;
            return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal void InitVars() {
            this.InitVars(true);
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal void InitVars(bool initTable) {
            this.tableT_StaffRecords = ((T_StaffRecordsDataTable)(base.Tables["T_StaffRecords"]));
            if ((initTable == true)) {
                if ((this.tableT_StaffRecords != null)) {
                    this.tableT_StaffRecords.InitVars();
                }
            }
            this.tableT_Trainings = ((T_TrainingsDataTable)(base.Tables["T_Trainings"]));
            if ((initTable == true)) {
                if ((this.tableT_Trainings != null)) {
                    this.tableT_Trainings.InitVars();
                }
            }
            this.relationFK_Ｔ_Trainings_T_StaffRecords = this.Relations["FK_Ｔ_Trainings_T_StaffRecords"];
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitClass() {
            this.DataSetName = "HR_DBDataSet";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/HR_DBDataSet.xsd";
            this.EnforceConstraints = true;
            this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
            this.tableT_StaffRecords = new T_StaffRecordsDataTable();
            base.Tables.Add(this.tableT_StaffRecords);
            this.tableT_Trainings = new T_TrainingsDataTable();
            base.Tables.Add(this.tableT_Trainings);
            this.relationFK_Ｔ_Trainings_T_StaffRecords = new global::System.Data.DataRelation("FK_Ｔ_Trainings_T_StaffRecords", new global::System.Data.DataColumn[] {
                        this.tableT_StaffRecords.Staff_IDColumn}, new global::System.Data.DataColumn[] {
                        this.tableT_Trainings.Staff_IDColumn}, false);
            this.Relations.Add(this.relationFK_Ｔ_Trainings_T_StaffRecords);
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private bool ShouldSerializeT_StaffRecords() {
            return false;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private bool ShouldSerializeT_Trainings() {
            return false;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
            HR_DBDataSet ds = new HR_DBDataSet();
            global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
            global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
            global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
            if (xs.Contains(dsSchema.TargetNamespace)) {
                global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                try {
                    global::System.Xml.Schema.XmlSchema schema = null;
                    dsSchema.Write(s1);
                    for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
                        schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                        s2.SetLength(0);
                        schema.Write(s2);
                        if ((s1.Length == s2.Length)) {
                            s1.Position = 0;
                            s2.Position = 0;
                            for (; ((s1.Position != s1.Length) 
                                        && (s1.ReadByte() == s2.ReadByte())); ) {
                                ;
                            }
                            if ((s1.Position == s1.Length)) {
                                return type;
                            }
                        }
                    }
                }
                finally {
                    if ((s1 != null)) {
                        s1.Close();
                    }
                    if ((s2 != null)) {
                        s2.Close();
                    }
                }
            }
            xs.Add(dsSchema);
            return type;
        }
        
        public delegate void T_StaffRecordsRowChangeEventHandler(object sender, T_StaffRecordsRowChangeEvent e);
        
        public delegate void T_TrainingsRowChangeEventHandler(object sender, T_TrainingsRowChangeEvent e);
        
        /// <summary>
        ///Represents the strongly named DataTable class.
        ///</summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        [global::System.Serializable()]
        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class T_StaffRecordsDataTable : global::System.Data.TypedTableBase<T_StaffRecordsRow> {
            
            private global::System.Data.DataColumn columnStaff_ID;
            
            private global::System.Data.DataColumn columnStaff_Name;
            
            private global::System.Data.DataColumn columnStaff_Sex;
            
            private global::System.Data.DataColumn columnStaff_IDNumber;
            
            private global::System.Data.DataColumn columnStaff_Mobile;
            
            private global::System.Data.DataColumn columnStaff_Phone;
            
            private global::System.Data.DataColumn columnStaff_Email;
            
            private global::System.Data.DataColumn columnStaff_Address;
            
            private global::System.Data.DataColumn columnStaff_Education;
            
            private global::System.Data.DataColumn columnStaff_DepartID;
            
            private global::System.Data.DataColumn columnStaff_JobID;
            
            private global::System.Data.DataColumn columnStaff_TypeID;
            
            private global::System.Data.DataColumn columnPhoto_Path;
            
            private global::System.Data.DataColumn columnStaff_ZhiChengID;
            
            private global::System.Data.DataColumn columnStaff_NationID;
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_StaffRecordsDataTable() {
                this.TableName = "T_StaffRecords";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal T_StaffRecordsDataTable(global::System.Data.DataTable table) {
                this.TableName = 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;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected T_StaffRecordsDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_IDColumn {
                get {
                    return this.columnStaff_ID;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_NameColumn {
                get {
                    return this.columnStaff_Name;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_SexColumn {
                get {
                    return this.columnStaff_Sex;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_IDNumberColumn {
                get {
                    return this.columnStaff_IDNumber;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_MobileColumn {
                get {
                    return this.columnStaff_Mobile;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_PhoneColumn {
                get {
                    return this.columnStaff_Phone;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_EmailColumn {
                get {
                    return this.columnStaff_Email;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_AddressColumn {
                get {
                    return this.columnStaff_Address;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_EducationColumn {
                get {
                    return this.columnStaff_Education;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_DepartIDColumn {
                get {
                    return this.columnStaff_DepartID;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_JobIDColumn {
                get {
                    return this.columnStaff_JobID;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_TypeIDColumn {
                get {
                    return this.columnStaff_TypeID;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Photo_PathColumn {
                get {
                    return this.columnPhoto_Path;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_ZhiChengIDColumn {
                get {
                    return this.columnStaff_ZhiChengID;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_NationIDColumn {
                get {
                    return this.columnStaff_NationID;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            [global::System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_StaffRecordsRow this[int index] {
                get {
                    return ((T_StaffRecordsRow)(this.Rows[index]));
                }
            }
            
            public event T_StaffRecordsRowChangeEventHandler T_StaffRecordsRowChanging;
            
            public event T_StaffRecordsRowChangeEventHandler T_StaffRecordsRowChanged;
            
            public event T_StaffRecordsRowChangeEventHandler T_StaffRecordsRowDeleting;
            
            public event T_StaffRecordsRowChangeEventHandler T_StaffRecordsRowDeleted;
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void AddT_StaffRecordsRow(T_StaffRecordsRow row) {
                this.Rows.Add(row);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_StaffRecordsRow AddT_StaffRecordsRow(string Staff_Name, bool Staff_Sex, string Staff_IDNumber, string Staff_Mobile, string Staff_Phone, string Staff_Email, string Staff_Address, string Staff_Education, int Staff_DepartID, int Staff_JobID, int Staff_TypeID, string Photo_Path, int Staff_ZhiChengID, int Staff_NationID) {
                T_StaffRecordsRow rowT_StaffRecordsRow = ((T_StaffRecordsRow)(this.NewRow()));
                object[] columnValuesArray = new object[] {
                        null,
                        Staff_Name,
                        Staff_Sex,
                        Staff_IDNumber,
                        Staff_Mobile,
                        Staff_Phone,
                        Staff_Email,
                        Staff_Address,
                        Staff_Education,
                        Staff_DepartID,
                        Staff_JobID,
                        Staff_TypeID,
                        Photo_Path,
                        Staff_ZhiChengID,
                        Staff_NationID};
                rowT_StaffRecordsRow.ItemArray = columnValuesArray;
                this.Rows.Add(rowT_StaffRecordsRow);
                return rowT_StaffRecordsRow;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_StaffRecordsRow FindByStaff_ID(int Staff_ID) {
                return ((T_StaffRecordsRow)(this.Rows.Find(new object[] {
                            Staff_ID})));
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public override global::System.Data.DataTable Clone() {
                T_StaffRecordsDataTable cln = ((T_StaffRecordsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override global::System.Data.DataTable CreateInstance() {
                return new T_StaffRecordsDataTable();
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal void InitVars() {
                this.columnStaff_ID = base.Columns["Staff_ID"];
                this.columnStaff_Name = base.Columns["Staff_Name"];
                this.columnStaff_Sex = base.Columns["Staff_Sex"];
                this.columnStaff_IDNumber = base.Columns["Staff_IDNumber"];
                this.columnStaff_Mobile = base.Columns["Staff_Mobile"];
                this.columnStaff_Phone = base.Columns["Staff_Phone"];
                this.columnStaff_Email = base.Columns["Staff_Email"];
                this.columnStaff_Address = base.Columns["Staff_Address"];
                this.columnStaff_Education = base.Columns["Staff_Education"];
                this.columnStaff_DepartID = base.Columns["Staff_DepartID"];
                this.columnStaff_JobID = base.Columns["Staff_JobID"];
                this.columnStaff_TypeID = base.Columns["Staff_TypeID"];
                this.columnPhoto_Path = base.Columns["Photo_Path"];
                this.columnStaff_ZhiChengID = base.Columns["Staff_ZhiChengID"];
                this.columnStaff_NationID = base.Columns["Staff_NationID"];
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            private void InitClass() {
                this.columnStaff_ID = new global::System.Data.DataColumn("Staff_ID", typeof(int), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_ID);
                this.columnStaff_Name = new global::System.Data.DataColumn("Staff_Name", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_Name);
                this.columnStaff_Sex = new global::System.Data.DataColumn("Staff_Sex", typeof(bool), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_Sex);
                this.columnStaff_IDNumber = new global::System.Data.DataColumn("Staff_IDNumber", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_IDNumber);
                this.columnStaff_Mobile = new global::System.Data.DataColumn("Staff_Mobile", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_Mobile);
                this.columnStaff_Phone = new global::System.Data.DataColumn("Staff_Phone", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_Phone);
                this.columnStaff_Email = new global::System.Data.DataColumn("Staff_Email", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_Email);
                this.columnStaff_Address = new global::System.Data.DataColumn("Staff_Address", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_Address);
                this.columnStaff_Education = new global::System.Data.DataColumn("Staff_Education", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_Education);
                this.columnStaff_DepartID = new global::System.Data.DataColumn("Staff_DepartID", typeof(int), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_DepartID);
                this.columnStaff_JobID = new global::System.Data.DataColumn("Staff_JobID", typeof(int), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_JobID);
                this.columnStaff_TypeID = new global::System.Data.DataColumn("Staff_TypeID", typeof(int), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_TypeID);
                this.columnPhoto_Path = new global::System.Data.DataColumn("Photo_Path", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnPhoto_Path);
                this.columnStaff_ZhiChengID = new global::System.Data.DataColumn("Staff_ZhiChengID", typeof(int), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_ZhiChengID);
                this.columnStaff_NationID = new global::System.Data.DataColumn("Staff_NationID", typeof(int), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_NationID);
                this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
                                this.columnStaff_ID}, true));
                this.columnStaff_ID.AutoIncrement = true;
                this.columnStaff_ID.AutoIncrementSeed = -1;
                this.columnStaff_ID.AutoIncrementStep = -1;
                this.columnStaff_ID.AllowDBNull = false;
                this.columnStaff_ID.ReadOnly = true;
                this.columnStaff_ID.Unique = true;
                this.columnStaff_Name.AllowDBNull = false;
                this.columnStaff_Name.MaxLength = 50;
                this.columnStaff_Sex.AllowDBNull = false;
                this.columnStaff_IDNumber.AllowDBNull = false;
                this.columnStaff_IDNumber.MaxLength = 18;
                this.columnStaff_Mobile.AllowDBNull = false;
                this.columnStaff_Mobile.MaxLength = 11;
                this.columnStaff_Phone.MaxLength = 15;
                this.columnStaff_Email.AllowDBNull = false;
                this.columnStaff_Email.MaxLength = 50;
                this.columnStaff_Address.MaxLength = 50;
                this.columnStaff_Education.AllowDBNull = false;
                this.columnStaff_Education.MaxLength = 20;
                this.columnStaff_DepartID.AllowDBNull = false;
                this.columnStaff_JobID.AllowDBNull = false;
                this.columnStaff_TypeID.AllowDBNull = false;
                this.columnPhoto_Path.MaxLength = 100;
                this.columnStaff_ZhiChengID.AllowDBNull = false;
                this.columnStaff_NationID.AllowDBNull = false;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_StaffRecordsRow NewT_StaffRecordsRow() {
                return ((T_StaffRecordsRow)(this.NewRow()));
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
                return new T_StaffRecordsRow(builder);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override global::System.Type GetRowType() {
                return typeof(T_StaffRecordsRow);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.T_StaffRecordsRowChanged != null)) {
                    this.T_StaffRecordsRowChanged(this, new T_StaffRecordsRowChangeEvent(((T_StaffRecordsRow)(e.Row)), e.Action));
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.T_StaffRecordsRowChanging != null)) {
                    this.T_StaffRecordsRowChanging(this, new T_StaffRecordsRowChangeEvent(((T_StaffRecordsRow)(e.Row)), e.Action));
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.T_StaffRecordsRowDeleted != null)) {
                    this.T_StaffRecordsRowDeleted(this, new T_StaffRecordsRowChangeEvent(((T_StaffRecordsRow)(e.Row)), e.Action));
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.T_StaffRecordsRowDeleting != null)) {
                    this.T_StaffRecordsRowDeleting(this, new T_StaffRecordsRowChangeEvent(((T_StaffRecordsRow)(e.Row)), e.Action));
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void RemoveT_StaffRecordsRow(T_StaffRecordsRow row) {
                this.Rows.Remove(row);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
                HR_DBDataSet ds = new HR_DBDataSet();
                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs = new decimal(0);
                any1.MaxOccurs = decimal.MaxValue;
                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs = new decimal(1);
                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name = "tableTypeName";
                attribute2.FixedValue = "T_StaffRecordsDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
                if (xs.Contains(dsSchema.TargetNamespace)) {
                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                    try {
                        global::System.Xml.Schema.XmlSchema schema = null;
                        dsSchema.Write(s1);
                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                            s2.SetLength(0);
                            schema.Write(s2);
                            if ((s1.Length == s2.Length)) {
                                s1.Position = 0;
                                s2.Position = 0;
                                for (; ((s1.Position != s1.Length) 
                                            && (s1.ReadByte() == s2.ReadByte())); ) {
                                    ;
                                }
                                if ((s1.Position == s1.Length)) {
                                    return type;
                                }
                            }
                        }
                    }
                    finally {
                        if ((s1 != null)) {
                            s1.Close();
                        }
                        if ((s2 != null)) {
                            s2.Close();
                        }
                    }
                }
                xs.Add(dsSchema);
                return type;
            }
        }
        
        /// <summary>
        ///Represents the strongly named DataTable class.
        ///</summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        [global::System.Serializable()]
        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class T_TrainingsDataTable : global::System.Data.TypedTableBase<T_TrainingsRow> {
            
            private global::System.Data.DataColumn columnTraining_ID;
            
            private global::System.Data.DataColumn columnStaff_ID;
            
            private global::System.Data.DataColumn columnTraining_StartTime;
            
            private global::System.Data.DataColumn columnTraining_EndTime;
            
            private global::System.Data.DataColumn columnTraining_Address;
            
            private global::System.Data.DataColumn columnTraining_Content;
            
            private global::System.Data.DataColumn columnTraining_Grade;
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_TrainingsDataTable() {
                this.TableName = "T_Trainings";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal T_TrainingsDataTable(global::System.Data.DataTable table) {
                this.TableName = 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;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected T_TrainingsDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Training_IDColumn {
                get {
                    return this.columnTraining_ID;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Staff_IDColumn {
                get {
                    return this.columnStaff_ID;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Training_StartTimeColumn {
                get {
                    return this.columnTraining_StartTime;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Training_EndTimeColumn {
                get {
                    return this.columnTraining_EndTime;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Training_AddressColumn {
                get {
                    return this.columnTraining_Address;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Training_ContentColumn {
                get {
                    return this.columnTraining_Content;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataColumn Training_GradeColumn {
                get {
                    return this.columnTraining_Grade;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            [global::System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_TrainingsRow this[int index] {
                get {
                    return ((T_TrainingsRow)(this.Rows[index]));
                }
            }
            
            public event T_TrainingsRowChangeEventHandler T_TrainingsRowChanging;
            
            public event T_TrainingsRowChangeEventHandler T_TrainingsRowChanged;
            
            public event T_TrainingsRowChangeEventHandler T_TrainingsRowDeleting;
            
            public event T_TrainingsRowChangeEventHandler T_TrainingsRowDeleted;
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void AddT_TrainingsRow(T_TrainingsRow row) {
                this.Rows.Add(row);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_TrainingsRow AddT_TrainingsRow(T_StaffRecordsRow parentT_StaffRecordsRowByFK_Ｔ_Trainings_T_StaffRecords, System.DateTime Training_StartTime, System.DateTime Training_EndTime, string Training_Address, string Training_Content, bool Training_Grade) {
                T_TrainingsRow rowT_TrainingsRow = ((T_TrainingsRow)(this.NewRow()));
                object[] columnValuesArray = new object[] {
                        null,
                        null,
                        Training_StartTime,
                        Training_EndTime,
                        Training_Address,
                        Training_Content,
                        Training_Grade};
                if ((parentT_StaffRecordsRowByFK_Ｔ_Trainings_T_StaffRecords != null)) {
                    columnValuesArray[1] = parentT_StaffRecordsRowByFK_Ｔ_Trainings_T_StaffRecords[0];
                }
                rowT_TrainingsRow.ItemArray = columnValuesArray;
                this.Rows.Add(rowT_TrainingsRow);
                return rowT_TrainingsRow;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_TrainingsRow FindByTraining_ID(int Training_ID) {
                return ((T_TrainingsRow)(this.Rows.Find(new object[] {
                            Training_ID})));
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public override global::System.Data.DataTable Clone() {
                T_TrainingsDataTable cln = ((T_TrainingsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override global::System.Data.DataTable CreateInstance() {
                return new T_TrainingsDataTable();
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal void InitVars() {
                this.columnTraining_ID = base.Columns["Training_ID"];
                this.columnStaff_ID = base.Columns["Staff_ID"];
                this.columnTraining_StartTime = base.Columns["Training_StartTime"];
                this.columnTraining_EndTime = base.Columns["Training_EndTime"];
                this.columnTraining_Address = base.Columns["Training_Address"];
                this.columnTraining_Content = base.Columns["Training_Content"];
                this.columnTraining_Grade = base.Columns["Training_Grade"];
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            private void InitClass() {
                this.columnTraining_ID = new global::System.Data.DataColumn("Training_ID", typeof(int), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnTraining_ID);
                this.columnStaff_ID = new global::System.Data.DataColumn("Staff_ID", typeof(int), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnStaff_ID);
                this.columnTraining_StartTime = new global::System.Data.DataColumn("Training_StartTime", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnTraining_StartTime);
                this.columnTraining_EndTime = new global::System.Data.DataColumn("Training_EndTime", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnTraining_EndTime);
                this.columnTraining_Address = new global::System.Data.DataColumn("Training_Address", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnTraining_Address);
                this.columnTraining_Content = new global::System.Data.DataColumn("Training_Content", typeof(string), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnTraining_Content);
                this.columnTraining_Grade = new global::System.Data.DataColumn("Training_Grade", typeof(bool), null, global::System.Data.MappingType.Element);
                base.Columns.Add(this.columnTraining_Grade);
                this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
                                this.columnTraining_ID}, true));
                this.columnTraining_ID.AutoIncrement = true;
                this.columnTraining_ID.AutoIncrementSeed = -1;
                this.columnTraining_ID.AutoIncrementStep = -1;
                this.columnTraining_ID.AllowDBNull = false;
                this.columnTraining_ID.ReadOnly = true;
                this.columnTraining_ID.Unique = true;
                this.columnStaff_ID.AllowDBNull = false;
                this.columnTraining_StartTime.AllowDBNull = false;
                this.columnTraining_EndTime.AllowDBNull = false;
                this.columnTraining_Address.AllowDBNull = false;
                this.columnTraining_Address.MaxLength = 50;
                this.columnTraining_Content.AllowDBNull = false;
                this.columnTraining_Content.MaxLength = 100;
                this.columnTraining_Grade.AllowDBNull = false;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_TrainingsRow NewT_TrainingsRow() {
                return ((T_TrainingsRow)(this.NewRow()));
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
                return new T_TrainingsRow(builder);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override global::System.Type GetRowType() {
                return typeof(T_TrainingsRow);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.T_TrainingsRowChanged != null)) {
                    this.T_TrainingsRowChanged(this, new T_TrainingsRowChangeEvent(((T_TrainingsRow)(e.Row)), e.Action));
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.T_TrainingsRowChanging != null)) {
                    this.T_TrainingsRowChanging(this, new T_TrainingsRowChangeEvent(((T_TrainingsRow)(e.Row)), e.Action));
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.T_TrainingsRowDeleted != null)) {
                    this.T_TrainingsRowDeleted(this, new T_TrainingsRowChangeEvent(((T_TrainingsRow)(e.Row)), e.Action));
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.T_TrainingsRowDeleting != null)) {
                    this.T_TrainingsRowDeleting(this, new T_TrainingsRowChangeEvent(((T_TrainingsRow)(e.Row)), e.Action));
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void RemoveT_TrainingsRow(T_TrainingsRow row) {
                this.Rows.Remove(row);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
                global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
                global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
                HR_DBDataSet ds = new HR_DBDataSet();
                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs = new decimal(0);
                any1.MaxOccurs = decimal.MaxValue;
                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs = new decimal(1);
                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name = "tableTypeName";
                attribute2.FixedValue = "T_TrainingsDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
                if (xs.Contains(dsSchema.TargetNamespace)) {
                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                    try {
                        global::System.Xml.Schema.XmlSchema schema = null;
                        dsSchema.Write(s1);
                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                            s2.SetLength(0);
                            schema.Write(s2);
                            if ((s1.Length == s2.Length)) {
                                s1.Position = 0;
                                s2.Position = 0;
                                for (; ((s1.Position != s1.Length) 
                                            && (s1.ReadByte() == s2.ReadByte())); ) {
                                    ;
                                }
                                if ((s1.Position == s1.Length)) {
                                    return type;
                                }
                            }
                        }
                    }
                    finally {
                        if ((s1 != null)) {
                            s1.Close();
                        }
                        if ((s2 != null)) {
                            s2.Close();
                        }
                    }
                }
                xs.Add(dsSchema);
                return type;
            }
        }
        
        /// <summary>
        ///Represents strongly named DataRow class.
        ///</summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public partial class T_StaffRecordsRow : global::System.Data.DataRow {
            
            private T_StaffRecordsDataTable tableT_StaffRecords;
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal T_StaffRecordsRow(global::System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableT_StaffRecords = ((T_StaffRecordsDataTable)(this.Table));
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int Staff_ID {
                get {
                    return ((int)(this[this.tableT_StaffRecords.Staff_IDColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_IDColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Staff_Name {
                get {
                    return ((string)(this[this.tableT_StaffRecords.Staff_NameColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_NameColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool Staff_Sex {
                get {
                    return ((bool)(this[this.tableT_StaffRecords.Staff_SexColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_SexColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Staff_IDNumber {
                get {
                    return ((string)(this[this.tableT_StaffRecords.Staff_IDNumberColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_IDNumberColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Staff_Mobile {
                get {
                    return ((string)(this[this.tableT_StaffRecords.Staff_MobileColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_MobileColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Staff_Phone {
                get {
                    try {
                        return ((string)(this[this.tableT_StaffRecords.Staff_PhoneColumn]));
                    }
                    catch (global::System.InvalidCastException e) {
                        throw new global::System.Data.StrongTypingException("表“T_StaffRecords”中列“Staff_Phone”的值为 DBNull。", e);
                    }
                }
                set {
                    this[this.tableT_StaffRecords.Staff_PhoneColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Staff_Email {
                get {
                    return ((string)(this[this.tableT_StaffRecords.Staff_EmailColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_EmailColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Staff_Address {
                get {
                    try {
                        return ((string)(this[this.tableT_StaffRecords.Staff_AddressColumn]));
                    }
                    catch (global::System.InvalidCastException e) {
                        throw new global::System.Data.StrongTypingException("表“T_StaffRecords”中列“Staff_Address”的值为 DBNull。", e);
                    }
                }
                set {
                    this[this.tableT_StaffRecords.Staff_AddressColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Staff_Education {
                get {
                    return ((string)(this[this.tableT_StaffRecords.Staff_EducationColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_EducationColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int Staff_DepartID {
                get {
                    return ((int)(this[this.tableT_StaffRecords.Staff_DepartIDColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_DepartIDColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int Staff_JobID {
                get {
                    return ((int)(this[this.tableT_StaffRecords.Staff_JobIDColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_JobIDColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int Staff_TypeID {
                get {
                    return ((int)(this[this.tableT_StaffRecords.Staff_TypeIDColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_TypeIDColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Photo_Path {
                get {
                    try {
                        return ((string)(this[this.tableT_StaffRecords.Photo_PathColumn]));
                    }
                    catch (global::System.InvalidCastException e) {
                        throw new global::System.Data.StrongTypingException("表“T_StaffRecords”中列“Photo_Path”的值为 DBNull。", e);
                    }
                }
                set {
                    this[this.tableT_StaffRecords.Photo_PathColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int Staff_ZhiChengID {
                get {
                    return ((int)(this[this.tableT_StaffRecords.Staff_ZhiChengIDColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_ZhiChengIDColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int Staff_NationID {
                get {
                    return ((int)(this[this.tableT_StaffRecords.Staff_NationIDColumn]));
                }
                set {
                    this[this.tableT_StaffRecords.Staff_NationIDColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsStaff_PhoneNull() {
                return this.IsNull(this.tableT_StaffRecords.Staff_PhoneColumn);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetStaff_PhoneNull() {
                this[this.tableT_StaffRecords.Staff_PhoneColumn] = global::System.Convert.DBNull;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsStaff_AddressNull() {
                return this.IsNull(this.tableT_StaffRecords.Staff_AddressColumn);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetStaff_AddressNull() {
                this[this.tableT_StaffRecords.Staff_AddressColumn] = global::System.Convert.DBNull;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsPhoto_PathNull() {
                return this.IsNull(this.tableT_StaffRecords.Photo_PathColumn);
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetPhoto_PathNull() {
                this[this.tableT_StaffRecords.Photo_PathColumn] = global::System.Convert.DBNull;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_TrainingsRow[] GetT_TrainingsRows() {
                if ((this.Table.ChildRelations["FK_Ｔ_Trainings_T_StaffRecords"] == null)) {
                    return new T_TrainingsRow[0];
                }
                else {
                    return ((T_TrainingsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Ｔ_Trainings_T_StaffRecords"])));
                }
            }
        }
        
        /// <summary>
        ///Represents strongly named DataRow class.
        ///</summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public partial class T_TrainingsRow : global::System.Data.DataRow {
            
            private T_TrainingsDataTable tableT_Trainings;
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal T_TrainingsRow(global::System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableT_Trainings = ((T_TrainingsDataTable)(this.Table));
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int Training_ID {
                get {
                    return ((int)(this[this.tableT_Trainings.Training_IDColumn]));
                }
                set {
                    this[this.tableT_Trainings.Training_IDColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int Staff_ID {
                get {
                    return ((int)(this[this.tableT_Trainings.Staff_IDColumn]));
                }
                set {
                    this[this.tableT_Trainings.Staff_IDColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.DateTime Training_StartTime {
                get {
                    return ((global::System.DateTime)(this[this.tableT_Trainings.Training_StartTimeColumn]));
                }
                set {
                    this[this.tableT_Trainings.Training_StartTimeColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public System.DateTime Training_EndTime {
                get {
                    return ((global::System.DateTime)(this[this.tableT_Trainings.Training_EndTimeColumn]));
                }
                set {
                    this[this.tableT_Trainings.Training_EndTimeColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Training_Address {
                get {
                    return ((string)(this[this.tableT_Trainings.Training_AddressColumn]));
                }
                set {
                    this[this.tableT_Trainings.Training_AddressColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string Training_Content {
                get {
                    return ((string)(this[this.tableT_Trainings.Training_ContentColumn]));
                }
                set {
                    this[this.tableT_Trainings.Training_ContentColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool Training_Grade {
                get {
                    return ((bool)(this[this.tableT_Trainings.Training_GradeColumn]));
                }
                set {
                    this[this.tableT_Trainings.Training_GradeColumn] = value;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_StaffRecordsRow T_StaffRecordsRow {
                get {
                    return ((T_StaffRecordsRow)(this.GetParentRow(this.Table.ParentRelations["FK_Ｔ_Trainings_T_StaffRecords"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["FK_Ｔ_Trainings_T_StaffRecords"]);
                }
            }
        }
        
        /// <summary>
        ///Row event argument class
        ///</summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public class T_StaffRecordsRowChangeEvent : global::System.EventArgs {
            
            private T_StaffRecordsRow eventRow;
            
            private global::System.Data.DataRowAction eventAction;
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_StaffRecordsRowChangeEvent(T_StaffRecordsRow row, global::System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_StaffRecordsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        /// <summary>
        ///Row event argument class
        ///</summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public class T_TrainingsRowChangeEvent : global::System.EventArgs {
            
            private T_TrainingsRow eventRow;
            
            private global::System.Data.DataRowAction eventAction;
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_TrainingsRowChangeEvent(T_TrainingsRow row, global::System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public T_TrainingsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public global::System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
namespace HRManagerSystem.HR_DBDataSetTableAdapters {
    
    
    /// <summary>
    ///Represents the connection and commands used to retrieve and save data.
    ///</summary>
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
    [global::System.ComponentModel.ToolboxItem(true)]
    [global::System.ComponentModel.DataObjectAttribute(true)]
    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
    public partial class T_StaffRecordsTableAdapter : global::System.ComponentModel.Component {
        
        private global::System.Data.SqlClient.SqlDataAdapter _adapter;
        
        private global::System.Data.SqlClient.SqlConnection _connection;
        
        private global::System.Data.SqlClient.SqlTransaction _transaction;
        
        private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
        
        private bool _clearBeforeFill;
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public T_StaffRecordsTableAdapter() {
            this.ClearBeforeFill = true;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this._adapter == null)) {
                    this.InitAdapter();
                }
                return this._adapter;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal global::System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this._connection == null)) {
                    this.InitConnection();
                }
                return this._connection;
            }
            set {
                this._connection = value;
                if ((this.Adapter.InsertCommand != null)) {
                    this.Adapter.InsertCommand.Connection = value;
                }
                if ((this.Adapter.DeleteCommand != null)) {
                    this.Adapter.DeleteCommand.Connection = value;
                }
                if ((this.Adapter.UpdateCommand != null)) {
                    this.Adapter.UpdateCommand.Connection = value;
                }
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    if ((this.CommandCollection[i] != null)) {
                        ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
                    }
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal global::System.Data.SqlClient.SqlTransaction Transaction {
            get {
                return this._transaction;
            }
            set {
                this._transaction = value;
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    this.CommandCollection[i].Transaction = this._transaction;
                }
                if (((this.Adapter != null) 
                            && (this.Adapter.DeleteCommand != null))) {
                    this.Adapter.DeleteCommand.Transaction = this._transaction;
                }
                if (((this.Adapter != null) 
                            && (this.Adapter.InsertCommand != null))) {
                    this.Adapter.InsertCommand.Transaction = this._transaction;
                }
                if (((this.Adapter != null) 
                            && (this.Adapter.UpdateCommand != null))) {
                    this.Adapter.UpdateCommand.Transaction = this._transaction;
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this._commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this._commandCollection;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public bool ClearBeforeFill {
            get {
                return this._clearBeforeFill;
            }
            set {
                this._clearBeforeFill = value;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitAdapter() {
            this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
            global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "T_StaffRecords";
            tableMapping.ColumnMappings.Add("Staff_ID", "Staff_ID");
            tableMapping.ColumnMappings.Add("Staff_Name", "Staff_Name");
            tableMapping.ColumnMappings.Add("Staff_Sex", "Staff_Sex");
            tableMapping.ColumnMappings.Add("Staff_IDNumber", "Staff_IDNumber");
            tableMapping.ColumnMappings.Add("Staff_Mobile", "Staff_Mobile");
            tableMapping.ColumnMappings.Add("Staff_Phone", "Staff_Phone");
            tableMapping.ColumnMappings.Add("Staff_Email", "Staff_Email");
            tableMapping.ColumnMappings.Add("Staff_Address", "Staff_Address");
            tableMapping.ColumnMappings.Add("Staff_Education", "Staff_Education");
            tableMapping.ColumnMappings.Add("Staff_DepartID", "Staff_DepartID");
            tableMapping.ColumnMappings.Add("Staff_JobID", "Staff_JobID");
            tableMapping.ColumnMappings.Add("Staff_TypeID", "Staff_TypeID");
            tableMapping.ColumnMappings.Add("Photo_Path", "Photo_Path");
            tableMapping.ColumnMappings.Add("Staff_ZhiChengID", "Staff_ZhiChengID");
            tableMapping.ColumnMappings.Add("Staff_NationID", "Staff_NationID");
            this._adapter.TableMappings.Add(tableMapping);
            this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
            this._adapter.DeleteCommand.Connection = this.Connection;
            this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[T_StaffRecords] WHERE (([Staff_ID] = @Original_Staff_ID) AND ([Staff_Name] = @Original_Staff_Name) AND ([Staff_Sex] = @Original_Staff_Sex) AND ([Staff_IDNumber] = @Original_Staff_IDNumber) AND ([Staff_Mobile] = @Original_Staff_Mobile) AND ((@IsNull_Staff_Phone = 1 AND [Staff_Phone] IS NULL) OR ([Staff_Phone] = @Original_Staff_Phone)) AND ([Staff_Email] = @Original_Staff_Email) AND ((@IsNull_Staff_Address = 1 AND [Staff_Address] IS NULL) OR ([Staff_Address] = @Original_Staff_Address)) AND ([Staff_Education] = @Original_Staff_Education) AND ([Staff_DepartID] = @Original_Staff_DepartID) AND ([Staff_JobID] = @Original_Staff_JobID) AND ([Staff_TypeID] = @Original_Staff_TypeID) AND ((@IsNull_Photo_Path = 1 AND [Photo_Path] IS NULL) OR ([Photo_Path] = @Original_Photo_Path)) AND ([Staff_ZhiChengID] = @Original_Staff_ZhiChengID) AND ([Staff_NationID] = @Original_Staff_NationID))";
            this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Sex", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Sex", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_IDNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_IDNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Mobile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Mobile", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Staff_Phone", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Phone", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Phone", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Email", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Staff_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Address", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Address", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Education", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Education", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_DepartID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_DepartID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_JobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_JobID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_TypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_TypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Photo_Path", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Photo_Path", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Photo_Path", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Photo_Path", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_ZhiChengID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ZhiChengID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_NationID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_NationID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
            this._adapter.InsertCommand.Connection = this.Connection;
            this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[T_StaffRecords] ([Staff_Name], [Staff_Sex], [Staff_IDNumber], [Staff_Mobile], [Staff_Phone], [Staff_Email], [Staff_Address], [Staff_Education], [Staff_DepartID], [Staff_JobID], [Staff_TypeID], [Photo_Path], [Staff_ZhiChengID], [Staff_NationID]) VALUES (@Staff_Name, @Staff_Sex, @Staff_IDNumber, @Staff_Mobile, @Staff_Phone, @Staff_Email, @Staff_Address, @Staff_Education, @Staff_DepartID, @Staff_JobID, @Staff_TypeID, @Photo_Path, @Staff_ZhiChengID, @Staff_NationID);
SELECT Staff_ID, Staff_Name, Staff_Sex, Staff_IDNumber, Staff_Mobile, Staff_Phone, Staff_Email, Staff_Address, Staff_Education, Staff_DepartID, Staff_JobID, Staff_TypeID, Photo_Path, Staff_ZhiChengID, Staff_NationID FROM T_StaffRecords WHERE (Staff_ID = SCOPE_IDENTITY())";
            this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Sex", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Sex", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_IDNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_IDNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Mobile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Mobile", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Phone", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Email", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Address", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Education", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Education", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_DepartID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_DepartID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_JobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_JobID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_TypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_TypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Photo_Path", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Photo_Path", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_ZhiChengID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ZhiChengID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_NationID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_NationID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
            this._adapter.UpdateCommand.Connection = this.Connection;
            this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[T_StaffRecords] SET [Staff_Name] = @Staff_Name, [Staff_Sex] = @Staf" +
                "f_Sex, [Staff_IDNumber] = @Staff_IDNumber, [Staff_Mobile] = @Staff_Mobile, [Staf" +
                "f_Phone] = @Staff_Phone, [Staff_Email] = @Staff_Email, [Staff_Address] = @Staff_" +
                "Address, [Staff_Education] = @Staff_Education, [Staff_DepartID] = @Staff_DepartI" +
                "D, [Staff_JobID] = @Staff_JobID, [Staff_TypeID] = @Staff_TypeID, [Photo_Path] = " +
                "@Photo_Path, [Staff_ZhiChengID] = @Staff_ZhiChengID, [Staff_NationID] = @Staff_N" +
                "ationID WHERE (([Staff_ID] = @Original_Staff_ID) AND ([Staff_Name] = @Original_S" +
                "taff_Name) AND ([Staff_Sex] = @Original_Staff_Sex) AND ([Staff_IDNumber] = @Orig" +
                "inal_Staff_IDNumber) AND ([Staff_Mobile] = @Original_Staff_Mobile) AND ((@IsNull" +
                "_Staff_Phone = 1 AND [Staff_Phone] IS NULL) OR ([Staff_Phone] = @Original_Staff_" +
                "Phone)) AND ([Staff_Email] = @Original_Staff_Email) AND ((@IsNull_Staff_Address " +
                "= 1 AND [Staff_Address] IS NULL) OR ([Staff_Address] = @Original_Staff_Address))" +
                " AND ([Staff_Education] = @Original_Staff_Education) AND ([Staff_DepartID] = @Or" +
                "iginal_Staff_DepartID) AND ([Staff_JobID] = @Original_Staff_JobID) AND ([Staff_T" +
                "ypeID] = @Original_Staff_TypeID) AND ((@IsNull_Photo_Path = 1 AND [Photo_Path] I" +
                "S NULL) OR ([Photo_Path] = @Original_Photo_Path)) AND ([Staff_ZhiChengID] = @Ori" +
                "ginal_Staff_ZhiChengID) AND ([Staff_NationID] = @Original_Staff_NationID));\r\nSEL" +
                "ECT Staff_ID, Staff_Name, Staff_Sex, Staff_IDNumber, Staff_Mobile, Staff_Phone, " +
                "Staff_Email, Staff_Address, Staff_Education, Staff_DepartID, Staff_JobID, Staff_" +
                "TypeID, Photo_Path, Staff_ZhiChengID, Staff_NationID FROM T_StaffRecords WHERE (" +
                "Staff_ID = @Staff_ID)";
            this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Sex", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Sex", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_IDNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_IDNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Mobile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Mobile", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Phone", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Email", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Address", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_Education", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Education", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_DepartID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_DepartID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_JobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_JobID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_TypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_TypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Photo_Path", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Photo_Path", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_ZhiChengID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ZhiChengID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_NationID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_NationID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Sex", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Sex", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_IDNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_IDNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Mobile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Mobile", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Staff_Phone", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Phone", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Phone", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Email", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Staff_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Address", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Address", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_Education", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_Education", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_DepartID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_DepartID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_JobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_JobID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_TypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_TypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Photo_Path", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Photo_Path", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Photo_Path", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Photo_Path", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_ZhiChengID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ZhiChengID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_NationID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_NationID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitConnection() {
            this._connection = new global::System.Data.SqlClient.SqlConnection();
            this._connection.ConnectionString = global::HRManagerSystem.Properties.Settings.Default.HR_DBConnectionString;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitCommandCollection() {
            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
            this._commandCollection[0].Connection = this.Connection;
            this._commandCollection[0].CommandText = "SELECT Staff_ID, Staff_Name, Staff_Sex, Staff_IDNumber, Staff_Mobile, Staff_Phone" +
                ", Staff_Email, Staff_Address, Staff_Education, Staff_DepartID, Staff_JobID, Staf" +
                "f_TypeID, Photo_Path, Staff_ZhiChengID, Staff_NationID FROM dbo.T_StaffRecords";
            this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(HR_DBDataSet.T_StaffRecordsDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.ClearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual HR_DBDataSet.T_StaffRecordsDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            HR_DBDataSet.T_StaffRecordsDataTable dataTable = new HR_DBDataSet.T_StaffRecordsDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(HR_DBDataSet.T_StaffRecordsDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(HR_DBDataSet dataSet) {
            return this.Adapter.Update(dataSet, "T_StaffRecords");
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(global::System.Data.DataRow dataRow) {
            return this.Adapter.Update(new global::System.Data.DataRow[] {
                        dataRow});
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(global::System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_Staff_ID, string Original_Staff_Name, bool Original_Staff_Sex, string Original_Staff_IDNumber, string Original_Staff_Mobile, string Original_Staff_Phone, string Original_Staff_Email, string Original_Staff_Address, string Original_Staff_Education, int Original_Staff_DepartID, int Original_Staff_JobID, int Original_Staff_TypeID, string Original_Photo_Path, int Original_Staff_ZhiChengID, int Original_Staff_NationID) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Staff_ID));
            if ((Original_Staff_Name == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_Name");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Staff_Name));
            }
            this.Adapter.DeleteCommand.Parameters[2].Value = ((bool)(Original_Staff_Sex));
            if ((Original_Staff_IDNumber == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_IDNumber");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Staff_IDNumber));
            }
            if ((Original_Staff_Mobile == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_Mobile");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Staff_Mobile));
            }
            if ((Original_Staff_Phone == null)) {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Staff_Phone));
            }
            if ((Original_Staff_Email == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_Email");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_Staff_Email));
            }
            if ((Original_Staff_Address == null)) {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_Staff_Address));
            }
            if ((Original_Staff_Education == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_Education");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_Staff_Education));
            }
            this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(Original_Staff_DepartID));
            this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_Staff_JobID));
            this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(Original_Staff_TypeID));
            if ((Original_Photo_Path == null)) {
                this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(1));
                this.Adapter.DeleteCommand.Parameters[15].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(0));
                this.Adapter.DeleteCommand.Parameters[15].Value = ((string)(Original_Photo_Path));
            }
            this.Adapter.DeleteCommand.Parameters[16].Value = ((int)(Original_Staff_ZhiChengID));
            this.Adapter.DeleteCommand.Parameters[17].Value = ((int)(Original_Staff_NationID));
            global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) 
                        != global::System.Data.ConnectionState.Open)) {
                this.Adapter.DeleteCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string Staff_Name, bool Staff_Sex, string Staff_IDNumber, string Staff_Mobile, string Staff_Phone, string Staff_Email, string Staff_Address, string Staff_Education, int Staff_DepartID, int Staff_JobID, int Staff_TypeID, string Photo_Path, int Staff_ZhiChengID, int Staff_NationID) {
            if ((Staff_Name == null)) {
                throw new global::System.ArgumentNullException("Staff_Name");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Staff_Name));
            }
            this.Adapter.InsertCommand.Parameters[1].Value = ((bool)(Staff_Sex));
            if ((Staff_IDNumber == null)) {
                throw new global::System.ArgumentNullException("Staff_IDNumber");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Staff_IDNumber));
            }
            if ((Staff_Mobile == null)) {
                throw new global::System.ArgumentNullException("Staff_Mobile");
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Staff_Mobile));
            }
            if ((Staff_Phone == null)) {
                this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Staff_Phone));
            }
            if ((Staff_Email == null)) {
                throw new global::System.ArgumentNullException("Staff_Email");
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Staff_Email));
            }
            if ((Staff_Address == null)) {
                this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Staff_Address));
            }
            if ((Staff_Education == null)) {
                throw new global::System.ArgumentNullException("Staff_Education");
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = ((string)(Staff_Education));
            }
            this.Adapter.InsertCommand.Parameters[8].Value = ((int)(Staff_DepartID));
            this.Adapter.InsertCommand.Parameters[9].Value = ((int)(Staff_JobID));
            this.Adapter.InsertCommand.Parameters[10].Value = ((int)(Staff_TypeID));
            if ((Photo_Path == null)) {
                this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[11].Value = ((string)(Photo_Path));
            }
            this.Adapter.InsertCommand.Parameters[12].Value = ((int)(Staff_ZhiChengID));
            this.Adapter.InsertCommand.Parameters[13].Value = ((int)(Staff_NationID));
            global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) 
                        != global::System.Data.ConnectionState.Open)) {
                this.Adapter.InsertCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string Staff_Name, 
                    bool Staff_Sex, 
                    string Staff_IDNumber, 
                    string Staff_Mobile, 
                    string Staff_Phone, 
                    string Staff_Email, 
                    string Staff_Address, 
                    string Staff_Education, 
                    int Staff_DepartID, 
                    int Staff_JobID, 
                    int Staff_TypeID, 
                    string Photo_Path, 
                    int Staff_ZhiChengID, 
                    int Staff_NationID, 
                    int Original_Staff_ID, 
                    string Original_Staff_Name, 
                    bool Original_Staff_Sex, 
                    string Original_Staff_IDNumber, 
                    string Original_Staff_Mobile, 
                    string Original_Staff_Phone, 
                    string Original_Staff_Email, 
                    string Original_Staff_Address, 
                    string Original_Staff_Education, 
                    int Original_Staff_DepartID, 
                    int Original_Staff_JobID, 
                    int Original_Staff_TypeID, 
                    string Original_Photo_Path, 
                    int Original_Staff_ZhiChengID, 
                    int Original_Staff_NationID, 
                    int Staff_ID) {
            if ((Staff_Name == null)) {
                throw new global::System.ArgumentNullException("Staff_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Staff_Name));
            }
            this.Adapter.UpdateCommand.Parameters[1].Value = ((bool)(Staff_Sex));
            if ((Staff_IDNumber == null)) {
                throw new global::System.ArgumentNullException("Staff_IDNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Staff_IDNumber));
            }
            if ((Staff_Mobile == null)) {
                throw new global::System.ArgumentNullException("Staff_Mobile");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Staff_Mobile));
            }
            if ((Staff_Phone == null)) {
                this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Staff_Phone));
            }
            if ((Staff_Email == null)) {
                throw new global::System.ArgumentNullException("Staff_Email");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Staff_Email));
            }
            if ((Staff_Address == null)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Staff_Address));
            }
            if ((Staff_Education == null)) {
                throw new global::System.ArgumentNullException("Staff_Education");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Staff_Education));
            }
            this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Staff_DepartID));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Staff_JobID));
            this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Staff_TypeID));
            if ((Photo_Path == null)) {
                this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Photo_Path));
            }
            this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Staff_ZhiChengID));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Staff_NationID));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_Staff_ID));
            if ((Original_Staff_Name == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_Name");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_Staff_Name));
            }
            this.Adapter.UpdateCommand.Parameters[16].Value = ((bool)(Original_Staff_Sex));
            if ((Original_Staff_IDNumber == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_IDNumber");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_Staff_IDNumber));
            }
            if ((Original_Staff_Mobile == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_Mobile");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_Staff_Mobile));
            }
            if ((Original_Staff_Phone == null)) {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_Staff_Phone));
            }
            if ((Original_Staff_Email == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_Email");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_Staff_Email));
            }
            if ((Original_Staff_Address == null)) {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_Staff_Address));
            }
            if ((Original_Staff_Education == null)) {
                throw new global::System.ArgumentNullException("Original_Staff_Education");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_Staff_Education));
            }
            this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Original_Staff_DepartID));
            this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(Original_Staff_JobID));
            this.Adapter.UpdateCommand.Parameters[27].Value = ((int)(Original_Staff_TypeID));
            if ((Original_Photo_Path == null)) {
                this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(1));
                this.Adapter.UpdateCommand.Parameters[29].Value = global::System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(0));
                this.Adapter.UpdateCommand.Parameters[29].Value = ((string)(Original_Photo_Path));
            }
            this.Adapter.UpdateCommand.Parameters[30].Value = ((int)(Original_Staff_ZhiChengID));
            this.Adapter.UpdateCommand.Parameters[31].Value = ((int)(Original_Staff_NationID));
            this.Adapter.UpdateCommand.Parameters[32].Value = ((int)(Staff_ID));
            global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) 
                        != global::System.Data.ConnectionState.Open)) {
                this.Adapter.UpdateCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string Staff_Name, 
                    bool Staff_Sex, 
                    string Staff_IDNumber, 
                    string Staff_Mobile, 
                    string Staff_Phone, 
                    string Staff_Email, 
                    string Staff_Address, 
                    string Staff_Education, 
                    int Staff_DepartID, 
                    int Staff_JobID, 
                    int Staff_TypeID, 
                    string Photo_Path, 
                    int Staff_ZhiChengID, 
                    int Staff_NationID, 
                    int Original_Staff_ID, 
                    string Original_Staff_Name, 
                    bool Original_Staff_Sex, 
                    string Original_Staff_IDNumber, 
                    string Original_Staff_Mobile, 
                    string Original_Staff_Phone, 
                    string Original_Staff_Email, 
                    string Original_Staff_Address, 
                    string Original_Staff_Education, 
                    int Original_Staff_DepartID, 
                    int Original_Staff_JobID, 
                    int Original_Staff_TypeID, 
                    string Original_Photo_Path, 
                    int Original_Staff_ZhiChengID, 
                    int Original_Staff_NationID) {
            return this.Update(Staff_Name, Staff_Sex, Staff_IDNumber, Staff_Mobile, Staff_Phone, Staff_Email, Staff_Address, Staff_Education, Staff_DepartID, Staff_JobID, Staff_TypeID, Photo_Path, Staff_ZhiChengID, Staff_NationID, Original_Staff_ID, Original_Staff_Name, Original_Staff_Sex, Original_Staff_IDNumber, Original_Staff_Mobile, Original_Staff_Phone, Original_Staff_Email, Original_Staff_Address, Original_Staff_Education, Original_Staff_DepartID, Original_Staff_JobID, Original_Staff_TypeID, Original_Photo_Path, Original_Staff_ZhiChengID, Original_Staff_NationID, Original_Staff_ID);
        }
    }
    
    /// <summary>
    ///Represents the connection and commands used to retrieve and save data.
    ///</summary>
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
    [global::System.ComponentModel.ToolboxItem(true)]
    [global::System.ComponentModel.DataObjectAttribute(true)]
    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
    public partial class T_TrainingsTableAdapter : global::System.ComponentModel.Component {
        
        private global::System.Data.SqlClient.SqlDataAdapter _adapter;
        
        private global::System.Data.SqlClient.SqlConnection _connection;
        
        private global::System.Data.SqlClient.SqlTransaction _transaction;
        
        private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
        
        private bool _clearBeforeFill;
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public T_TrainingsTableAdapter() {
            this.ClearBeforeFill = true;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
            get {
                if ((this._adapter == null)) {
                    this.InitAdapter();
                }
                return this._adapter;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal global::System.Data.SqlClient.SqlConnection Connection {
            get {
                if ((this._connection == null)) {
                    this.InitConnection();
                }
                return this._connection;
            }
            set {
                this._connection = value;
                if ((this.Adapter.InsertCommand != null)) {
                    this.Adapter.InsertCommand.Connection = value;
                }
                if ((this.Adapter.DeleteCommand != null)) {
                    this.Adapter.DeleteCommand.Connection = value;
                }
                if ((this.Adapter.UpdateCommand != null)) {
                    this.Adapter.UpdateCommand.Connection = value;
                }
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    if ((this.CommandCollection[i] != null)) {
                        ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
                    }
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal global::System.Data.SqlClient.SqlTransaction Transaction {
            get {
                return this._transaction;
            }
            set {
                this._transaction = value;
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    this.CommandCollection[i].Transaction = this._transaction;
                }
                if (((this.Adapter != null) 
                            && (this.Adapter.DeleteCommand != null))) {
                    this.Adapter.DeleteCommand.Transaction = this._transaction;
                }
                if (((this.Adapter != null) 
                            && (this.Adapter.InsertCommand != null))) {
                    this.Adapter.InsertCommand.Transaction = this._transaction;
                }
                if (((this.Adapter != null) 
                            && (this.Adapter.UpdateCommand != null))) {
                    this.Adapter.UpdateCommand.Transaction = this._transaction;
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
            get {
                if ((this._commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this._commandCollection;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public bool ClearBeforeFill {
            get {
                return this._clearBeforeFill;
            }
            set {
                this._clearBeforeFill = value;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitAdapter() {
            this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
            global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "T_Trainings";
            tableMapping.ColumnMappings.Add("Training_ID", "Training_ID");
            tableMapping.ColumnMappings.Add("Staff_ID", "Staff_ID");
            tableMapping.ColumnMappings.Add("Training_StartTime", "Training_StartTime");
            tableMapping.ColumnMappings.Add("Training_EndTime", "Training_EndTime");
            tableMapping.ColumnMappings.Add("Training_Address", "Training_Address");
            tableMapping.ColumnMappings.Add("Training_Content", "Training_Content");
            tableMapping.ColumnMappings.Add("Training_Grade", "Training_Grade");
            this._adapter.TableMappings.Add(tableMapping);
            this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
            this._adapter.DeleteCommand.Connection = this.Connection;
            this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[T_Trainings] WHERE (([Training_ID] = @Original_Training_ID) AND ([Staff_ID] = @Original_Staff_ID) AND ([Training_StartTime] = @Original_Training_StartTime) AND ([Training_EndTime] = @Original_Training_EndTime) AND ([Training_Address] = @Original_Training_Address) AND ([Training_Content] = @Original_Training_Content) AND ([Training_Grade] = @Original_Training_Grade))";
            this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_StartTime", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_StartTime", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_EndTime", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_EndTime", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Address", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_Content", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Content", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_Grade", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Grade", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
            this._adapter.InsertCommand.Connection = this.Connection;
            this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[T_Trainings] ([Staff_ID], [Training_StartTime], [Training_EndTime], [Training_Address], [Training_Content], [Training_Grade]) VALUES (@Staff_ID, @Training_StartTime, @Training_EndTime, @Training_Address, @Training_Content, @Training_Grade);
SELECT Training_ID, Staff_ID, Training_StartTime, Training_EndTime, Training_Address, Training_Content, Training_Grade FROM T_Trainings WHERE (Training_ID = SCOPE_IDENTITY())";
            this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_StartTime", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_StartTime", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_EndTime", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_EndTime", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Address", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_Content", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Content", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_Grade", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Grade", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
            this._adapter.UpdateCommand.Connection = this.Connection;
            this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[T_Trainings] SET [Staff_ID] = @Staff_ID, [Training_StartTime] = @Training_StartTime, [Training_EndTime] = @Training_EndTime, [Training_Address] = @Training_Address, [Training_Content] = @Training_Content, [Training_Grade] = @Training_Grade WHERE (([Training_ID] = @Original_Training_ID) AND ([Staff_ID] = @Original_Staff_ID) AND ([Training_StartTime] = @Original_Training_StartTime) AND ([Training_EndTime] = @Original_Training_EndTime) AND ([Training_Address] = @Original_Training_Address) AND ([Training_Content] = @Original_Training_Content) AND ([Training_Grade] = @Original_Training_Grade));
SELECT Training_ID, Staff_ID, Training_StartTime, Training_EndTime, Training_Address, Training_Content, Training_Grade FROM T_Trainings WHERE (Training_ID = @Training_ID)";
            this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Staff_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_StartTime", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_StartTime", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_EndTime", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_EndTime", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Address", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_Content", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Content", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_Grade", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Grade", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Staff_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Staff_ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_StartTime", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_StartTime", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_EndTime", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_EndTime", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Address", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_Content", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Content", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Training_Grade", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Training_Grade", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Training_ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Training_ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitConnection() {
            this._connection = new global::System.Data.SqlClient.SqlConnection();
            this._connection.ConnectionString = global::HRManagerSystem.Properties.Settings.Default.HR_DBConnectionString;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitCommandCollection() {
            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
            this._commandCollection[0].Connection = this.Connection;
            this._commandCollection[0].CommandText = "SELECT Training_ID, Staff_ID, Training_StartTime, Training_EndTime, Training_Addr" +
                "ess, Training_Content, Training_Grade FROM dbo.T_Trainings";
            this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(HR_DBDataSet.T_TrainingsDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.ClearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual HR_DBDataSet.T_TrainingsDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            HR_DBDataSet.T_TrainingsDataTable dataTable = new HR_DBDataSet.T_TrainingsDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(HR_DBDataSet.T_TrainingsDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(HR_DBDataSet dataSet) {
            return this.Adapter.Update(dataSet, "T_Trainings");
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(global::System.Data.DataRow dataRow) {
            return this.Adapter.Update(new global::System.Data.DataRow[] {
                        dataRow});
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(global::System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int Original_Training_ID, int Original_Staff_ID, System.DateTime Original_Training_StartTime, System.DateTime Original_Training_EndTime, string Original_Training_Address, string Original_Training_Content, bool Original_Training_Grade) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Training_ID));
            this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_Staff_ID));
            this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_Training_StartTime));
            this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_Training_EndTime));
            if ((Original_Training_Address == null)) {
                throw new global::System.ArgumentNullException("Original_Training_Address");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Training_Address));
            }
            if ((Original_Training_Content == null)) {
                throw new global::System.ArgumentNullException("Original_Training_Content");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_Training_Content));
            }
            this.Adapter.DeleteCommand.Parameters[6].Value = ((bool)(Original_Training_Grade));
            global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) 
                        != global::System.Data.ConnectionState.Open)) {
                this.Adapter.DeleteCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(int Staff_ID, System.DateTime Training_StartTime, System.DateTime Training_EndTime, string Training_Address, string Training_Content, bool Training_Grade) {
            this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Staff_ID));
            this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(Training_StartTime));
            this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(Training_EndTime));
            if ((Training_Address == null)) {
                throw new global::System.ArgumentNullException("Training_Address");
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Training_Address));
            }
            if ((Training_Content == null)) {
                throw new global::System.ArgumentNullException("Training_Content");
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Training_Content));
            }
            this.Adapter.InsertCommand.Parameters[5].Value = ((bool)(Training_Grade));
            global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) 
                        != global::System.Data.ConnectionState.Open)) {
                this.Adapter.InsertCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int Staff_ID, System.DateTime Training_StartTime, System.DateTime Training_EndTime, string Training_Address, string Training_Content, bool Training_Grade, int Original_Training_ID, int Original_Staff_ID, System.DateTime Original_Training_StartTime, System.DateTime Original_Training_EndTime, string Original_Training_Address, string Original_Training_Content, bool Original_Training_Grade, int Training_ID) {
            this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Staff_ID));
            this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(Training_StartTime));
            this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(Training_EndTime));
            if ((Training_Address == null)) {
                throw new global::System.ArgumentNullException("Training_Address");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Training_Address));
            }
            if ((Training_Content == null)) {
                throw new global::System.ArgumentNullException("Training_Content");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Training_Content));
            }
            this.Adapter.UpdateCommand.Parameters[5].Value = ((bool)(Training_Grade));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Training_ID));
            this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Staff_ID));
            this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_Training_StartTime));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_Training_EndTime));
            if ((Original_Training_Address == null)) {
                throw new global::System.ArgumentNullException("Original_Training_Address");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Training_Address));
            }
            if ((Original_Training_Content == null)) {
                throw new global::System.ArgumentNullException("Original_Training_Content");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Training_Content));
            }
            this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(Original_Training_Grade));
            this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Training_ID));
            global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) 
                        != global::System.Data.ConnectionState.Open)) {
                this.Adapter.UpdateCommand.Connection.Open();
            }
            try {
                int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
                return returnValue;
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(int Staff_ID, System.DateTime Training_StartTime, System.DateTime Training_EndTime, string Training_Address, string Training_Content, bool Training_Grade, int Original_Training_ID, int Original_Staff_ID, System.DateTime Original_Training_StartTime, System.DateTime Original_Training_EndTime, string Original_Training_Address, string Original_Training_Content, bool Original_Training_Grade) {
            return this.Update(Staff_ID, Training_StartTime, Training_EndTime, Training_Address, Training_Content, Training_Grade, Original_Training_ID, Original_Staff_ID, Original_Training_StartTime, Original_Training_EndTime, Original_Training_Address, Original_Training_Content, Original_Training_Grade, Original_Training_ID);
        }
    }
    
    /// <summary>
    ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
    ///</summary>
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
    [global::System.ComponentModel.ToolboxItem(true)]
    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
        "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
    public partial class TableAdapterManager : global::System.ComponentModel.Component {
        
        private UpdateOrderOption _updateOrder;
        
        private T_StaffRecordsTableAdapter _t_StaffRecordsTableAdapter;
        
        private T_TrainingsTableAdapter _t_TrainingsTableAdapter;
        
        private bool _backupDataSetBeforeUpdate;
        
        private global::System.Data.IDbConnection _connection;
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public UpdateOrderOption UpdateOrder {
            get {
                return this._updateOrder;
            }
            set {
                this._updateOrder = value;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
            "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
            "", "System.Drawing.Design.UITypeEditor")]
        public T_StaffRecordsTableAdapter T_StaffRecordsTableAdapter {
            get {
                return this._t_StaffRecordsTableAdapter;
            }
            set {
                if (((this._t_StaffRecordsTableAdapter != null) 
                            && (this.TableAdapterInstanceCount == 1))) {
                    this._t_StaffRecordsTableAdapter = value;
                    return;
                }
                if (((value != null) 
                            && (this.MatchTableAdapterConnection(value.Connection) == false))) {
                    throw new global::System.ArgumentException("由 TableAdapterManager 管理的所有 TableAdapter 必须使用相同的连接字符串。");
                }
                this._t_StaffRecordsTableAdapter = value;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
            "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +
            "", "System.Drawing.Design.UITypeEditor")]
        public T_TrainingsTableAdapter T_TrainingsTableAdapter {
            get {
                return this._t_TrainingsTableAdapter;
            }
            set {
                if (((this._t_TrainingsTableAdapter != null) 
                            && (this.TableAdapterInstanceCount == 1))) {
                    this._t_TrainingsTableAdapter = value;
                    return;
                }
                if (((value != null) 
                            && (this.MatchTableAdapterConnection(value.Connection) == false))) {
                    throw new global::System.ArgumentException("由 TableAdapterManager 管理的所有 TableAdapter 必须使用相同的连接字符串。");
                }
                this._t_TrainingsTableAdapter = value;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public bool BackupDataSetBeforeUpdate {
            get {
                return this._backupDataSetBeforeUpdate;
            }
            set {
                this._backupDataSetBeforeUpdate = value;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Browsable(false)]
        public global::System.Data.IDbConnection Connection {
            get {
                if ((this._connection != null)) {
                    return this._connection;
                }
                if (((this._t_StaffRecordsTableAdapter != null) 
                            && (this._t_StaffRecordsTableAdapter.Connection != null))) {
                    return this._t_StaffRecordsTableAdapter.Connection;
                }
                if (((this._t_TrainingsTableAdapter != null) 
                            && (this._t_TrainingsTableAdapter.Connection != null))) {
                    return this._t_TrainingsTableAdapter.Connection;
                }
                return null;
            }
            set {
                this._connection = value;
            }
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.ComponentModel.Browsable(false)]
        public int TableAdapterInstanceCount {
            get {
                int count = 0;
                if ((this._t_StaffRecordsTableAdapter != null)) {
                    count = (count + 1);
                }
                if ((this._t_TrainingsTableAdapter != null)) {
                    count = (count + 1);
                }
                return count;
            }
        }
        
        /// <summary>
        ///Update rows in top-down order.
        ///</summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private int UpdateUpdatedRows(HR_DBDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
            int result = 0;
            if ((this._t_StaffRecordsTableAdapter != null)) {
                global::System.Data.DataRow[] updatedRows = dataSet.T_StaffRecords.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
                updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
                if (((updatedRows != null) 
                            && (0 < updatedRows.Length))) {
                    result = (result + this._t_StaffRecordsTableAdapter.Update(updatedRows));
                    allChangedRows.AddRange(updatedRows);
                }
            }
            if ((this._t_TrainingsTableAdapter != null)) {
                global::System.Data.DataRow[] updatedRows = dataSet.T_Trainings.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
                updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
                if (((updatedRows != null) 
                            && (0 < updatedRows.Length))) {
                    result = (result + this._t_TrainingsTableAdapter.Update(updatedRows));
                    allChangedRows.AddRange(updatedRows);
                }
            }
            return result;
        }
        
        /// <summary>
        ///Insert rows in top-down order.
        ///</summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private int UpdateInsertedRows(HR_DBDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
            int result = 0;
            if ((this._t_StaffRecordsTableAdapter != null)) {
                global::System.Data.DataRow[] addedRows = dataSet.T_StaffRecords.Select(null, null, global::System.Data.DataViewRowState.Added);
                if (((addedRows != null) 
                            && (0 < addedRows.Length))) {
                    result = (result + this._t_StaffRecordsTableAdapter.Update(addedRows));
                    allAddedRows.AddRange(addedRows);
                }
            }
            if ((this._t_TrainingsTableAdapter != null)) {
                global::System.Data.DataRow[] addedRows = dataSet.T_Trainings.Select(null, null, global::System.Data.DataViewRowState.Added);
                if (((addedRows != null) 
                            && (0 < addedRows.Length))) {
                    result = (result + this._t_TrainingsTableAdapter.Update(addedRows));
                    allAddedRows.AddRange(addedRows);
                }
            }
            return result;
        }
        
        /// <summary>
        ///Delete rows in bottom-up order.
        ///</summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private int UpdateDeletedRows(HR_DBDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
            int result = 0;
            if ((this._t_TrainingsTableAdapter != null)) {
                global::System.Data.DataRow[] deletedRows = dataSet.T_Trainings.Select(null, null, global::System.Data.DataViewRowState.Deleted);
                if (((deletedRows != null) 
                            && (0 < deletedRows.Length))) {
                    result = (result + this._t_TrainingsTableAdapter.Update(deletedRows));
                    allChangedRows.AddRange(deletedRows);
                }
            }
            if ((this._t_StaffRecordsTableAdapter != null)) {
                global::System.Data.DataRow[] deletedRows = dataSet.T_StaffRecords.Select(null, null, global::System.Data.DataViewRowState.Deleted);
                if (((deletedRows != null) 
                            && (0 < deletedRows.Length))) {
                    result = (result + this._t_StaffRecordsTableAdapter.Update(deletedRows));
                    allChangedRows.AddRange(deletedRows);
                }
            }
            return result;
        }
        
        /// <summary>
        ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
        ///</summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
            if (((updatedRows == null) 
                        || (updatedRows.Length < 1))) {
                return updatedRows;
            }
            if (((allAddedRows == null) 
                        || (allAddedRows.Count < 1))) {
                return updatedRows;
            }
            global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
            for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
                global::System.Data.DataRow row = updatedRows[i];
                if ((allAddedRows.Contains(row) == false)) {
                    realUpdatedRows.Add(row);
                }
            }
            return realUpdatedRows.ToArray();
        }
        
        /// <summary>
        ///Update all changes to the dataset.
        ///</summary>
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public virtual int UpdateAll(HR_DBDataSet dataSet) {
            if ((dataSet == null)) {
                throw new global::System.ArgumentNullException("dataSet");
            }
            if ((dataSet.HasChanges() == false)) {
                return 0;
            }
            global::System.Data.IDbConnection workConnection = this.Connection;
            if ((workConnection == null)) {
                throw new global::System.ApplicationException("TableAdapterManager 不包含任何连接信息。请将每个 TableAdapterManager TableAdapter 属性设置为有效的 Tabl" +
                        "eAdapter 实例。");
            }
            bool workConnOpened = false;
            if (((workConnection.State & global::System.Data.ConnectionState.Closed) 
                        == global::System.Data.ConnectionState.Closed)) {
                workConnection.Open();
                workConnOpened = true;
            }
            global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
            if ((workTransaction == null)) {
                throw new global::System.ApplicationException("事务无法开始。当前的数据连接不支持事务或当前状态不允许事务开始。");
            }
            global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
            global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
            global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
            global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
            int result = 0;
            global::System.Data.DataSet backupDataSet = null;
            if (this.BackupDataSetBeforeUpdate) {
                backupDataSet = new global::System.Data.DataSet();
                backupDataSet.Merge(dataSet);
            }
            try {
                // ---- Prepare for update -----------
                //
                if ((this._t_StaffRecordsTableAdapter != null)) {
                    revertConnections.Add(this._t_StaffRecordsTableAdapter, this._t_StaffRecordsTableAdapter.Connection);
                    this._t_StaffRecordsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
                    this._t_StaffRecordsTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
                    if (this._t_StaffRecordsTableAdapter.Adapter.AcceptChangesDuringUpdate) {
                        this._t_StaffRecordsTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
                        adaptersWithAcceptChangesDuringUpdate.Add(this._t_StaffRecordsTableAdapter.Adapter);
                    }
                }
                if ((this._t_TrainingsTableAdapter != null)) {
                    revertConnections.Add(this._t_TrainingsTableAdapter, this._t_TrainingsTableAdapter.Connection);
                    this._t_TrainingsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
                    this._t_TrainingsTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
                    if (this._t_TrainingsTableAdapter.Adapter.AcceptChangesDuringUpdate) {
                        this._t_TrainingsTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
                        adaptersWithAcceptChangesDuringUpdate.Add(this._t_TrainingsTableAdapter.Adapter);
                    }
                }
                // 
                //---- Perform updates -----------
                //
                if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
                    result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
                    result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
                }
                else {
                    result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
                    result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
                }
                result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
                // 
                //---- Commit updates -----------
                //
                workTransaction.Commit();
                if ((0 < allAddedRows.Count)) {
                    global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
                    allAddedRows.CopyTo(rows);
                    for (int i = 0; (i < rows.Length); i = (i + 1)) {
                        global::System.Data.DataRow row = rows[i];
                        row.AcceptChanges();
                    }
                }
                if ((0 < allChangedRows.Count)) {
                    global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
                    allChangedRows.CopyTo(rows);
                    for (int i = 0; (i < rows.Length); i = (i + 1)) {
                        global::System.Data.DataRow row = rows[i];
                        row.AcceptChanges();
                    }
                }
            }
            catch (global::System.Exception ex) {
                workTransaction.Rollback();
                // ---- Restore the dataset -----------
                if (this.BackupDataSetBeforeUpdate) {
                    global::System.Diagnostics.Debug.Assert((backupDataSet != null));
                    dataSet.Clear();
                    dataSet.Merge(backupDataSet);
                }
                else {
                    if ((0 < allAddedRows.Count)) {
                        global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
                        allAddedRows.CopyTo(rows);
                        for (int i = 0; (i < rows.Length); i = (i + 1)) {
                            global::System.Data.DataRow row = rows[i];
                            row.AcceptChanges();
                            row.SetAdded();
                        }
                    }
                }
                throw ex;
            }
            finally {
                if (workConnOpened) {
                    workConnection.Close();
                }
                if ((this._t_StaffRecordsTableAdapter != null)) {
                    this._t_StaffRecordsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._t_StaffRecordsTableAdapter]));
                    this._t_StaffRecordsTableAdapter.Transaction = null;
                }
                if ((this._t_TrainingsTableAdapter != null)) {
                    this._t_TrainingsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._t_TrainingsTableAdapter]));
                    this._t_TrainingsTableAdapter.Transaction = null;
                }
                if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
                    global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
                    adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
                    for (int i = 0; (i < adapters.Length); i = (i + 1)) {
                        global::System.Data.Common.DataAdapter adapter = adapters[i];
                        adapter.AcceptChangesDuringUpdate = true;
                    }
                }
            }
            return result;
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
            global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
        }
        
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
            if ((this._connection != null)) {
                return true;
            }
            if (((this.Connection == null) 
                        || (inputConnection == null))) {
                return true;
            }
            if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
                return true;
            }
            return false;
        }
        
        /// <summary>
        ///Update Order Option
        ///</summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        public enum UpdateOrderOption {
            
            InsertUpdateDelete = 0,
            
            UpdateInsertDelete = 1,
        }
        
        /// <summary>
        ///Used to sort self-referenced table's rows
        ///</summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
        private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
            
            private global::System.Data.DataRelation _relation;
            
            private int _childFirst;
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
                this._relation = relation;
                if (childFirst) {
                    this._childFirst = -1;
                }
                else {
                    this._childFirst = 1;
                }
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) {
                global::System.Diagnostics.Debug.Assert((child != null));
                global::System.Diagnostics.Debug.Assert((parent != null));
                global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
                for (
                ; ((newParent != null) 
                            && ((object.ReferenceEquals(newParent, child) == false) 
                            && (object.ReferenceEquals(newParent, parent) == false))); 
                ) {
                    newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
                }
                if ((newParent == null)) {
                    for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null) 
                                && ((object.ReferenceEquals(newParent, child) == false) 
                                && (object.ReferenceEquals(newParent, parent) == false))); 
                    ) {
                        newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
                    }
                }
                if (object.ReferenceEquals(newParent, parent)) {
                    return true;
                }
                return false;
            }
            
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
                if (object.ReferenceEquals(row1, row2)) {
                    return 0;
                }
                if ((row1 == null)) {
                    return -1;
                }
                if ((row2 == null)) {
                    return 1;
                }

                // Is row1 the child or grandchild of row2
                if (this.IsChildAndParent(row1, row2)) {
                    return this._childFirst;
                }

                // Is row2 the child or grandchild of row1
                if (this.IsChildAndParent(row2, row1)) {
                    return (-1 * this._childFirst);
                }
                return 0;
            }
        }
    }
}

#pragma warning restore 1591