?? articleslist1.cs
字號(hào):
?//------------------------------------------------------------------------------
// <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 DigitalLibrary {
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 articlesList : DataSet {
private ArticlesDataTable tableArticles;
private CategoryDataTable tableCategory;
public articlesList() {
this.InitClass();
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
this.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
protected articlesList(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["Articles"] != null)) {
this.Tables.Add(new ArticlesDataTable(ds.Tables["Articles"]));
}
if ((ds.Tables["Category"] != null)) {
this.Tables.Add(new CategoryDataTable(ds.Tables["Category"]));
}
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 ArticlesDataTable Articles {
get {
return this.tableArticles;
}
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public CategoryDataTable Category {
get {
return this.tableCategory;
}
}
public override DataSet Clone() {
articlesList cln = ((articlesList)(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["Articles"] != null)) {
this.Tables.Add(new ArticlesDataTable(ds.Tables["Articles"]));
}
if ((ds.Tables["Category"] != null)) {
this.Tables.Add(new CategoryDataTable(ds.Tables["Category"]));
}
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.tableArticles = ((ArticlesDataTable)(this.Tables["Articles"]));
if ((this.tableArticles != null)) {
this.tableArticles.InitVars();
}
this.tableCategory = ((CategoryDataTable)(this.Tables["Category"]));
if ((this.tableCategory != null)) {
this.tableCategory.InitVars();
}
}
private void InitClass() {
this.DataSetName = "articlesList";
this.Prefix = "";
this.Namespace = "http://www.tempuri.org/articlesList.xsd";
this.Locale = new System.Globalization.CultureInfo("en-US");
this.CaseSensitive = false;
this.EnforceConstraints = true;
this.tableArticles = new ArticlesDataTable();
this.Tables.Add(this.tableArticles);
this.tableCategory = new CategoryDataTable();
this.Tables.Add(this.tableCategory);
}
private bool ShouldSerializeArticles() {
return false;
}
private bool ShouldSerializeCategory() {
return false;
}
private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars();
}
}
public delegate void ArticlesRowChangeEventHandler(object sender, ArticlesRowChangeEvent e);
public delegate void CategoryRowChangeEventHandler(object sender, CategoryRowChangeEvent e);
[System.Diagnostics.DebuggerStepThrough()]
public class ArticlesDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnArticleID;
private DataColumn columnFileName;
private DataColumn columnAbstract;
private DataColumn columnRating;
private DataColumn columnStatus;
private DataColumn columnPostedBy;
private DataColumn columnCategory;
private DataColumn columnPrice;
internal ArticlesDataTable() :
base("Articles") {
this.InitClass();
}
internal ArticlesDataTable(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 ArticleIDColumn {
get {
return this.columnArticleID;
}
}
internal DataColumn FileNameColumn {
get {
return this.columnFileName;
}
}
internal DataColumn AbstractColumn {
get {
return this.columnAbstract;
}
}
internal DataColumn RatingColumn {
get {
return this.columnRating;
}
}
internal DataColumn StatusColumn {
get {
return this.columnStatus;
}
}
internal DataColumn PostedByColumn {
get {
return this.columnPostedBy;
}
}
internal DataColumn CategoryColumn {
get {
return this.columnCategory;
}
}
internal DataColumn PriceColumn {
get {
return this.columnPrice;
}
}
public ArticlesRow this[int index] {
get {
return ((ArticlesRow)(this.Rows[index]));
}
}
public event ArticlesRowChangeEventHandler ArticlesRowChanged;
public event ArticlesRowChangeEventHandler ArticlesRowChanging;
public event ArticlesRowChangeEventHandler ArticlesRowDeleted;
public event ArticlesRowChangeEventHandler ArticlesRowDeleting;
public void AddArticlesRow(ArticlesRow row) {
this.Rows.Add(row);
}
public ArticlesRow AddArticlesRow(int ArticleID, string FileName, string Abstract, string Rating, string Status, string PostedBy, string Category, System.Decimal Price) {
ArticlesRow rowArticlesRow = ((ArticlesRow)(this.NewRow()));
rowArticlesRow.ItemArray = new object[] {
ArticleID,
FileName,
Abstract,
Rating,
Status,
PostedBy,
Category,
Price};
this.Rows.Add(rowArticlesRow);
return rowArticlesRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
ArticlesDataTable cln = ((ArticlesDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new ArticlesDataTable();
}
internal void InitVars() {
this.columnArticleID = this.Columns["ArticleID"];
this.columnFileName = this.Columns["FileName"];
this.columnAbstract = this.Columns["Abstract"];
this.columnRating = this.Columns["Rating"];
this.columnStatus = this.Columns["Status"];
this.columnPostedBy = this.Columns["PostedBy"];
this.columnCategory = this.Columns["Category"];
this.columnPrice = this.Columns["Price"];
}
private void InitClass() {
this.columnArticleID = new DataColumn("ArticleID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnArticleID);
this.columnFileName = new DataColumn("FileName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnFileName);
this.columnAbstract = new DataColumn("Abstract", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnAbstract);
this.columnRating = new DataColumn("Rating", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnRating);
this.columnStatus = new DataColumn("Status", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStatus);
this.columnPostedBy = new DataColumn("PostedBy", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPostedBy);
this.columnCategory = new DataColumn("Category", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCategory);
this.columnPrice = new DataColumn("Price", typeof(System.Decimal), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPrice);
this.columnArticleID.AllowDBNull = false;
this.columnFileName.AllowDBNull = false;
this.columnAbstract.ReadOnly = true;
}
public ArticlesRow NewArticlesRow() {
return ((ArticlesRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new ArticlesRow(builder);
}
protected override System.Type GetRowType() {
return typeof(ArticlesRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.ArticlesRowChanged != null)) {
this.ArticlesRowChanged(this, new ArticlesRowChangeEvent(((ArticlesRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.ArticlesRowChanging != null)) {
this.ArticlesRowChanging(this, new ArticlesRowChangeEvent(((ArticlesRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.ArticlesRowDeleted != null)) {
this.ArticlesRowDeleted(this, new ArticlesRowChangeEvent(((ArticlesRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.ArticlesRowDeleting != null)) {
this.ArticlesRowDeleting(this, new ArticlesRowChangeEvent(((ArticlesRow)(e.Row)), e.Action));
}
}
public void RemoveArticlesRow(ArticlesRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ArticlesRow : DataRow {
private ArticlesDataTable tableArticles;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -