ďťż//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.312
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#pragma warning disable 1591
namespace proj2 {
using System;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[Serializable()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.ComponentModel.ToolboxItem(true)]
[System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
[System.Xml.Serialization.XmlRootAttribute("dbDataSet")]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
public partial class dbDataSet : System.Data.DataSet {
private productCategoriesDataTable tableproductCategories;
private productsDataTable tableproducts;
private System.Data.DataRelation relationFK_product_category;
private System.Data.SchemaSerializationMode _schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public dbDataSet() {
this.BeginInit();
this.InitClass();
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
base.Tables.CollectionChanged += schemaChangedHandler;
base.Relations.CollectionChanged += schemaChangedHandler;
this.EndInit();
this.InitExpressions();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected dbDataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :
base(info, context, false) {
if ((this.IsBinarySerialized(info, context) == true)) {
this.InitVars(false);
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new 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) == System.Data.SchemaSerializationMode.IncludeSchema)) {
System.Data.DataSet ds = new System.Data.DataSet();
ds.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
if ((ds.Tables["productCategories"] != null)) {
base.Tables.Add(new productCategoriesDataTable(ds.Tables["productCategories"]));
}
if ((ds.Tables["products"] != null)) {
base.Tables.Add(new productsDataTable(ds.Tables["products"]));
}
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.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
this.InitExpressions();
}
this.GetSerializationData(info, context);
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
base.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
public productCategoriesDataTable productCategories {
get {
return this.tableproductCategories;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
public productsDataTable products {
get {
return this.tableproducts;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.BrowsableAttribute(true)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
public override System.Data.SchemaSerializationMode SchemaSerializationMode {
get {
return this._schemaSerializationMode;
}
set {
this._schemaSerializationMode = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public new System.Data.DataTableCollection Tables {
get {
return base.Tables;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public new System.Data.DataRelationCollection Relations {
get {
return base.Relations;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void InitializeDerivedDataSet() {
this.BeginInit();
this.InitClass();
this.EndInit();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public override System.Data.DataSet Clone() {
dbDataSet cln = ((dbDataSet)(base.Clone()));
cln.InitVars();
cln.InitExpressions();
cln.SchemaSerializationMode = this.SchemaSerializationMode;
return cln;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override bool ShouldSerializeTables() {
return false;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override bool ShouldSerializeRelations() {
return false;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void ReadXmlSerializable(System.Xml.XmlReader reader) {
if ((this.DetermineSchemaSerializationMode(reader) == System.Data.SchemaSerializationMode.IncludeSchema)) {
this.Reset();
System.Data.DataSet ds = new System.Data.DataSet();
ds.ReadXml(reader);
if ((ds.Tables["productCategories"] != null)) {
base.Tables.Add(new productCategoriesDataTable(ds.Tables["productCategories"]));
}
if ((ds.Tables["products"] != null)) {
base.Tables.Add(new productsDataTable(ds.Tables["products"]));
}
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.ReadXml(reader);
this.InitVars();
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
System.IO.MemoryStream stream = new System.IO.MemoryStream();
this.WriteXmlSchema(new System.Xml.XmlTextWriter(stream, null));
stream.Position = 0;
return System.Xml.Schema.XmlSchema.Read(new System.Xml.XmlTextReader(stream), null);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal void InitVars() {
this.InitVars(true);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal void InitVars(bool initTable) {
this.tableproductCategories = ((productCategoriesDataTable)(base.Tables["productCategories"]));
if ((initTable == true)) {
if ((this.tableproductCategories != null)) {
this.tableproductCategories.InitVars();
}
}
this.tableproducts = ((productsDataTable)(base.Tables["products"]));
if ((initTable == true)) {
if ((this.tableproducts != null)) {
this.tableproducts.InitVars();
}
}
this.relationFK_product_category = this.Relations["FK_product_category"];
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitClass() {
this.DataSetName = "dbDataSet";
this.Prefix = "";
this.Namespace = "http://tempuri.org/dbDataSet.xsd";
this.EnforceConstraints = true;
this.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
this.tableproductCategories = new productCategoriesDataTable(false);
base.Tables.Add(this.tableproductCategories);
this.tableproducts = new productsDataTable();
base.Tables.Add(this.tableproducts);
this.relationFK_product_category = new System.Data.DataRelation("FK_product_category", new System.Data.DataColumn[] {
this.tableproductCategories.idColumn}, new System.Data.DataColumn[] {
this.tableproducts.categoryColumn}, false);
this.Relations.Add(this.relationFK_product_category);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private bool ShouldSerializeproductCategories() {
return false;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private bool ShouldSerializeproducts() {
return false;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars();
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) {
dbDataSet ds = new dbDataSet();
System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
xs.Add(ds.GetSchemaSerializable());
System.Xml.Schema.XmlSchemaAny any = new System.Xml.Schema.XmlSchemaAny();
any.Namespace = ds.Namespace;
sequence.Items.Add(any);
type.Particle = sequence;
return type;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitExpressions() {
this.productCategories.summaryColumn.Expression = "id + \'. \' + name + \' (\' + description + \')\'";
}
public delegate void productCategoriesRowChangeEventHandler(object sender, productCategoriesRowChangeEvent e);
public delegate void productsRowChangeEventHandler(object sender, productsRowChangeEvent e);
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[System.Serializable()]
[System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class productCategoriesDataTable : System.Data.DataTable, System.Collections.IEnumerable {
private System.Data.DataColumn columnid;
private System.Data.DataColumn columnname;
private System.Data.DataColumn columndescription;
private System.Data.DataColumn columnsummary;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productCategoriesDataTable() :
this(false) {
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal productCategoriesDataTable(bool initExpressions) {
this.TableName = "productCategories";
this.BeginInit();
this.InitClass();
if ((initExpressions == true)) {
this.InitExpressions();
}
this.EndInit();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal productCategoriesDataTable(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;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected productCategoriesDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :
base(info, context) {
this.InitVars();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn idColumn {
get {
return this.columnid;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn nameColumn {
get {
return this.columnname;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn descriptionColumn {
get {
return this.columndescription;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn summaryColumn {
get {
return this.columnsummary;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productCategoriesRow this[int index] {
get {
return ((productCategoriesRow)(this.Rows[index]));
}
}
public event productCategoriesRowChangeEventHandler productCategoriesRowChanging;
public event productCategoriesRowChangeEventHandler productCategoriesRowChanged;
public event productCategoriesRowChangeEventHandler productCategoriesRowDeleting;
public event productCategoriesRowChangeEventHandler productCategoriesRowDeleted;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void AddproductCategoriesRow(productCategoriesRow row) {
this.Rows.Add(row);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productCategoriesRow AddproductCategoriesRow(string name, string description, string summary) {
productCategoriesRow rowproductCategoriesRow = ((productCategoriesRow)(this.NewRow()));
rowproductCategoriesRow.ItemArray = new object[] {
null,
name,
description,
summary};
this.Rows.Add(rowproductCategoriesRow);
return rowproductCategoriesRow;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productCategoriesRow FindByid(int id) {
return ((productCategoriesRow)(this.Rows.Find(new object[] {
id})));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public virtual System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public override System.Data.DataTable Clone() {
productCategoriesDataTable cln = ((productCategoriesDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override System.Data.DataTable CreateInstance() {
return new productCategoriesDataTable();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal void InitVars() {
this.columnid = base.Columns["id"];
this.columnname = base.Columns["name"];
this.columndescription = base.Columns["description"];
this.columnsummary = base.Columns["summary"];
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitClass() {
this.columnid = new System.Data.DataColumn("id", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnid);
this.columnname = new System.Data.DataColumn("name", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnname);
this.columndescription = new System.Data.DataColumn("description", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columndescription);
this.columnsummary = new System.Data.DataColumn("summary", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnsummary);
this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
this.columnid}, true));
this.columnid.AutoIncrement = true;
this.columnid.AllowDBNull = false;
this.columnid.Unique = true;
this.columnname.MaxLength = 50;
this.columndescription.MaxLength = 50;
this.columnsummary.ReadOnly = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productCategoriesRow NewproductCategoriesRow() {
return ((productCategoriesRow)(this.NewRow()));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
return new productCategoriesRow(builder);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override System.Type GetRowType() {
return typeof(productCategoriesRow);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitExpressions() {
this.summaryColumn.Expression = "id + \'. \' + name + \' (\' + description + \')\'";
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.productCategoriesRowChanged != null)) {
this.productCategoriesRowChanged(this, new productCategoriesRowChangeEvent(((productCategoriesRow)(e.Row)), e.Action));
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.productCategoriesRowChanging != null)) {
this.productCategoriesRowChanging(this, new productCategoriesRowChangeEvent(((productCategoriesRow)(e.Row)), e.Action));
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.productCategoriesRowDeleted != null)) {
this.productCategoriesRowDeleted(this, new productCategoriesRowChangeEvent(((productCategoriesRow)(e.Row)), e.Action));
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.productCategoriesRowDeleting != null)) {
this.productCategoriesRowDeleting(this, new productCategoriesRowChangeEvent(((productCategoriesRow)(e.Row)), e.Action));
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void RemoveproductCategoriesRow(productCategoriesRow row) {
this.Rows.Remove(row);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) {
System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
dbDataSet ds = new dbDataSet();
xs.Add(ds.GetSchemaSerializable());
System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny();
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
any1.MinOccurs = new decimal(0);
any1.MaxOccurs = decimal.MaxValue;
any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any1);
System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny();
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
any2.MinOccurs = new decimal(1);
any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any2);
System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute();
attribute1.Name = "namespace";
attribute1.FixedValue = ds.Namespace;
type.Attributes.Add(attribute1);
System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute();
attribute2.Name = "tableTypeName";
attribute2.FixedValue = "productCategoriesDataTable";
type.Attributes.Add(attribute2);
type.Particle = sequence;
return type;
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[System.Serializable()]
[System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class productsDataTable : System.Data.DataTable, System.Collections.IEnumerable {
private System.Data.DataColumn columnid;
private System.Data.DataColumn columnname;
private System.Data.DataColumn columndescription;
private System.Data.DataColumn columnprice;
private System.Data.DataColumn columnmodified;
private System.Data.DataColumn columncategory;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productsDataTable() {
this.TableName = "products";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal productsDataTable(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;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected productsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :
base(info, context) {
this.InitVars();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn idColumn {
get {
return this.columnid;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn nameColumn {
get {
return this.columnname;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn descriptionColumn {
get {
return this.columndescription;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn priceColumn {
get {
return this.columnprice;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn modifiedColumn {
get {
return this.columnmodified;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataColumn categoryColumn {
get {
return this.columncategory;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productsRow this[int index] {
get {
return ((productsRow)(this.Rows[index]));
}
}
public event productsRowChangeEventHandler productsRowChanging;
public event productsRowChangeEventHandler productsRowChanged;
public event productsRowChangeEventHandler productsRowDeleting;
public event productsRowChangeEventHandler productsRowDeleted;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void AddproductsRow(productsRow row) {
this.Rows.Add(row);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productsRow AddproductsRow(string name, string description, decimal price, System.DateTime modified, productCategoriesRow parentproductCategoriesRowByFK_product_category) {
productsRow rowproductsRow = ((productsRow)(this.NewRow()));
rowproductsRow.ItemArray = new object[] {
null,
name,
description,
price,
modified,
parentproductCategoriesRowByFK_product_category[0]};
this.Rows.Add(rowproductsRow);
return rowproductsRow;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productsRow FindByid(int id) {
return ((productsRow)(this.Rows.Find(new object[] {
id})));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public virtual System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public override System.Data.DataTable Clone() {
productsDataTable cln = ((productsDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override System.Data.DataTable CreateInstance() {
return new productsDataTable();
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal void InitVars() {
this.columnid = base.Columns["id"];
this.columnname = base.Columns["name"];
this.columndescription = base.Columns["description"];
this.columnprice = base.Columns["price"];
this.columnmodified = base.Columns["modified"];
this.columncategory = base.Columns["category"];
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitClass() {
this.columnid = new System.Data.DataColumn("id", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnid);
this.columnname = new System.Data.DataColumn("name", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnname);
this.columndescription = new System.Data.DataColumn("description", typeof(string), null, System.Data.MappingType.Element);
base.Columns.Add(this.columndescription);
this.columnprice = new System.Data.DataColumn("price", typeof(decimal), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnprice);
this.columnmodified = new System.Data.DataColumn("modified", typeof(System.DateTime), null, System.Data.MappingType.Element);
base.Columns.Add(this.columnmodified);
this.columncategory = new System.Data.DataColumn("category", typeof(int), null, System.Data.MappingType.Element);
base.Columns.Add(this.columncategory);
this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
this.columnid}, true));
this.columnid.AutoIncrement = true;
this.columnid.AllowDBNull = false;
this.columnid.Unique = true;
this.columnname.MaxLength = 50;
this.columndescription.MaxLength = 50;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productsRow NewproductsRow() {
return ((productsRow)(this.NewRow()));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
return new productsRow(builder);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override System.Type GetRowType() {
return typeof(productsRow);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.productsRowChanged != null)) {
this.productsRowChanged(this, new productsRowChangeEvent(((productsRow)(e.Row)), e.Action));
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.productsRowChanging != null)) {
this.productsRowChanging(this, new productsRowChangeEvent(((productsRow)(e.Row)), e.Action));
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.productsRowDeleted != null)) {
this.productsRowDeleted(this, new productsRowChangeEvent(((productsRow)(e.Row)), e.Action));
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.productsRowDeleting != null)) {
this.productsRowDeleting(this, new productsRowChangeEvent(((productsRow)(e.Row)), e.Action));
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void RemoveproductsRow(productsRow row) {
this.Rows.Remove(row);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) {
System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
dbDataSet ds = new dbDataSet();
xs.Add(ds.GetSchemaSerializable());
System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny();
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
any1.MinOccurs = new decimal(0);
any1.MaxOccurs = decimal.MaxValue;
any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any1);
System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny();
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
any2.MinOccurs = new decimal(1);
any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any2);
System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute();
attribute1.Name = "namespace";
attribute1.FixedValue = ds.Namespace;
type.Attributes.Add(attribute1);
System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute();
attribute2.Name = "tableTypeName";
attribute2.FixedValue = "productsDataTable";
type.Attributes.Add(attribute2);
type.Particle = sequence;
return type;
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public partial class productCategoriesRow : System.Data.DataRow {
private productCategoriesDataTable tableproductCategories;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal productCategoriesRow(System.Data.DataRowBuilder rb) :
base(rb) {
this.tableproductCategories = ((productCategoriesDataTable)(this.Table));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public int id {
get {
return ((int)(this[this.tableproductCategories.idColumn]));
}
set {
this[this.tableproductCategories.idColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string name {
get {
try {
return ((string)(this[this.tableproductCategories.nameColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'name\' in table \'productCategories\' is DBNull.", e);
}
}
set {
this[this.tableproductCategories.nameColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string description {
get {
try {
return ((string)(this[this.tableproductCategories.descriptionColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'description\' in table \'productCategories\' is DBNull.", e);
}
}
set {
this[this.tableproductCategories.descriptionColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string summary {
get {
try {
return ((string)(this[this.tableproductCategories.summaryColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'summary\' in table \'productCategories\' is DBNull.", e);
}
}
set {
this[this.tableproductCategories.summaryColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsnameNull() {
return this.IsNull(this.tableproductCategories.nameColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetnameNull() {
this[this.tableproductCategories.nameColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsdescriptionNull() {
return this.IsNull(this.tableproductCategories.descriptionColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetdescriptionNull() {
this[this.tableproductCategories.descriptionColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IssummaryNull() {
return this.IsNull(this.tableproductCategories.summaryColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetsummaryNull() {
this[this.tableproductCategories.summaryColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productsRow[] GetproductsRows() {
return ((productsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_product_category"])));
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public partial class productsRow : System.Data.DataRow {
private productsDataTable tableproducts;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal productsRow(System.Data.DataRowBuilder rb) :
base(rb) {
this.tableproducts = ((productsDataTable)(this.Table));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public int id {
get {
return ((int)(this[this.tableproducts.idColumn]));
}
set {
this[this.tableproducts.idColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string name {
get {
try {
return ((string)(this[this.tableproducts.nameColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'name\' in table \'products\' is DBNull.", e);
}
}
set {
this[this.tableproducts.nameColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string description {
get {
try {
return ((string)(this[this.tableproducts.descriptionColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'description\' in table \'products\' is DBNull.", e);
}
}
set {
this[this.tableproducts.descriptionColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public decimal price {
get {
try {
return ((decimal)(this[this.tableproducts.priceColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'price\' in table \'products\' is DBNull.", e);
}
}
set {
this[this.tableproducts.priceColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.DateTime modified {
get {
try {
return ((System.DateTime)(this[this.tableproducts.modifiedColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'modified\' in table \'products\' is DBNull.", e);
}
}
set {
this[this.tableproducts.modifiedColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public int category {
get {
try {
return ((int)(this[this.tableproducts.categoryColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'category\' in table \'products\' is DBNull.", e);
}
}
set {
this[this.tableproducts.categoryColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productCategoriesRow productCategoriesRow {
get {
return ((productCategoriesRow)(this.GetParentRow(this.Table.ParentRelations["FK_product_category"])));
}
set {
this.SetParentRow(value, this.Table.ParentRelations["FK_product_category"]);
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsnameNull() {
return this.IsNull(this.tableproducts.nameColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetnameNull() {
this[this.tableproducts.nameColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsdescriptionNull() {
return this.IsNull(this.tableproducts.descriptionColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetdescriptionNull() {
this[this.tableproducts.descriptionColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IspriceNull() {
return this.IsNull(this.tableproducts.priceColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetpriceNull() {
this[this.tableproducts.priceColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsmodifiedNull() {
return this.IsNull(this.tableproducts.modifiedColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetmodifiedNull() {
this[this.tableproducts.modifiedColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IscategoryNull() {
return this.IsNull(this.tableproducts.categoryColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetcategoryNull() {
this[this.tableproducts.categoryColumn] = System.Convert.DBNull;
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class productCategoriesRowChangeEvent : System.EventArgs {
private productCategoriesRow eventRow;
private System.Data.DataRowAction eventAction;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productCategoriesRowChangeEvent(productCategoriesRow row, System.Data.DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productCategoriesRow Row {
get {
return this.eventRow;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class productsRowChangeEvent : System.EventArgs {
private productsRow eventRow;
private System.Data.DataRowAction eventAction;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productsRowChangeEvent(productsRow row, System.Data.DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productsRow Row {
get {
return this.eventRow;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
namespace proj2.dbDataSetTableAdapters {
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.ComponentModel.ToolboxItem(true)]
[System.ComponentModel.DataObjectAttribute(true)]
[System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public partial class productCategoriesTableAdapter : System.ComponentModel.Component {
private System.Data.SqlClient.SqlDataAdapter _adapter;
private System.Data.SqlClient.SqlConnection _connection;
private System.Data.SqlClient.SqlCommand[] _commandCollection;
private bool _clearBeforeFill;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productCategoriesTableAdapter() {
this.ClearBeforeFill = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private System.Data.SqlClient.SqlDataAdapter Adapter {
get {
if ((this._adapter == null)) {
this.InitAdapter();
}
return this._adapter;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal 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)) {
((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
}
}
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected System.Data.SqlClient.SqlCommand[] CommandCollection {
get {
if ((this._commandCollection == null)) {
this.InitCommandCollection();
}
return this._commandCollection;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool ClearBeforeFill {
get {
return this._clearBeforeFill;
}
set {
this._clearBeforeFill = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitAdapter() {
this._adapter = new System.Data.SqlClient.SqlDataAdapter();
System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
tableMapping.SourceTable = "Table";
tableMapping.DataSetTable = "productCategories";
tableMapping.ColumnMappings.Add("id", "id");
tableMapping.ColumnMappings.Add("name", "name");
tableMapping.ColumnMappings.Add("description", "description");
this._adapter.TableMappings.Add(tableMapping);
this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
this._adapter.DeleteCommand.Connection = this.Connection;
this._adapter.DeleteCommand.CommandText = "DELETE FROM [productCategories] WHERE (([id] = @Original_id) AND ((@IsNull_name =" +
" 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_description =" +
" 1 AND [description] IS NULL) OR ([description] = @Original_description)))";
this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_name", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_description", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
this._adapter.InsertCommand.Connection = this.Connection;
this._adapter.InsertCommand.CommandText = "INSERT INTO [productCategories] ([id], [name], [description]) VALUES (@id, @name," +
" @description);\r\nSELECT id, name, description FROM productCategories WHERE (id =" +
" @id) ORDER BY id";
this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
this._adapter.UpdateCommand.Connection = this.Connection;
this._adapter.UpdateCommand.CommandText = @"UPDATE [productCategories] SET [id] = @id, [name] = @name, [description] = @description WHERE (([id] = @Original_id) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Original_description)));
SELECT id, name, description FROM productCategories WHERE (id = @id) ORDER BY id";
this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_name", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_description", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Original, false, null, "", "", ""));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitConnection() {
this._connection = new System.Data.SqlClient.SqlConnection();
this._connection.ConnectionString = global::proj2.Properties.Settings.Default.dbConnectionString;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT id, name, description\r\nFROM productCategories\r\nORDER BY " +
"id";
this._commandCollection[0].CommandType = System.Data.CommandType.Text;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
public virtual int Fill(dbDataSet.productCategoriesDataTable dataTable) {
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
public virtual dbDataSet.productCategoriesDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
dbDataSet.productCategoriesDataTable dataTable = new dbDataSet.productCategoriesDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(dbDataSet.productCategoriesDataTable dataTable) {
return this.Adapter.Update(dataTable);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(dbDataSet dataSet) {
return this.Adapter.Update(dataSet, "productCategories");
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(System.Data.DataRow dataRow) {
return this.Adapter.Update(new System.Data.DataRow[] {
dataRow});
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(System.Data.DataRow[] dataRows) {
return this.Adapter.Update(dataRows);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
public virtual int Delete(int Original_id, string Original_name, string Original_description) {
this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id));
if ((Original_name == null)) {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_name));
}
if ((Original_description == null)) {
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_description));
}
System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.DeleteCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.DeleteCommand.Connection.Close();
}
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
public virtual int Insert(int id, string name, string description) {
this.Adapter.InsertCommand.Parameters[0].Value = ((int)(id));
if ((name == null)) {
this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(name));
}
if ((description == null)) {
this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(description));
}
System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.InsertCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.InsertCommand.Connection.Close();
}
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
public virtual int Update(int id, string name, string description, int Original_id, string Original_name, string Original_description) {
this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(id));
if ((name == null)) {
this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(name));
}
if ((description == null)) {
this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(description));
}
this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_id));
if ((Original_name == null)) {
this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_name));
}
if ((Original_description == null)) {
this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_description));
}
System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.UpdateCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.UpdateCommand.Connection.Close();
}
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.ComponentModel.ToolboxItem(true)]
[System.ComponentModel.DataObjectAttribute(true)]
[System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public partial class productsTableAdapter : System.ComponentModel.Component {
private System.Data.SqlClient.SqlDataAdapter _adapter;
private System.Data.SqlClient.SqlConnection _connection;
private System.Data.SqlClient.SqlCommand[] _commandCollection;
private bool _clearBeforeFill;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public productsTableAdapter() {
this.ClearBeforeFill = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private System.Data.SqlClient.SqlDataAdapter Adapter {
get {
if ((this._adapter == null)) {
this.InitAdapter();
}
return this._adapter;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal 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)) {
((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
}
}
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected System.Data.SqlClient.SqlCommand[] CommandCollection {
get {
if ((this._commandCollection == null)) {
this.InitCommandCollection();
}
return this._commandCollection;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool ClearBeforeFill {
get {
return this._clearBeforeFill;
}
set {
this._clearBeforeFill = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitAdapter() {
this._adapter = new System.Data.SqlClient.SqlDataAdapter();
System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
tableMapping.SourceTable = "Table";
tableMapping.DataSetTable = "products";
tableMapping.ColumnMappings.Add("id", "id");
tableMapping.ColumnMappings.Add("name", "name");
tableMapping.ColumnMappings.Add("description", "description");
tableMapping.ColumnMappings.Add("price", "price");
tableMapping.ColumnMappings.Add("modified", "modified");
tableMapping.ColumnMappings.Add("category", "category");
this._adapter.TableMappings.Add(tableMapping);
this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
this._adapter.DeleteCommand.Connection = this.Connection;
this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[products] WHERE (([id] = @Original_id) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Original_description)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Original_price)) AND ((@IsNull_modified = 1 AND [modified] IS NULL) OR ([modified] = @Original_modified)) AND ([category] = @Original_category))";
this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_name", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_description", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_price", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "price", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_price", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "price", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_modified", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "modified", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_modified", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "modified", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_category", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "category", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
this._adapter.InsertCommand.Connection = this.Connection;
this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[products] ([id], [name], [description], [price], [modified], [" +
"category]) VALUES (@id, @name, @description, @price, @modified, @category);\r\nSEL" +
"ECT id, name, description, price, modified, category FROM products WHERE (id = @" +
"id)";
this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@price", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "price", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@modified", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "modified", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@category", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "category", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
this._adapter.UpdateCommand.Connection = this.Connection;
this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[products] SET [id] = @id, [name] = @name, [description] = @description, [price] = @price, [modified] = @modified, [category] = @category WHERE (([id] = @Original_id) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Original_description)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Original_price)) AND ((@IsNull_modified = 1 AND [modified] IS NULL) OR ([modified] = @Original_modified)) AND ([category] = @Original_category));
SELECT id, name, description, price, modified, category FROM products WHERE (id = @id)";
this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@price", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "price", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@modified", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "modified", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@category", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "category", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_name", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_description", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "description", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_price", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "price", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_price", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "price", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_modified", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "modified", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_modified", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "modified", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_category", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "category", System.Data.DataRowVersion.Original, false, null, "", "", ""));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitConnection() {
this._connection = new System.Data.SqlClient.SqlConnection();
this._connection.ConnectionString = global::proj2.Properties.Settings.Default.dbConnectionString;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT id, name, description, price, modified, category FROM dbo.products";
this._commandCollection[0].CommandType = System.Data.CommandType.Text;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
public virtual int Fill(dbDataSet.productsDataTable dataTable) {
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
public virtual dbDataSet.productsDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
dbDataSet.productsDataTable dataTable = new dbDataSet.productsDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(dbDataSet.productsDataTable dataTable) {
return this.Adapter.Update(dataTable);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(dbDataSet dataSet) {
return this.Adapter.Update(dataSet, "products");
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(System.Data.DataRow dataRow) {
return this.Adapter.Update(new System.Data.DataRow[] {
dataRow});
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(System.Data.DataRow[] dataRows) {
return this.Adapter.Update(dataRows);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
public virtual int Delete(int Original_id, string Original_name, string Original_description, System.Nullable<decimal> Original_price, System.Nullable<System.DateTime> Original_modified, System.Nullable<int> Original_category) {
this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id));
if ((Original_name == null)) {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_name));
}
if ((Original_description == null)) {
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_description));
}
if ((Original_price.HasValue == true)) {
this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[6].Value = ((decimal)(Original_price.Value));
}
else {
this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
}
if ((Original_modified.HasValue == true)) {
this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_modified.Value));
}
else {
this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[8].Value = System.DBNull.Value;
}
if ((Original_category.HasValue == true)) {
this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(Original_category.Value));
}
else {
this.Adapter.DeleteCommand.Parameters[9].Value = System.DBNull.Value;
}
System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.DeleteCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.DeleteCommand.Connection.Close();
}
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
public virtual int Insert(int id, string name, string description, System.Nullable<decimal> price, System.Nullable<System.DateTime> modified, System.Nullable<int> category) {
this.Adapter.InsertCommand.Parameters[0].Value = ((int)(id));
if ((name == null)) {
this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(name));
}
if ((description == null)) {
this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(description));
}
if ((price.HasValue == true)) {
this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(price.Value));
}
else {
this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
}
if ((modified.HasValue == true)) {
this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(modified.Value));
}
else {
this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
}
if ((category.HasValue == true)) {
this.Adapter.InsertCommand.Parameters[5].Value = ((int)(category.Value));
}
else {
this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
}
System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.InsertCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.InsertCommand.Connection.Close();
}
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
public virtual int Update(int id, string name, string description, System.Nullable<decimal> price, System.Nullable<System.DateTime> modified, System.Nullable<int> category, int Original_id, string Original_name, string Original_description, System.Nullable<decimal> Original_price, System.Nullable<System.DateTime> Original_modified, System.Nullable<int> Original_category) {
this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(id));
if ((name == null)) {
this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(name));
}
if ((description == null)) {
this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(description));
}
if ((price.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(price.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
}
if ((modified.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(modified.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
}
if ((category.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(category.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
}
this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_id));
if ((Original_name == null)) {
this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_name));
}
if ((Original_description == null)) {
this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_description));
}
if ((Original_price.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[12].Value = ((decimal)(Original_price.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[12].Value = System.DBNull.Value;
}
if ((Original_modified.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[14].Value = ((System.DateTime)(Original_modified.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value;
}
if ((Original_category.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_category.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[15].Value = System.DBNull.Value;
}
System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.UpdateCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.UpdateCommand.Connection.Close();
}
}
}
}
}
#pragma warning restore 1591