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

📄 staffdataset.cs

📁 UDS Oa 用 vs2008重新编译, 替换了里面的 tree和一些不再支持的控件. 不过不知道是原始文件的问题还是升级造成的,有些功能不太正常. 只包含网站,数据库,文档等请自己搜索
💻 CS
📖 第 1 页 / 共 2 页
字号:
                        Email,
                        Mobile,
                        SexName,
                        Position_Name};
                this.Rows.Add(rowStaffViewRow);
                return rowStaffViewRow;
            }

            public System.Collections.IEnumerator GetEnumerator()
            {
                return this.Rows.GetEnumerator();
            }

            public override DataTable Clone()
            {
                StaffViewDataTable cln = ((StaffViewDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }

            protected override DataTable CreateInstance()
            {
                return new StaffViewDataTable();
            }

            public void InitVars()
            {
                this.columnStaff_Name = this.Columns["Staff_Name"];
                this.columnRealName = this.Columns["RealName"];
                this.columnEmail = this.Columns["Email"];
                this.columnMobile = this.Columns["Mobile"];
                this.columnSexName = this.Columns["SexName"];
                this.columnPosition_Name = this.Columns["Position_Name"];
            }

            private void InitClass()
            {
                this.columnStaff_Name = new DataColumn("Staff_Name", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnStaff_Name);
                this.columnRealName = new DataColumn("RealName", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnRealName);
                this.columnEmail = new DataColumn("Email", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnEmail);
                this.columnMobile = new DataColumn("Mobile", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnMobile);
                this.columnSexName = new DataColumn("SexName", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnSexName);
                this.columnPosition_Name = new DataColumn("Position_Name", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPosition_Name);
                this.columnStaff_Name.AllowDBNull = false;
                this.columnSexName.AllowDBNull = false;
                this.columnPosition_Name.AllowDBNull = false;
            }

            public StaffViewRow NewStaffViewRow()
            {
                return ((StaffViewRow)(this.NewRow()));
            }

            protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
            {
                return new StaffViewRow(builder);
            }

            protected override System.Type GetRowType()
            {
                return typeof(StaffViewRow);
            }

            protected override void OnRowChanged(DataRowChangeEventArgs e)
            {
                base.OnRowChanged(e);
                if ((this.StaffViewRowChanged != null))
                {
                    this.StaffViewRowChanged(this, new StaffViewRowChangeEvent(((StaffViewRow)(e.Row)), e.Action));
                }
            }

            protected override void OnRowChanging(DataRowChangeEventArgs e)
            {
                base.OnRowChanging(e);
                if ((this.StaffViewRowChanging != null))
                {
                    this.StaffViewRowChanging(this, new StaffViewRowChangeEvent(((StaffViewRow)(e.Row)), e.Action));
                }
            }

            protected override void OnRowDeleted(DataRowChangeEventArgs e)
            {
                base.OnRowDeleted(e);
                if ((this.StaffViewRowDeleted != null))
                {
                    this.StaffViewRowDeleted(this, new StaffViewRowChangeEvent(((StaffViewRow)(e.Row)), e.Action));
                }
            }

            protected override void OnRowDeleting(DataRowChangeEventArgs e)
            {
                base.OnRowDeleting(e);
                if ((this.StaffViewRowDeleting != null))
                {
                    this.StaffViewRowDeleting(this, new StaffViewRowChangeEvent(((StaffViewRow)(e.Row)), e.Action));
                }
            }

            public void RemoveStaffViewRow(StaffViewRow row)
            {
                this.Rows.Remove(row);
            }
        }

        [System.Diagnostics.DebuggerStepThrough()]
        public partial class StaffViewRow : DataRow
        {

            private StaffViewDataTable tableStaffView;

            public StaffViewRow(DataRowBuilder rb) :
                base(rb)
            {
                this.tableStaffView = ((StaffViewDataTable)(this.Table));
            }

            public string Staff_Name
            {
                get
                {
                    return ((string)(this[this.tableStaffView.Staff_NameColumn]));
                }
                set
                {
                    this[this.tableStaffView.Staff_NameColumn] = value;
                }
            }

            public string RealName
            {
                get
                {
                    try
                    {
                        return ((string)(this[this.tableStaffView.RealNameColumn]));
                    }
                    catch (InvalidCastException e)
                    {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set
                {
                    this[this.tableStaffView.RealNameColumn] = value;
                }
            }

            public string Email
            {
                get
                {
                    try
                    {
                        return ((string)(this[this.tableStaffView.EmailColumn]));
                    }
                    catch (InvalidCastException e)
                    {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set
                {
                    this[this.tableStaffView.EmailColumn] = value;
                }
            }

            public string Mobile
            {
                get
                {
                    try
                    {
                        return ((string)(this[this.tableStaffView.MobileColumn]));
                    }
                    catch (InvalidCastException e)
                    {
                        throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
                    }
                }
                set
                {
                    this[this.tableStaffView.MobileColumn] = value;
                }
            }

            public string SexName
            {
                get
                {
                    return ((string)(this[this.tableStaffView.SexNameColumn]));
                }
                set
                {
                    this[this.tableStaffView.SexNameColumn] = value;
                }
            }

            public string Position_Name
            {
                get
                {
                    return ((string)(this[this.tableStaffView.Position_NameColumn]));
                }
                set
                {
                    this[this.tableStaffView.Position_NameColumn] = value;
                }
            }

            public bool IsRealNameNull()
            {
                return this.IsNull(this.tableStaffView.RealNameColumn);
            }

            public void SetRealNameNull()
            {
                this[this.tableStaffView.RealNameColumn] = System.Convert.DBNull;
            }

            public bool IsEmailNull()
            {
                return this.IsNull(this.tableStaffView.EmailColumn);
            }

            public void SetEmailNull()
            {
                this[this.tableStaffView.EmailColumn] = System.Convert.DBNull;
            }

            public bool IsMobileNull()
            {
                return this.IsNull(this.tableStaffView.MobileColumn);
            }

            public void SetMobileNull()
            {
                this[this.tableStaffView.MobileColumn] = System.Convert.DBNull;
            }
        }

        [System.Diagnostics.DebuggerStepThrough()]
        public partial class StaffViewRowChangeEvent : EventArgs
        {

            private StaffViewRow eventRow;

            private DataRowAction eventAction;

            public StaffViewRowChangeEvent(StaffViewRow row, DataRowAction action)
            {
                this.eventRow = row;
                this.eventAction = action;
            }

            public StaffViewRow Row
            {
                get
                {
                    return this.eventRow;
                }
            }

            public DataRowAction Action
            {
                get
                {
                    return this.eventAction;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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