DataSet1.cs
资源名称:VCSDB.rar [点击查看]
上传用户:hjieqiu
上传日期:2013-05-11
资源大小:16494k
文件大小:21k
源码类别:
企业管理
开发平台:
C#
- //------------------------------------------------------------------------------
- // <autogenerated>
- // This code was generated by a tool.
- // Runtime Version: 1.1.4322.573
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </autogenerated>
- //------------------------------------------------------------------------------
- namespace 图书馆管理系统 {
- using System;
- using System.Data;
- using System.Xml;
- using System.Runtime.Serialization;
- [Serializable()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Diagnostics.DebuggerStepThrough()]
- [System.ComponentModel.ToolboxItem(true)]
- public class DataSet1 : DataSet {
- private 科目表DataTable table科目表;
- public DataSet1() {
- this.InitClass();
- System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
- this.Tables.CollectionChanged += schemaChangedHandler;
- this.Relations.CollectionChanged += schemaChangedHandler;
- }
- protected DataSet1(SerializationInfo info, StreamingContext context) {
- string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
- if ((strSchema != null)) {
- DataSet ds = new DataSet();
- ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
- if ((ds.Tables["科目表"] != null)) {
- this.Tables.Add(new 科目表DataTable(ds.Tables["科目表"]));
- }
- 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, System.Data.MissingSchemaAction.Add);
- this.InitVars();
- }
- else {
- this.InitClass();
- }
- this.GetSerializationData(info, context);
- System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
- this.Tables.CollectionChanged += schemaChangedHandler;
- this.Relations.CollectionChanged += schemaChangedHandler;
- }
- [System.ComponentModel.Browsable(false)]
- [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
- public 科目表DataTable 科目表 {
- get {
- return this.table科目表;
- }
- }
- public override DataSet Clone() {
- DataSet1 cln = ((DataSet1)(base.Clone()));
- cln.InitVars();
- return cln;
- }
- protected override bool ShouldSerializeTables() {
- return false;
- }
- protected override bool ShouldSerializeRelations() {
- return false;
- }
- protected override void ReadXmlSerializable(XmlReader reader) {
- this.Reset();
- DataSet ds = new DataSet();
- ds.ReadXml(reader);
- if ((ds.Tables["科目表"] != null)) {
- this.Tables.Add(new 科目表DataTable(ds.Tables["科目表"]));
- }
- 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, System.Data.MissingSchemaAction.Add);
- this.InitVars();
- }
- protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
- System.IO.MemoryStream stream = new System.IO.MemoryStream();
- this.WriteXmlSchema(new XmlTextWriter(stream, null));
- stream.Position = 0;
- return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
- }
- internal void InitVars() {
- this.table科目表 = ((科目表DataTable)(this.Tables["科目表"]));
- if ((this.table科目表 != null)) {
- this.table科目表.InitVars();
- }
- }
- private void InitClass() {
- this.DataSetName = "DataSet1";
- this.Prefix = "";
- this.Namespace = "http://www.tempuri.org/DataSet1.xsd";
- this.Locale = new System.Globalization.CultureInfo("zh-CN");
- this.CaseSensitive = false;
- this.EnforceConstraints = true;
- this.table科目表 = new 科目表DataTable();
- this.Tables.Add(this.table科目表);
- }
- private bool ShouldSerialize科目表() {
- return false;
- }
- private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
- if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
- this.InitVars();
- }
- }
- public delegate void 科目表RowChangeEventHandler(object sender, 科目表RowChangeEvent e);
- [System.Diagnostics.DebuggerStepThrough()]
- public class 科目表DataTable : DataTable, System.Collections.IEnumerable {
- private DataColumn column科目代码;
- private DataColumn column科目名称;
- private DataColumn column助记码;
- private DataColumn column科目类别;
- private DataColumn column是否存货科目;
- private DataColumn column余额方向;
- private DataColumn column数量单位;
- internal 科目表DataTable() :
- base("科目表") {
- this.InitClass();
- }
- internal 科目表DataTable(DataTable table) :
- base(table.TableName) {
- if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
- this.CaseSensitive = table.CaseSensitive;
- }
- if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
- this.Locale = table.Locale;
- }
- if ((table.Namespace != table.DataSet.Namespace)) {
- this.Namespace = table.Namespace;
- }
- this.Prefix = table.Prefix;
- this.MinimumCapacity = table.MinimumCapacity;
- this.DisplayExpression = table.DisplayExpression;
- }
- [System.ComponentModel.Browsable(false)]
- public int Count {
- get {
- return this.Rows.Count;
- }
- }
- internal DataColumn 科目代码Column {
- get {
- return this.column科目代码;
- }
- }
- internal DataColumn 科目名称Column {
- get {
- return this.column科目名称;
- }
- }
- internal DataColumn 助记码Column {
- get {
- return this.column助记码;
- }
- }
- internal DataColumn 科目类别Column {
- get {
- return this.column科目类别;
- }
- }
- internal DataColumn 是否存货科目Column {
- get {
- return this.column是否存货科目;
- }
- }
- internal DataColumn 余额方向Column {
- get {
- return this.column余额方向;
- }
- }
- internal DataColumn 数量单位Column {
- get {
- return this.column数量单位;
- }
- }
- public 科目表Row this[int index] {
- get {
- return ((科目表Row)(this.Rows[index]));
- }
- }
- public event 科目表RowChangeEventHandler 科目表RowChanged;
- public event 科目表RowChangeEventHandler 科目表RowChanging;
- public event 科目表RowChangeEventHandler 科目表RowDeleted;
- public event 科目表RowChangeEventHandler 科目表RowDeleting;
- public void Add科目表Row(科目表Row row) {
- this.Rows.Add(row);
- }
- public 科目表Row Add科目表Row(string 科目代码, string 科目名称, string 助记码, string 科目类别, string 是否存货科目, string 余额方向, string 数量单位) {
- 科目表Row row科目表Row = ((科目表Row)(this.NewRow()));
- row科目表Row.ItemArray = new object[] {
- 科目代码,
- 科目名称,
- 助记码,
- 科目类别,
- 是否存货科目,
- 余额方向,
- 数量单位};
- this.Rows.Add(row科目表Row);
- return row科目表Row;
- }
- public 科目表Row FindBy科目代码(string 科目代码) {
- return ((科目表Row)(this.Rows.Find(new object[] {
- 科目代码})));
- }
- public System.Collections.IEnumerator GetEnumerator() {
- return this.Rows.GetEnumerator();
- }
- public override DataTable Clone() {
- 科目表DataTable cln = ((科目表DataTable)(base.Clone()));
- cln.InitVars();
- return cln;
- }
- protected override DataTable CreateInstance() {
- return new 科目表DataTable();
- }
- internal void InitVars() {
- this.column科目代码 = this.Columns["科目代码"];
- this.column科目名称 = this.Columns["科目名称"];
- this.column助记码 = this.Columns["助记码"];
- this.column科目类别 = this.Columns["科目类别"];
- this.column是否存货科目 = this.Columns["是否存货科目"];
- this.column余额方向 = this.Columns["余额方向"];
- this.column数量单位 = this.Columns["数量单位"];
- }
- private void InitClass() {
- this.column科目代码 = new DataColumn("科目代码", typeof(string), null, System.Data.MappingType.Element);
- this.Columns.Add(this.column科目代码);
- this.column科目名称 = new DataColumn("科目名称", typeof(string), null, System.Data.MappingType.Element);
- this.Columns.Add(this.column科目名称);
- this.column助记码 = new DataColumn("助记码", typeof(string), null, System.Data.MappingType.Element);
- this.Columns.Add(this.column助记码);
- this.column科目类别 = new DataColumn("科目类别", typeof(string), null, System.Data.MappingType.Element);
- this.Columns.Add(this.column科目类别);
- this.column是否存货科目 = new DataColumn("是否存货科目", typeof(string), null, System.Data.MappingType.Element);
- this.Columns.Add(this.column是否存货科目);
- this.column余额方向 = new DataColumn("余额方向", typeof(string), null, System.Data.MappingType.Element);
- this.Columns.Add(this.column余额方向);
- this.column数量单位 = new DataColumn("数量单位", typeof(string), null, System.Data.MappingType.Element);
- this.Columns.Add(this.column数量单位);
- this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
- this.column科目代码}, true));
- this.column科目代码.AllowDBNull = false;
- this.column科目代码.Unique = true;
- }
- public 科目表Row New科目表Row() {
- return ((科目表Row)(this.NewRow()));
- }
- protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
- return new 科目表Row(builder);
- }
- protected override System.Type GetRowType() {
- return typeof(科目表Row);
- }
- protected override void OnRowChanged(DataRowChangeEventArgs e) {
- base.OnRowChanged(e);
- if ((this.科目表RowChanged != null)) {
- this.科目表RowChanged(this, new 科目表RowChangeEvent(((科目表Row)(e.Row)), e.Action));
- }
- }
- protected override void OnRowChanging(DataRowChangeEventArgs e) {
- base.OnRowChanging(e);
- if ((this.科目表RowChanging != null)) {
- this.科目表RowChanging(this, new 科目表RowChangeEvent(((科目表Row)(e.Row)), e.Action));
- }
- }
- protected override void OnRowDeleted(DataRowChangeEventArgs e) {
- base.OnRowDeleted(e);
- if ((this.科目表RowDeleted != null)) {
- this.科目表RowDeleted(this, new 科目表RowChangeEvent(((科目表Row)(e.Row)), e.Action));
- }
- }
- protected override void OnRowDeleting(DataRowChangeEventArgs e) {
- base.OnRowDeleting(e);
- if ((this.科目表RowDeleting != null)) {
- this.科目表RowDeleting(this, new 科目表RowChangeEvent(((科目表Row)(e.Row)), e.Action));
- }
- }
- public void Remove科目表Row(科目表Row row) {
- this.Rows.Remove(row);
- }
- }
- [System.Diagnostics.DebuggerStepThrough()]
- public class 科目表Row : DataRow {
- private 科目表DataTable table科目表;
- internal 科目表Row(DataRowBuilder rb) :
- base(rb) {
- this.table科目表 = ((科目表DataTable)(this.Table));
- }
- public string 科目代码 {
- get {
- return ((string)(this[this.table科目表.科目代码Column]));
- }
- set {
- this[this.table科目表.科目代码Column] = value;
- }
- }
- public string 科目名称 {
- get {
- try {
- return ((string)(this[this.table科目表.科目名称Column]));
- }
- catch (InvalidCastException e) {
- throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
- }
- }
- set {
- this[this.table科目表.科目名称Column] = value;
- }
- }
- public string 助记码 {
- get {
- try {
- return ((string)(this[this.table科目表.助记码Column]));
- }
- catch (InvalidCastException e) {
- throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
- }
- }
- set {
- this[this.table科目表.助记码Column] = value;
- }
- }
- public string 科目类别 {
- get {
- try {
- return ((string)(this[this.table科目表.科目类别Column]));
- }
- catch (InvalidCastException e) {
- throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
- }
- }
- set {
- this[this.table科目表.科目类别Column] = value;
- }
- }
- public string 是否存货科目 {
- get {
- try {
- return ((string)(this[this.table科目表.是否存货科目Column]));
- }
- catch (InvalidCastException e) {
- throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
- }
- }
- set {
- this[this.table科目表.是否存货科目Column] = value;
- }
- }
- public string 余额方向 {
- get {
- try {
- return ((string)(this[this.table科目表.余额方向Column]));
- }
- catch (InvalidCastException e) {
- throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
- }
- }
- set {
- this[this.table科目表.余额方向Column] = value;
- }
- }
- public string 数量单位 {
- get {
- try {
- return ((string)(this[this.table科目表.数量单位Column]));
- }
- catch (InvalidCastException e) {
- throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
- }
- }
- set {
- this[this.table科目表.数量单位Column] = value;
- }
- }
- public bool Is科目名称Null() {
- return this.IsNull(this.table科目表.科目名称Column);
- }
- public void Set科目名称Null() {
- this[this.table科目表.科目名称Column] = System.Convert.DBNull;
- }
- public bool Is助记码Null() {
- return this.IsNull(this.table科目表.助记码Column);
- }
- public void Set助记码Null() {
- this[this.table科目表.助记码Column] = System.Convert.DBNull;
- }
- public bool Is科目类别Null() {
- return this.IsNull(this.table科目表.科目类别Column);
- }
- public void Set科目类别Null() {
- this[this.table科目表.科目类别Column] = System.Convert.DBNull;
- }
- public bool Is是否存货科目Null() {
- return this.IsNull(this.table科目表.是否存货科目Column);
- }
- public void Set是否存货科目Null() {
- this[this.table科目表.是否存货科目Column] = System.Convert.DBNull;
- }
- public bool Is余额方向Null() {
- return this.IsNull(this.table科目表.余额方向Column);
- }
- public void Set余额方向Null() {
- this[this.table科目表.余额方向Column] = System.Convert.DBNull;
- }
- public bool Is数量单位Null() {
- return this.IsNull(this.table科目表.数量单位Column);
- }
- public void Set数量单位Null() {
- this[this.table科目表.数量单位Column] = System.Convert.DBNull;
- }
- }
- [System.Diagnostics.DebuggerStepThrough()]
- public class 科目表RowChangeEvent : EventArgs {
- private 科目表Row eventRow;
- private DataRowAction eventAction;
- public 科目表RowChangeEvent(科目表Row row, DataRowAction action) {
- this.eventRow = row;
- this.eventAction = action;
- }
- public 科目表Row Row {
- get {
- return this.eventRow;
- }
- }
- public DataRowAction Action {
- get {
- return this.eventAction;
- }
- }
- }
- }
- }