?? dataset1.cs
字號:
?//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.0.2914.16
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
namespace books {
using System;
using System.Data;
using System.Xml;
using System.Runtime.Serialization;
[Serializable()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public class DataSet1 : System.Data.DataSet {
private TABLE1DataTable tableTABLE1;
public DataSet1() {
this.InitClass();
}
private DataSet1(SerializationInfo info, StreamingContext context) {
this.InitClass();
this.GetSerializationData(info, context);
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public TABLE1DataTable TABLE1 {
get {
return this.tableTABLE1;
}
}
protected override bool ShouldSerializeTables() {
return false;
}
protected override bool ShouldSerializeRelations() {
return false;
}
protected override void ReadXmlSerializable(XmlReader reader) {
this.ReadXml(reader, XmlReadMode.IgnoreSchema);
}
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);
}
private void InitClass() {
this.DataSetName = "DataSet1";
this.Namespace = "http://www.tempuri.org/DataSet1.xsd";
this.tableTABLE1 = new TABLE1DataTable();
this.Tables.Add(this.tableTABLE1);
}
private bool ShouldSerializeTABLE1() {
return false;
}
public delegate void TABLE1RowChangeEventHandler(object sender, TABLE1RowChangeEvent e);
public class TABLE1DataTable : DataTable, System.Collections.IEnumerable {
private DataColumn column書名;
private DataColumn column作者;
private DataColumn column出版社;
private DataColumn column出版日期;
private DataColumn column定價;
internal TABLE1DataTable() :
base("TABLE1") {
this.InitClass();
}
[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定價;
}
}
public TABLE1Row this[int index] {
get {
return ((TABLE1Row)(this.Rows[index]));
}
}
public event TABLE1RowChangeEventHandler TABLE1RowChanged;
public event TABLE1RowChangeEventHandler TABLE1RowChanging;
public event TABLE1RowChangeEventHandler TABLE1RowDeleted;
public event TABLE1RowChangeEventHandler TABLE1RowDeleting;
public void AddTABLE1Row(TABLE1Row row) {
this.Rows.Add(row);
}
public TABLE1Row AddTABLE1Row(string 書名, string 作者, string 出版社, string 出版日期, string 定價) {
TABLE1Row rowTABLE1Row = ((TABLE1Row)(this.NewRow()));
rowTABLE1Row.ItemArray = new object[] {
書名,
作者,
出版社,
出版日期,
定價};
this.Rows.Add(rowTABLE1Row);
return rowTABLE1Row;
}
public TABLE1Row FindBy書名(string 書名) {
return ((TABLE1Row)(this.Rows.Find(new object[] {
書名})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
private void InitClass() {
this.column書名 = new DataColumn("書名", typeof(string), "", System.Data.MappingType.Element);
this.column書名.AllowDBNull = false;
this.column書名.Unique = true;
this.Columns.Add(this.column書名);
this.column作者 = new DataColumn("作者", typeof(string), "", System.Data.MappingType.Element);
this.Columns.Add(this.column作者);
this.column出版社 = new DataColumn("出版社", typeof(string), "", System.Data.MappingType.Element);
this.Columns.Add(this.column出版社);
this.column出版日期 = new DataColumn("出版日期", typeof(string), "", System.Data.MappingType.Element);
this.Columns.Add(this.column出版日期);
this.column定價 = new DataColumn("定價", typeof(string), "", System.Data.MappingType.Element);
this.Columns.Add(this.column定價);
this.PrimaryKey = new DataColumn[] {
this.column書名};
}
public TABLE1Row NewTABLE1Row() {
return ((TABLE1Row)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
// We need to ensure that all Rows in the tabled are typed rows.
// Table calls newRow whenever it needs to create a row.
// So the following conditions are covered by Row newRow(Record record)
// * Cursor calls table.addRecord(record)
// * table.addRow(object[] values) calls newRow(record)
return new TABLE1Row(builder);
}
protected override System.Type GetRowType() {
return typeof(TABLE1Row);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.TABLE1RowChanged != null)) {
this.TABLE1RowChanged(this, new TABLE1RowChangeEvent(((TABLE1Row)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.TABLE1RowChanging != null)) {
this.TABLE1RowChanging(this, new TABLE1RowChangeEvent(((TABLE1Row)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.TABLE1RowDeleted != null)) {
this.TABLE1RowDeleted(this, new TABLE1RowChangeEvent(((TABLE1Row)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.TABLE1RowDeleting != null)) {
this.TABLE1RowDeleting(this, new TABLE1RowChangeEvent(((TABLE1Row)(e.Row)), e.Action));
}
}
public void RemoveTABLE1Row(TABLE1Row row) {
this.Rows.Remove(row);
}
}
public class TABLE1Row : DataRow {
private TABLE1DataTable tableTABLE1;
internal TABLE1Row(DataRowBuilder rb) :
base(rb) {
this.tableTABLE1 = ((TABLE1DataTable)(this.Table));
}
public string 書名 {
get {
return ((string)(this[this.tableTABLE1.書名Column]));
}
set {
this[this.tableTABLE1.書名Column] = value;
}
}
public string 作者 {
get {
try {
return ((string)(this[this.tableTABLE1.作者Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tableTABLE1.作者Column] = value;
}
}
public string 出版社 {
get {
try {
return ((string)(this[this.tableTABLE1.出版社Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tableTABLE1.出版社Column] = value;
}
}
public string 出版日期 {
get {
try {
return ((string)(this[this.tableTABLE1.出版日期Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tableTABLE1.出版日期Column] = value;
}
}
public string 定價 {
get {
try {
return ((string)(this[this.tableTABLE1.定價Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tableTABLE1.定價Column] = value;
}
}
public bool Is作者Null() {
return this.IsNull(this.tableTABLE1.作者Column);
}
public void Set作者Null() {
this[this.tableTABLE1.作者Column] = System.Convert.DBNull;
}
public bool Is出版社Null() {
return this.IsNull(this.tableTABLE1.出版社Column);
}
public void Set出版社Null() {
this[this.tableTABLE1.出版社Column] = System.Convert.DBNull;
}
public bool Is出版日期Null() {
return this.IsNull(this.tableTABLE1.出版日期Column);
}
public void Set出版日期Null() {
this[this.tableTABLE1.出版日期Column] = System.Convert.DBNull;
}
public bool Is定價Null() {
return this.IsNull(this.tableTABLE1.定價Column);
}
public void Set定價Null() {
this[this.tableTABLE1.定價Column] = System.Convert.DBNull;
}
}
public class TABLE1RowChangeEvent : EventArgs {
private TABLE1Row eventRow;
private System.Data.DataRowAction eventAction;
public TABLE1RowChangeEvent(TABLE1Row row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public TABLE1Row Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -