/
DaNN26
/
sql-utility-manager
Обзор
Документация
Войти
/
DaNN26
/
sql-utility-manager
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Demo/MarketDataSet.Designer.cs
9 458 строк
583 KB
DaNN
Добавьте файлы проекта.
25 май 2026, 17:03
25 май 2026, 17:03
9efb65a
Код
Авторство
О чём код?
//------------------------------------------------------------------------------ // <auto-generated> // Этот код создан программой. // Исполняемая версия:4.0.30319.42000 // // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае // повторной генерации кода. // </auto-generated> //------------------------------------------------------------------------------ #pragma warning disable 1591 namespace Demo { /// <summary> ///Represents a strongly typed in-memory cache of data. ///</summary> [global::System.Serializable()] [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] [global::System.Xml.Serialization.XmlRootAttribute("MarketDataSet")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] public partial class MarketDataSet : global::System.Data.DataSet { private categoryDataTable tablecategory; private orderDataTable tableorder; private pickup_pointDataTable tablepickup_point; private producerDataTable tableproducer; private productDataTable tableproduct; private roleDataTable tablerole; private supplierDataTable tablesupplier; private unitDataTable tableunit; private userDataTable tableuser; private global::System.Data.DataRelation relationFK_order_pickup_point; private global::System.Data.DataRelation relationFK_order_user; private global::System.Data.DataRelation relationFK_product_category; private global::System.Data.DataRelation relationFK_product_producer; private global::System.Data.DataRelation relationFK_product_supplier; private global::System.Data.DataRelation relationFK_product_unit; private global::System.Data.DataRelation relationFK_user_role; private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public MarketDataSet() { this.BeginInit(); this.InitClass(); global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); base.Tables.CollectionChanged += schemaChangedHandler; base.Relations.CollectionChanged += schemaChangedHandler; this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected MarketDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context, false) { if ((this.IsBinarySerialized(info, context) == true)) { this.InitVars(false); global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::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) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { global::System.Data.DataSet ds = new global::System.Data.DataSet(); ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); if ((ds.Tables["category"] != null)) { base.Tables.Add(new categoryDataTable(ds.Tables["category"])); } if ((ds.Tables["order"] != null)) { base.Tables.Add(new orderDataTable(ds.Tables["order"])); } if ((ds.Tables["pickup_point"] != null)) { base.Tables.Add(new pickup_pointDataTable(ds.Tables["pickup_point"])); } if ((ds.Tables["producer"] != null)) { base.Tables.Add(new producerDataTable(ds.Tables["producer"])); } if ((ds.Tables["product"] != null)) { base.Tables.Add(new productDataTable(ds.Tables["product"])); } if ((ds.Tables["role"] != null)) { base.Tables.Add(new roleDataTable(ds.Tables["role"])); } if ((ds.Tables["supplier"] != null)) { base.Tables.Add(new supplierDataTable(ds.Tables["supplier"])); } if ((ds.Tables["unit"] != null)) { base.Tables.Add(new unitDataTable(ds.Tables["unit"])); } if ((ds.Tables["user"] != null)) { base.Tables.Add(new userDataTable(ds.Tables["user"])); } 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, global::System.Data.MissingSchemaAction.Add); this.InitVars(); } else { this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); } this.GetSerializationData(info, context); global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); base.Tables.CollectionChanged += schemaChangedHandler; this.Relations.CollectionChanged += schemaChangedHandler; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public categoryDataTable category { get { return this.tablecategory; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public orderDataTable order { get { return this.tableorder; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public pickup_pointDataTable pickup_point { get { return this.tablepickup_point; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public producerDataTable producer { get { return this.tableproducer; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public productDataTable product { get { return this.tableproduct; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public roleDataTable role { get { return this.tablerole; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public supplierDataTable supplier { get { return this.tablesupplier; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public unitDataTable unit { get { return this.tableunit; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public userDataTable user { get { return this.tableuser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { get { return this._schemaSerializationMode; } set { this._schemaSerializationMode = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new global::System.Data.DataTableCollection Tables { get { return base.Tables; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new global::System.Data.DataRelationCollection Relations { get { return base.Relations; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void InitializeDerivedDataSet() { this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataSet Clone() { MarketDataSet cln = ((MarketDataSet)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override bool ShouldSerializeTables() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override bool ShouldSerializeRelations() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { this.Reset(); global::System.Data.DataSet ds = new global::System.Data.DataSet(); ds.ReadXml(reader); if ((ds.Tables["category"] != null)) { base.Tables.Add(new categoryDataTable(ds.Tables["category"])); } if ((ds.Tables["order"] != null)) { base.Tables.Add(new orderDataTable(ds.Tables["order"])); } if ((ds.Tables["pickup_point"] != null)) { base.Tables.Add(new pickup_pointDataTable(ds.Tables["pickup_point"])); } if ((ds.Tables["producer"] != null)) { base.Tables.Add(new producerDataTable(ds.Tables["producer"])); } if ((ds.Tables["product"] != null)) { base.Tables.Add(new productDataTable(ds.Tables["product"])); } if ((ds.Tables["role"] != null)) { base.Tables.Add(new roleDataTable(ds.Tables["role"])); } if ((ds.Tables["supplier"] != null)) { base.Tables.Add(new supplierDataTable(ds.Tables["supplier"])); } if ((ds.Tables["unit"] != null)) { base.Tables.Add(new unitDataTable(ds.Tables["unit"])); } if ((ds.Tables["user"] != null)) { base.Tables.Add(new userDataTable(ds.Tables["user"])); } 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, global::System.Data.MissingSchemaAction.Add); this.InitVars(); } else { this.ReadXml(reader); this.InitVars(); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); stream.Position = 0; return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.InitVars(true); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars(bool initTable) { this.tablecategory = ((categoryDataTable)(base.Tables["category"])); if ((initTable == true)) { if ((this.tablecategory != null)) { this.tablecategory.InitVars(); } } this.tableorder = ((orderDataTable)(base.Tables["order"])); if ((initTable == true)) { if ((this.tableorder != null)) { this.tableorder.InitVars(); } } this.tablepickup_point = ((pickup_pointDataTable)(base.Tables["pickup_point"])); if ((initTable == true)) { if ((this.tablepickup_point != null)) { this.tablepickup_point.InitVars(); } } this.tableproducer = ((producerDataTable)(base.Tables["producer"])); if ((initTable == true)) { if ((this.tableproducer != null)) { this.tableproducer.InitVars(); } } this.tableproduct = ((productDataTable)(base.Tables["product"])); if ((initTable == true)) { if ((this.tableproduct != null)) { this.tableproduct.InitVars(); } } this.tablerole = ((roleDataTable)(base.Tables["role"])); if ((initTable == true)) { if ((this.tablerole != null)) { this.tablerole.InitVars(); } } this.tablesupplier = ((supplierDataTable)(base.Tables["supplier"])); if ((initTable == true)) { if ((this.tablesupplier != null)) { this.tablesupplier.InitVars(); } } this.tableunit = ((unitDataTable)(base.Tables["unit"])); if ((initTable == true)) { if ((this.tableunit != null)) { this.tableunit.InitVars(); } } this.tableuser = ((userDataTable)(base.Tables["user"])); if ((initTable == true)) { if ((this.tableuser != null)) { this.tableuser.InitVars(); } } this.relationFK_order_pickup_point = this.Relations["FK_order_pickup_point"]; this.relationFK_order_user = this.Relations["FK_order_user"]; this.relationFK_product_category = this.Relations["FK_product_category"]; this.relationFK_product_producer = this.Relations["FK_product_producer"]; this.relationFK_product_supplier = this.Relations["FK_product_supplier"]; this.relationFK_product_unit = this.Relations["FK_product_unit"]; this.relationFK_user_role = this.Relations["FK_user_role"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.DataSetName = "MarketDataSet"; this.Prefix = ""; this.Namespace = "http://tempuri.org/MarketDataSet.xsd"; this.EnforceConstraints = true; this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; this.tablecategory = new categoryDataTable(); base.Tables.Add(this.tablecategory); this.tableorder = new orderDataTable(); base.Tables.Add(this.tableorder); this.tablepickup_point = new pickup_pointDataTable(); base.Tables.Add(this.tablepickup_point); this.tableproducer = new producerDataTable(); base.Tables.Add(this.tableproducer); this.tableproduct = new productDataTable(); base.Tables.Add(this.tableproduct); this.tablerole = new roleDataTable(); base.Tables.Add(this.tablerole); this.tablesupplier = new supplierDataTable(); base.Tables.Add(this.tablesupplier); this.tableunit = new unitDataTable(); base.Tables.Add(this.tableunit); this.tableuser = new userDataTable(); base.Tables.Add(this.tableuser); this.relationFK_order_pickup_point = new global::System.Data.DataRelation("FK_order_pickup_point", new global::System.Data.DataColumn[] { this.tablepickup_point.idColumn}, new global::System.Data.DataColumn[] { this.tableorder.id_пункта_выдачиColumn}, false); this.Relations.Add(this.relationFK_order_pickup_point); this.relationFK_order_user = new global::System.Data.DataRelation("FK_order_user", new global::System.Data.DataColumn[] { this.tableuser.idColumn}, new global::System.Data.DataColumn[] { this.tableorder.id_пользователяColumn}, false); this.Relations.Add(this.relationFK_order_user); this.relationFK_product_category = new global::System.Data.DataRelation("FK_product_category", new global::System.Data.DataColumn[] { this.tablecategory.idColumn}, new global::System.Data.DataColumn[] { this.tableproduct.Категория_товараColumn}, false); this.Relations.Add(this.relationFK_product_category); this.relationFK_product_producer = new global::System.Data.DataRelation("FK_product_producer", new global::System.Data.DataColumn[] { this.tableproducer.idColumn}, new global::System.Data.DataColumn[] { this.tableproduct.ПроизводительColumn}, false); this.Relations.Add(this.relationFK_product_producer); this.relationFK_product_supplier = new global::System.Data.DataRelation("FK_product_supplier", new global::System.Data.DataColumn[] { this.tablesupplier.idColumn}, new global::System.Data.DataColumn[] { this.tableproduct.ПоставщикColumn}, false); this.Relations.Add(this.relationFK_product_supplier); this.relationFK_product_unit = new global::System.Data.DataRelation("FK_product_unit", new global::System.Data.DataColumn[] { this.tableunit.idColumn}, new global::System.Data.DataColumn[] { this.tableproduct.Единица_измеренияColumn}, false); this.Relations.Add(this.relationFK_product_unit); this.relationFK_user_role = new global::System.Data.DataRelation("FK_user_role", new global::System.Data.DataColumn[] { this.tablerole.idColumn}, new global::System.Data.DataColumn[] { this.tableuser.id_ролиColumn}, false); this.Relations.Add(this.relationFK_user_role); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializecategory() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializeorder() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializepickup_point() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializeproducer() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializeproduct() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializerole() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializesupplier() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializeunit() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private bool ShouldSerializeuser() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { this.InitVars(); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void categoryRowChangeEventHandler(object sender, categoryRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void orderRowChangeEventHandler(object sender, orderRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void pickup_pointRowChangeEventHandler(object sender, pickup_pointRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void producerRowChangeEventHandler(object sender, producerRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void productRowChangeEventHandler(object sender, productRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void roleRowChangeEventHandler(object sender, roleRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void supplierRowChangeEventHandler(object sender, supplierRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void unitRowChangeEventHandler(object sender, unitRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public delegate void userRowChangeEventHandler(object sender, userRowChangeEvent e); /// <summary> ///Represents the strongly named DataTable class. ///</summary> [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class categoryDataTable : global::System.Data.TypedTableBase<categoryRow> { private global::System.Data.DataColumn columnid; private global::System.Data.DataColumn columntitle; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public categoryDataTable() { this.TableName = "category"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal categoryDataTable(global::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; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected categoryDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn idColumn { get { return this.columnid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn titleColumn { get { return this.columntitle; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public categoryRow this[int index] { get { return ((categoryRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event categoryRowChangeEventHandler categoryRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event categoryRowChangeEventHandler categoryRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event categoryRowChangeEventHandler categoryRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event categoryRowChangeEventHandler categoryRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void AddcategoryRow(categoryRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public categoryRow AddcategoryRow(int id, string title) { categoryRow rowcategoryRow = ((categoryRow)(this.NewRow())); object[] columnValuesArray = new object[] { id, title}; rowcategoryRow.ItemArray = columnValuesArray; this.Rows.Add(rowcategoryRow); return rowcategoryRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public categoryRow FindByid(int id) { return ((categoryRow)(this.Rows.Find(new object[] { id}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataTable Clone() { categoryDataTable cln = ((categoryDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new categoryDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnid = base.Columns["id"]; this.columntitle = base.Columns["title"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid); this.columntitle = new global::System.Data.DataColumn("title", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columntitle); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnid}, true)); this.columnid.AllowDBNull = false; this.columnid.Unique = true; this.columntitle.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public categoryRow NewcategoryRow() { return ((categoryRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new categoryRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Type GetRowType() { return typeof(categoryRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.categoryRowChanged != null)) { this.categoryRowChanged(this, new categoryRowChangeEvent(((categoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.categoryRowChanging != null)) { this.categoryRowChanging(this, new categoryRowChangeEvent(((categoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.categoryRowDeleted != null)) { this.categoryRowDeleted(this, new categoryRowChangeEvent(((categoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.categoryRowDeleting != null)) { this.categoryRowDeleting(this, new categoryRowChangeEvent(((categoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void RemovecategoryRow(categoryRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "categoryDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } } /// <summary> ///Represents the strongly named DataTable class. ///</summary> [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class orderDataTable : global::System.Data.TypedTableBase<orderRow> { private global::System.Data.DataColumn columnНомер_заказа; private global::System.Data.DataColumn columnАртикул_заказа; private global::System.Data.DataColumn columnДата_заказа; private global::System.Data.DataColumn columnДата_доставки; private global::System.Data.DataColumn columnid_пункта_выдачи; private global::System.Data.DataColumn columnid_пользователя; private global::System.Data.DataColumn columnКод_для_получения; private global::System.Data.DataColumn columnСтатус_заказа; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderDataTable() { this.TableName = "order"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal orderDataTable(global::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; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected orderDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Номер_заказаColumn { get { return this.columnНомер_заказа; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Артикул_заказаColumn { get { return this.columnАртикул_заказа; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Дата_заказаColumn { get { return this.columnДата_заказа; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Дата_доставкиColumn { get { return this.columnДата_доставки; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn id_пункта_выдачиColumn { get { return this.columnid_пункта_выдачи; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn id_пользователяColumn { get { return this.columnid_пользователя; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Код_для_полученияColumn { get { return this.columnКод_для_получения; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Статус_заказаColumn { get { return this.columnСтатус_заказа; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderRow this[int index] { get { return ((orderRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event orderRowChangeEventHandler orderRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event orderRowChangeEventHandler orderRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event orderRowChangeEventHandler orderRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event orderRowChangeEventHandler orderRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void AddorderRow(orderRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderRow AddorderRow(string Артикул_заказа, string Дата_заказа, System.DateTime Дата_доставки, pickup_pointRow parentpickup_pointRowByFK_order_pickup_point, userRow parentuserRowByFK_order_user, short Код_для_получения, string Статус_заказа) { orderRow roworderRow = ((orderRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Артикул_заказа, Дата_заказа, Дата_доставки, null, null, Код_для_получения, Статус_заказа}; if ((parentpickup_pointRowByFK_order_pickup_point != null)) { columnValuesArray[4] = parentpickup_pointRowByFK_order_pickup_point[0]; } if ((parentuserRowByFK_order_user != null)) { columnValuesArray[5] = parentuserRowByFK_order_user[0]; } roworderRow.ItemArray = columnValuesArray; this.Rows.Add(roworderRow); return roworderRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderRow FindByНомер_заказа(int Номер_заказа) { return ((orderRow)(this.Rows.Find(new object[] { Номер_заказа}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataTable Clone() { orderDataTable cln = ((orderDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new orderDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnНомер_заказа = base.Columns["Номер_заказа"]; this.columnАртикул_заказа = base.Columns["Артикул_заказа"]; this.columnДата_заказа = base.Columns["Дата_заказа"]; this.columnДата_доставки = base.Columns["Дата_доставки"]; this.columnid_пункта_выдачи = base.Columns["id_пункта_выдачи"]; this.columnid_пользователя = base.Columns["id_пользователя"]; this.columnКод_для_получения = base.Columns["Код_для_получения"]; this.columnСтатус_заказа = base.Columns["Статус_заказа"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.columnНомер_заказа = new global::System.Data.DataColumn("Номер_заказа", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnНомер_заказа); this.columnАртикул_заказа = new global::System.Data.DataColumn("Артикул_заказа", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnАртикул_заказа); this.columnДата_заказа = new global::System.Data.DataColumn("Дата_заказа", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnДата_заказа); this.columnДата_доставки = new global::System.Data.DataColumn("Дата_доставки", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnДата_доставки); this.columnid_пункта_выдачи = new global::System.Data.DataColumn("id_пункта_выдачи", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid_пункта_выдачи); this.columnid_пользователя = new global::System.Data.DataColumn("id_пользователя", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid_пользователя); this.columnКод_для_получения = new global::System.Data.DataColumn("Код_для_получения", typeof(short), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnКод_для_получения); this.columnСтатус_заказа = new global::System.Data.DataColumn("Статус_заказа", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnСтатус_заказа); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnНомер_заказа}, true)); this.columnНомер_заказа.AutoIncrement = true; this.columnНомер_заказа.AutoIncrementSeed = -1; this.columnНомер_заказа.AutoIncrementStep = -1; this.columnНомер_заказа.AllowDBNull = false; this.columnНомер_заказа.ReadOnly = true; this.columnНомер_заказа.Unique = true; this.columnАртикул_заказа.MaxLength = 50; this.columnДата_заказа.MaxLength = 50; this.columnid_пользователя.AllowDBNull = false; this.columnСтатус_заказа.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderRow NeworderRow() { return ((orderRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new orderRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Type GetRowType() { return typeof(orderRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.orderRowChanged != null)) { this.orderRowChanged(this, new orderRowChangeEvent(((orderRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.orderRowChanging != null)) { this.orderRowChanging(this, new orderRowChangeEvent(((orderRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.orderRowDeleted != null)) { this.orderRowDeleted(this, new orderRowChangeEvent(((orderRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.orderRowDeleting != null)) { this.orderRowDeleting(this, new orderRowChangeEvent(((orderRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void RemoveorderRow(orderRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "orderDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } } /// <summary> ///Represents the strongly named DataTable class. ///</summary> [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class pickup_pointDataTable : global::System.Data.TypedTableBase<pickup_pointRow> { private global::System.Data.DataColumn columnid; private global::System.Data.DataColumn columnindex; private global::System.Data.DataColumn columncity; private global::System.Data.DataColumn columnstreet; private global::System.Data.DataColumn columnhouse; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public pickup_pointDataTable() { this.TableName = "pickup_point"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal pickup_pointDataTable(global::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; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected pickup_pointDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn idColumn { get { return this.columnid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn indexColumn { get { return this.columnindex; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn cityColumn { get { return this.columncity; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn streetColumn { get { return this.columnstreet; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn houseColumn { get { return this.columnhouse; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public pickup_pointRow this[int index] { get { return ((pickup_pointRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event pickup_pointRowChangeEventHandler pickup_pointRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event pickup_pointRowChangeEventHandler pickup_pointRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event pickup_pointRowChangeEventHandler pickup_pointRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event pickup_pointRowChangeEventHandler pickup_pointRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void Addpickup_pointRow(pickup_pointRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public pickup_pointRow Addpickup_pointRow(int index, string city, string street, byte house) { pickup_pointRow rowpickup_pointRow = ((pickup_pointRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, index, city, street, house}; rowpickup_pointRow.ItemArray = columnValuesArray; this.Rows.Add(rowpickup_pointRow); return rowpickup_pointRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public pickup_pointRow FindByid(int id) { return ((pickup_pointRow)(this.Rows.Find(new object[] { id}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataTable Clone() { pickup_pointDataTable cln = ((pickup_pointDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new pickup_pointDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnid = base.Columns["id"]; this.columnindex = base.Columns["index"]; this.columncity = base.Columns["city"]; this.columnstreet = base.Columns["street"]; this.columnhouse = base.Columns["house"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid); this.columnindex = new global::System.Data.DataColumn("index", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnindex); this.columncity = new global::System.Data.DataColumn("city", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columncity); this.columnstreet = new global::System.Data.DataColumn("street", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnstreet); this.columnhouse = new global::System.Data.DataColumn("house", typeof(byte), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnhouse); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnid}, true)); this.columnid.AutoIncrement = true; this.columnid.AutoIncrementSeed = -1; this.columnid.AutoIncrementStep = -1; this.columnid.AllowDBNull = false; this.columnid.ReadOnly = true; this.columnid.Unique = true; this.columnindex.AllowDBNull = false; this.columncity.AllowDBNull = false; this.columncity.MaxLength = 50; this.columnstreet.AllowDBNull = false; this.columnstreet.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public pickup_pointRow Newpickup_pointRow() { return ((pickup_pointRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new pickup_pointRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Type GetRowType() { return typeof(pickup_pointRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.pickup_pointRowChanged != null)) { this.pickup_pointRowChanged(this, new pickup_pointRowChangeEvent(((pickup_pointRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.pickup_pointRowChanging != null)) { this.pickup_pointRowChanging(this, new pickup_pointRowChangeEvent(((pickup_pointRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.pickup_pointRowDeleted != null)) { this.pickup_pointRowDeleted(this, new pickup_pointRowChangeEvent(((pickup_pointRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.pickup_pointRowDeleting != null)) { this.pickup_pointRowDeleting(this, new pickup_pointRowChangeEvent(((pickup_pointRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void Removepickup_pointRow(pickup_pointRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "pickup_pointDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } } /// <summary> ///Represents the strongly named DataTable class. ///</summary> [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class producerDataTable : global::System.Data.TypedTableBase<producerRow> { private global::System.Data.DataColumn columnid; private global::System.Data.DataColumn columntitle; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public producerDataTable() { this.TableName = "producer"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal producerDataTable(global::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; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected producerDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn idColumn { get { return this.columnid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn titleColumn { get { return this.columntitle; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public producerRow this[int index] { get { return ((producerRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event producerRowChangeEventHandler producerRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event producerRowChangeEventHandler producerRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event producerRowChangeEventHandler producerRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event producerRowChangeEventHandler producerRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void AddproducerRow(producerRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public producerRow AddproducerRow(int id, string title) { producerRow rowproducerRow = ((producerRow)(this.NewRow())); object[] columnValuesArray = new object[] { id, title}; rowproducerRow.ItemArray = columnValuesArray; this.Rows.Add(rowproducerRow); return rowproducerRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public producerRow FindByid(int id) { return ((producerRow)(this.Rows.Find(new object[] { id}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataTable Clone() { producerDataTable cln = ((producerDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new producerDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnid = base.Columns["id"]; this.columntitle = base.Columns["title"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid); this.columntitle = new global::System.Data.DataColumn("title", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columntitle); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnid}, true)); this.columnid.AllowDBNull = false; this.columnid.Unique = true; this.columntitle.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public producerRow NewproducerRow() { return ((producerRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new producerRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Type GetRowType() { return typeof(producerRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.producerRowChanged != null)) { this.producerRowChanged(this, new producerRowChangeEvent(((producerRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.producerRowChanging != null)) { this.producerRowChanging(this, new producerRowChangeEvent(((producerRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.producerRowDeleted != null)) { this.producerRowDeleted(this, new producerRowChangeEvent(((producerRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.producerRowDeleting != null)) { this.producerRowDeleting(this, new producerRowChangeEvent(((producerRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void RemoveproducerRow(producerRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "producerDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } } /// <summary> ///Represents the strongly named DataTable class. ///</summary> [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class productDataTable : global::System.Data.TypedTableBase<productRow> { private global::System.Data.DataColumn columnАртикул; private global::System.Data.DataColumn columnНаименование_товара; private global::System.Data.DataColumn columnЕдиница_измерения; private global::System.Data.DataColumn columnЦена; private global::System.Data.DataColumn columnПоставщик; private global::System.Data.DataColumn columnПроизводитель; private global::System.Data.DataColumn columnКатегория_товара; private global::System.Data.DataColumn columnДействующая_скидка; private global::System.Data.DataColumn columnКол_во_на_складе; private global::System.Data.DataColumn columnОписание_товара; private global::System.Data.DataColumn columnФото; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productDataTable() { this.TableName = "product"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal productDataTable(global::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; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected productDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn АртикулColumn { get { return this.columnАртикул; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Наименование_товараColumn { get { return this.columnНаименование_товара; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Единица_измеренияColumn { get { return this.columnЕдиница_измерения; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn ЦенаColumn { get { return this.columnЦена; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn ПоставщикColumn { get { return this.columnПоставщик; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn ПроизводительColumn { get { return this.columnПроизводитель; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Категория_товараColumn { get { return this.columnКатегория_товара; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Действующая_скидкаColumn { get { return this.columnДействующая_скидка; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Кол_во_на_складеColumn { get { return this.columnКол_во_на_складе; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn Описание_товараColumn { get { return this.columnОписание_товара; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn ФотоColumn { get { return this.columnФото; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRow this[int index] { get { return ((productRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event productRowChangeEventHandler productRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event productRowChangeEventHandler productRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event productRowChangeEventHandler productRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event productRowChangeEventHandler productRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void AddproductRow(productRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRow AddproductRow(string Артикул, string Наименование_товара, unitRow parentunitRowByFK_product_unit, decimal Цена, supplierRow parentsupplierRowByFK_product_supplier, producerRow parentproducerRowByFK_product_producer, categoryRow parentcategoryRowByFK_product_category, byte Действующая_скидка, byte Кол_во_на_складе, string Описание_товара, string Фото) { productRow rowproductRow = ((productRow)(this.NewRow())); object[] columnValuesArray = new object[] { Артикул, Наименование_товара, null, Цена, null, null, null, Действующая_скидка, Кол_во_на_складе, Описание_товара, Фото}; if ((parentunitRowByFK_product_unit != null)) { columnValuesArray[2] = parentunitRowByFK_product_unit[0]; } if ((parentsupplierRowByFK_product_supplier != null)) { columnValuesArray[4] = parentsupplierRowByFK_product_supplier[0]; } if ((parentproducerRowByFK_product_producer != null)) { columnValuesArray[5] = parentproducerRowByFK_product_producer[0]; } if ((parentcategoryRowByFK_product_category != null)) { columnValuesArray[6] = parentcategoryRowByFK_product_category[0]; } rowproductRow.ItemArray = columnValuesArray; this.Rows.Add(rowproductRow); return rowproductRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRow FindByАртикул(string Артикул) { return ((productRow)(this.Rows.Find(new object[] { Артикул}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataTable Clone() { productDataTable cln = ((productDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new productDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnАртикул = base.Columns["Артикул"]; this.columnНаименование_товара = base.Columns["Наименование_товара"]; this.columnЕдиница_измерения = base.Columns["Единица_измерения"]; this.columnЦена = base.Columns["Цена"]; this.columnПоставщик = base.Columns["Поставщик"]; this.columnПроизводитель = base.Columns["Производитель"]; this.columnКатегория_товара = base.Columns["Категория_товара"]; this.columnДействующая_скидка = base.Columns["Действующая_скидка"]; this.columnКол_во_на_складе = base.Columns["Кол_во_на_складе"]; this.columnОписание_товара = base.Columns["Описание_товара"]; this.columnФото = base.Columns["Фото"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.columnАртикул = new global::System.Data.DataColumn("Артикул", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnАртикул); this.columnНаименование_товара = new global::System.Data.DataColumn("Наименование_товара", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnНаименование_товара); this.columnЕдиница_измерения = new global::System.Data.DataColumn("Единица_измерения", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnЕдиница_измерения); this.columnЦена = new global::System.Data.DataColumn("Цена", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnЦена); this.columnПоставщик = new global::System.Data.DataColumn("Поставщик", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnПоставщик); this.columnПроизводитель = new global::System.Data.DataColumn("Производитель", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnПроизводитель); this.columnКатегория_товара = new global::System.Data.DataColumn("Категория_товара", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnКатегория_товара); this.columnДействующая_скидка = new global::System.Data.DataColumn("Действующая_скидка", typeof(byte), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnДействующая_скидка); this.columnКол_во_на_складе = new global::System.Data.DataColumn("Кол_во_на_складе", typeof(byte), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnКол_во_на_складе); this.columnОписание_товара = new global::System.Data.DataColumn("Описание_товара", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnОписание_товара); this.columnФото = new global::System.Data.DataColumn("Фото", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnФото); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnАртикул}, true)); this.columnАртикул.AllowDBNull = false; this.columnАртикул.Unique = true; this.columnАртикул.MaxLength = 50; this.columnНаименование_товара.MaxLength = 50; this.columnОписание_товара.MaxLength = 100; this.columnФото.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRow NewproductRow() { return ((productRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new productRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Type GetRowType() { return typeof(productRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.productRowChanged != null)) { this.productRowChanged(this, new productRowChangeEvent(((productRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.productRowChanging != null)) { this.productRowChanging(this, new productRowChangeEvent(((productRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.productRowDeleted != null)) { this.productRowDeleted(this, new productRowChangeEvent(((productRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.productRowDeleting != null)) { this.productRowDeleting(this, new productRowChangeEvent(((productRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void RemoveproductRow(productRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "productDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } } /// <summary> ///Represents the strongly named DataTable class. ///</summary> [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class roleDataTable : global::System.Data.TypedTableBase<roleRow> { private global::System.Data.DataColumn columnid; private global::System.Data.DataColumn columntitle; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public roleDataTable() { this.TableName = "role"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal roleDataTable(global::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; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected roleDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn idColumn { get { return this.columnid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn titleColumn { get { return this.columntitle; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public roleRow this[int index] { get { return ((roleRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event roleRowChangeEventHandler roleRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event roleRowChangeEventHandler roleRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event roleRowChangeEventHandler roleRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event roleRowChangeEventHandler roleRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void AddroleRow(roleRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public roleRow AddroleRow(int id, string title) { roleRow rowroleRow = ((roleRow)(this.NewRow())); object[] columnValuesArray = new object[] { id, title}; rowroleRow.ItemArray = columnValuesArray; this.Rows.Add(rowroleRow); return rowroleRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public roleRow FindByid(int id) { return ((roleRow)(this.Rows.Find(new object[] { id}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataTable Clone() { roleDataTable cln = ((roleDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new roleDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnid = base.Columns["id"]; this.columntitle = base.Columns["title"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid); this.columntitle = new global::System.Data.DataColumn("title", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columntitle); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnid}, true)); this.columnid.AllowDBNull = false; this.columnid.Unique = true; this.columntitle.AllowDBNull = false; this.columntitle.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public roleRow NewroleRow() { return ((roleRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new roleRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Type GetRowType() { return typeof(roleRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.roleRowChanged != null)) { this.roleRowChanged(this, new roleRowChangeEvent(((roleRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.roleRowChanging != null)) { this.roleRowChanging(this, new roleRowChangeEvent(((roleRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.roleRowDeleted != null)) { this.roleRowDeleted(this, new roleRowChangeEvent(((roleRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.roleRowDeleting != null)) { this.roleRowDeleting(this, new roleRowChangeEvent(((roleRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void RemoveroleRow(roleRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "roleDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } } /// <summary> ///Represents the strongly named DataTable class. ///</summary> [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class supplierDataTable : global::System.Data.TypedTableBase<supplierRow> { private global::System.Data.DataColumn columnid; private global::System.Data.DataColumn columntitle; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public supplierDataTable() { this.TableName = "supplier"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal supplierDataTable(global::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; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected supplierDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn idColumn { get { return this.columnid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn titleColumn { get { return this.columntitle; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public supplierRow this[int index] { get { return ((supplierRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event supplierRowChangeEventHandler supplierRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event supplierRowChangeEventHandler supplierRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event supplierRowChangeEventHandler supplierRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event supplierRowChangeEventHandler supplierRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void AddsupplierRow(supplierRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public supplierRow AddsupplierRow(int id, string title) { supplierRow rowsupplierRow = ((supplierRow)(this.NewRow())); object[] columnValuesArray = new object[] { id, title}; rowsupplierRow.ItemArray = columnValuesArray; this.Rows.Add(rowsupplierRow); return rowsupplierRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public supplierRow FindByid(int id) { return ((supplierRow)(this.Rows.Find(new object[] { id}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataTable Clone() { supplierDataTable cln = ((supplierDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new supplierDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnid = base.Columns["id"]; this.columntitle = base.Columns["title"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid); this.columntitle = new global::System.Data.DataColumn("title", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columntitle); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnid}, true)); this.columnid.AllowDBNull = false; this.columnid.Unique = true; this.columntitle.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public supplierRow NewsupplierRow() { return ((supplierRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new supplierRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Type GetRowType() { return typeof(supplierRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.supplierRowChanged != null)) { this.supplierRowChanged(this, new supplierRowChangeEvent(((supplierRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.supplierRowChanging != null)) { this.supplierRowChanging(this, new supplierRowChangeEvent(((supplierRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.supplierRowDeleted != null)) { this.supplierRowDeleted(this, new supplierRowChangeEvent(((supplierRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.supplierRowDeleting != null)) { this.supplierRowDeleting(this, new supplierRowChangeEvent(((supplierRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void RemovesupplierRow(supplierRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "supplierDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } } /// <summary> ///Represents the strongly named DataTable class. ///</summary> [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class unitDataTable : global::System.Data.TypedTableBase<unitRow> { private global::System.Data.DataColumn columnid; private global::System.Data.DataColumn columntitle; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public unitDataTable() { this.TableName = "unit"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal unitDataTable(global::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; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected unitDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn idColumn { get { return this.columnid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn titleColumn { get { return this.columntitle; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public unitRow this[int index] { get { return ((unitRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event unitRowChangeEventHandler unitRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event unitRowChangeEventHandler unitRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event unitRowChangeEventHandler unitRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event unitRowChangeEventHandler unitRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void AddunitRow(unitRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public unitRow AddunitRow(int id, string title) { unitRow rowunitRow = ((unitRow)(this.NewRow())); object[] columnValuesArray = new object[] { id, title}; rowunitRow.ItemArray = columnValuesArray; this.Rows.Add(rowunitRow); return rowunitRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public unitRow FindByid(int id) { return ((unitRow)(this.Rows.Find(new object[] { id}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataTable Clone() { unitDataTable cln = ((unitDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new unitDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnid = base.Columns["id"]; this.columntitle = base.Columns["title"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid); this.columntitle = new global::System.Data.DataColumn("title", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columntitle); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnid}, true)); this.columnid.AllowDBNull = false; this.columnid.Unique = true; this.columntitle.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public unitRow NewunitRow() { return ((unitRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new unitRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Type GetRowType() { return typeof(unitRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.unitRowChanged != null)) { this.unitRowChanged(this, new unitRowChangeEvent(((unitRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.unitRowChanging != null)) { this.unitRowChanging(this, new unitRowChangeEvent(((unitRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.unitRowDeleted != null)) { this.unitRowDeleted(this, new unitRowChangeEvent(((unitRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.unitRowDeleting != null)) { this.unitRowDeleting(this, new unitRowChangeEvent(((unitRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void RemoveunitRow(unitRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "unitDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } } /// <summary> ///Represents the strongly named DataTable class. ///</summary> [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class userDataTable : global::System.Data.TypedTableBase<userRow> { private global::System.Data.DataColumn columnid; private global::System.Data.DataColumn columnid_роли; private global::System.Data.DataColumn columnФИО; private global::System.Data.DataColumn columnЛогин; private global::System.Data.DataColumn columnПароль; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userDataTable() { this.TableName = "user"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal userDataTable(global::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; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected userDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn idColumn { get { return this.columnid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn id_ролиColumn { get { return this.columnid_роли; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn ФИОColumn { get { return this.columnФИО; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn ЛогинColumn { get { return this.columnЛогин; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataColumn ПарольColumn { get { return this.columnПароль; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int Count { get { return this.Rows.Count; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userRow this[int index] { get { return ((userRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event userRowChangeEventHandler userRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event userRowChangeEventHandler userRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event userRowChangeEventHandler userRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public event userRowChangeEventHandler userRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void AdduserRow(userRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userRow AdduserRow(roleRow parentroleRowByFK_user_role, string ФИО, string Логин, string Пароль) { userRow rowuserRow = ((userRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null, ФИО, Логин, Пароль}; if ((parentroleRowByFK_user_role != null)) { columnValuesArray[1] = parentroleRowByFK_user_role[0]; } rowuserRow.ItemArray = columnValuesArray; this.Rows.Add(rowuserRow); return rowuserRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userRow FindByid(int id) { return ((userRow)(this.Rows.Find(new object[] { id}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public override global::System.Data.DataTable Clone() { userDataTable cln = ((userDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new userDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal void InitVars() { this.columnid = base.Columns["id"]; this.columnid_роли = base.Columns["id_роли"]; this.columnФИО = base.Columns["ФИО"]; this.columnЛогин = base.Columns["Логин"]; this.columnПароль = base.Columns["Пароль"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitClass() { this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid); this.columnid_роли = new global::System.Data.DataColumn("id_роли", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnid_роли); this.columnФИО = new global::System.Data.DataColumn("ФИО", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnФИО); this.columnЛогин = new global::System.Data.DataColumn("Логин", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnЛогин); this.columnПароль = new global::System.Data.DataColumn("Пароль", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnПароль); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnid}, true)); this.columnid.AutoIncrement = true; this.columnid.AutoIncrementSeed = -1; this.columnid.AutoIncrementStep = -1; this.columnid.AllowDBNull = false; this.columnid.ReadOnly = true; this.columnid.Unique = true; this.columnid_роли.AllowDBNull = false; this.columnФИО.MaxLength = 50; this.columnЛогин.MaxLength = 50; this.columnПароль.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userRow NewuserRow() { return ((userRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new userRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override global::System.Type GetRowType() { return typeof(userRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.userRowChanged != null)) { this.userRowChanged(this, new userRowChangeEvent(((userRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.userRowChanging != null)) { this.userRowChanging(this, new userRowChangeEvent(((userRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.userRowDeleted != null)) { this.userRowDeleted(this, new userRowChangeEvent(((userRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.userRowDeleting != null)) { this.userRowDeleting(this, new userRowChangeEvent(((userRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void RemoveuserRow(userRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); MarketDataSet ds = new MarketDataSet(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "userDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; } } /// <summary> ///Represents strongly named DataRow class. ///</summary> public partial class categoryRow : global::System.Data.DataRow { private categoryDataTable tablecategory; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal categoryRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tablecategory = ((categoryDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id { get { return ((int)(this[this.tablecategory.idColumn])); } set { this[this.tablecategory.idColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string title { get { try { return ((string)(this[this.tablecategory.titleColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'title\' в таблице \'category\' равно DBNull.", e); } } set { this[this.tablecategory.titleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IstitleNull() { return this.IsNull(this.tablecategory.titleColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SettitleNull() { this[this.tablecategory.titleColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRow[] GetproductRows() { if ((this.Table.ChildRelations["FK_product_category"] == null)) { return new productRow[0]; } else { return ((productRow[])(base.GetChildRows(this.Table.ChildRelations["FK_product_category"]))); } } } /// <summary> ///Represents strongly named DataRow class. ///</summary> public partial class orderRow : global::System.Data.DataRow { private orderDataTable tableorder; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal orderRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableorder = ((orderDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int Номер_заказа { get { return ((int)(this[this.tableorder.Номер_заказаColumn])); } set { this[this.tableorder.Номер_заказаColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string Артикул_заказа { get { try { return ((string)(this[this.tableorder.Артикул_заказаColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Артикул_заказа\' в таблице \'order\' равно DBNull.", e); } } set { this[this.tableorder.Артикул_заказаColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string Дата_заказа { get { try { return ((string)(this[this.tableorder.Дата_заказаColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Дата_заказа\' в таблице \'order\' равно DBNull.", e); } } set { this[this.tableorder.Дата_заказаColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public System.DateTime Дата_доставки { get { try { return ((global::System.DateTime)(this[this.tableorder.Дата_доставкиColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Дата_доставки\' в таблице \'order\' равно DBNull.", e); } } set { this[this.tableorder.Дата_доставкиColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id_пункта_выдачи { get { try { return ((int)(this[this.tableorder.id_пункта_выдачиColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'id_пункта_выдачи\' в таблице \'order\' равно DBNull.", e); } } set { this[this.tableorder.id_пункта_выдачиColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id_пользователя { get { return ((int)(this[this.tableorder.id_пользователяColumn])); } set { this[this.tableorder.id_пользователяColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public short Код_для_получения { get { try { return ((short)(this[this.tableorder.Код_для_полученияColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Код_для_получения\' в таблице \'order\' равно DBNull.", e); } } set { this[this.tableorder.Код_для_полученияColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string Статус_заказа { get { try { return ((string)(this[this.tableorder.Статус_заказаColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Статус_заказа\' в таблице \'order\' равно DBNull.", e); } } set { this[this.tableorder.Статус_заказаColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public pickup_pointRow pickup_pointRow { get { return ((pickup_pointRow)(this.GetParentRow(this.Table.ParentRelations["FK_order_pickup_point"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_order_pickup_point"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userRow userRow { get { return ((userRow)(this.GetParentRow(this.Table.ParentRelations["FK_order_user"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_order_user"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsАртикул_заказаNull() { return this.IsNull(this.tableorder.Артикул_заказаColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetАртикул_заказаNull() { this[this.tableorder.Артикул_заказаColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsДата_заказаNull() { return this.IsNull(this.tableorder.Дата_заказаColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetДата_заказаNull() { this[this.tableorder.Дата_заказаColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsДата_доставкиNull() { return this.IsNull(this.tableorder.Дата_доставкиColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetДата_доставкиNull() { this[this.tableorder.Дата_доставкиColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool Isid_пункта_выдачиNull() { return this.IsNull(this.tableorder.id_пункта_выдачиColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void Setid_пункта_выдачиNull() { this[this.tableorder.id_пункта_выдачиColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsКод_для_полученияNull() { return this.IsNull(this.tableorder.Код_для_полученияColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetКод_для_полученияNull() { this[this.tableorder.Код_для_полученияColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsСтатус_заказаNull() { return this.IsNull(this.tableorder.Статус_заказаColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetСтатус_заказаNull() { this[this.tableorder.Статус_заказаColumn] = global::System.Convert.DBNull; } } /// <summary> ///Represents strongly named DataRow class. ///</summary> public partial class pickup_pointRow : global::System.Data.DataRow { private pickup_pointDataTable tablepickup_point; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal pickup_pointRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tablepickup_point = ((pickup_pointDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id { get { return ((int)(this[this.tablepickup_point.idColumn])); } set { this[this.tablepickup_point.idColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int index { get { return ((int)(this[this.tablepickup_point.indexColumn])); } set { this[this.tablepickup_point.indexColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string city { get { return ((string)(this[this.tablepickup_point.cityColumn])); } set { this[this.tablepickup_point.cityColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string street { get { return ((string)(this[this.tablepickup_point.streetColumn])); } set { this[this.tablepickup_point.streetColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public byte house { get { try { return ((byte)(this[this.tablepickup_point.houseColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'house\' в таблице \'pickup_point\' равно DBNull.", e); } } set { this[this.tablepickup_point.houseColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IshouseNull() { return this.IsNull(this.tablepickup_point.houseColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SethouseNull() { this[this.tablepickup_point.houseColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderRow[] GetorderRows() { if ((this.Table.ChildRelations["FK_order_pickup_point"] == null)) { return new orderRow[0]; } else { return ((orderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_order_pickup_point"]))); } } } /// <summary> ///Represents strongly named DataRow class. ///</summary> public partial class producerRow : global::System.Data.DataRow { private producerDataTable tableproducer; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal producerRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableproducer = ((producerDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id { get { return ((int)(this[this.tableproducer.idColumn])); } set { this[this.tableproducer.idColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string title { get { try { return ((string)(this[this.tableproducer.titleColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'title\' в таблице \'producer\' равно DBNull.", e); } } set { this[this.tableproducer.titleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IstitleNull() { return this.IsNull(this.tableproducer.titleColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SettitleNull() { this[this.tableproducer.titleColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRow[] GetproductRows() { if ((this.Table.ChildRelations["FK_product_producer"] == null)) { return new productRow[0]; } else { return ((productRow[])(base.GetChildRows(this.Table.ChildRelations["FK_product_producer"]))); } } } /// <summary> ///Represents strongly named DataRow class. ///</summary> public partial class productRow : global::System.Data.DataRow { private productDataTable tableproduct; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal productRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableproduct = ((productDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string Артикул { get { return ((string)(this[this.tableproduct.АртикулColumn])); } set { this[this.tableproduct.АртикулColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string Наименование_товара { get { try { return ((string)(this[this.tableproduct.Наименование_товараColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Наименование_товара\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.Наименование_товараColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int Единица_измерения { get { try { return ((int)(this[this.tableproduct.Единица_измеренияColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Единица_измерения\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.Единица_измеренияColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public decimal Цена { get { try { return ((decimal)(this[this.tableproduct.ЦенаColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Цена\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.ЦенаColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int Поставщик { get { try { return ((int)(this[this.tableproduct.ПоставщикColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Поставщик\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.ПоставщикColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int Производитель { get { try { return ((int)(this[this.tableproduct.ПроизводительColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Производитель\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.ПроизводительColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int Категория_товара { get { try { return ((int)(this[this.tableproduct.Категория_товараColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Категория_товара\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.Категория_товараColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public byte Действующая_скидка { get { try { return ((byte)(this[this.tableproduct.Действующая_скидкаColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Действующая_скидка\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.Действующая_скидкаColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public byte Кол_во_на_складе { get { try { return ((byte)(this[this.tableproduct.Кол_во_на_складеColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Кол_во_на_складе\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.Кол_во_на_складеColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string Описание_товара { get { try { return ((string)(this[this.tableproduct.Описание_товараColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Описание_товара\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.Описание_товараColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string Фото { get { try { return ((string)(this[this.tableproduct.ФотоColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Фото\' в таблице \'product\' равно DBNull.", e); } } set { this[this.tableproduct.ФотоColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public categoryRow categoryRow { get { return ((categoryRow)(this.GetParentRow(this.Table.ParentRelations["FK_product_category"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_product_category"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public producerRow producerRow { get { return ((producerRow)(this.GetParentRow(this.Table.ParentRelations["FK_product_producer"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_product_producer"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public supplierRow supplierRow { get { return ((supplierRow)(this.GetParentRow(this.Table.ParentRelations["FK_product_supplier"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_product_supplier"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public unitRow unitRow { get { return ((unitRow)(this.GetParentRow(this.Table.ParentRelations["FK_product_unit"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_product_unit"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsНаименование_товараNull() { return this.IsNull(this.tableproduct.Наименование_товараColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetНаименование_товараNull() { this[this.tableproduct.Наименование_товараColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsЕдиница_измеренияNull() { return this.IsNull(this.tableproduct.Единица_измеренияColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetЕдиница_измеренияNull() { this[this.tableproduct.Единица_измеренияColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsЦенаNull() { return this.IsNull(this.tableproduct.ЦенаColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetЦенаNull() { this[this.tableproduct.ЦенаColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsПоставщикNull() { return this.IsNull(this.tableproduct.ПоставщикColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetПоставщикNull() { this[this.tableproduct.ПоставщикColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsПроизводительNull() { return this.IsNull(this.tableproduct.ПроизводительColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetПроизводительNull() { this[this.tableproduct.ПроизводительColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsКатегория_товараNull() { return this.IsNull(this.tableproduct.Категория_товараColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetКатегория_товараNull() { this[this.tableproduct.Категория_товараColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsДействующая_скидкаNull() { return this.IsNull(this.tableproduct.Действующая_скидкаColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetДействующая_скидкаNull() { this[this.tableproduct.Действующая_скидкаColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsКол_во_на_складеNull() { return this.IsNull(this.tableproduct.Кол_во_на_складеColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetКол_во_на_складеNull() { this[this.tableproduct.Кол_во_на_складеColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsОписание_товараNull() { return this.IsNull(this.tableproduct.Описание_товараColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetОписание_товараNull() { this[this.tableproduct.Описание_товараColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsФотоNull() { return this.IsNull(this.tableproduct.ФотоColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetФотоNull() { this[this.tableproduct.ФотоColumn] = global::System.Convert.DBNull; } } /// <summary> ///Represents strongly named DataRow class. ///</summary> public partial class roleRow : global::System.Data.DataRow { private roleDataTable tablerole; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal roleRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tablerole = ((roleDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id { get { return ((int)(this[this.tablerole.idColumn])); } set { this[this.tablerole.idColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string title { get { return ((string)(this[this.tablerole.titleColumn])); } set { this[this.tablerole.titleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userRow[] GetuserRows() { if ((this.Table.ChildRelations["FK_user_role"] == null)) { return new userRow[0]; } else { return ((userRow[])(base.GetChildRows(this.Table.ChildRelations["FK_user_role"]))); } } } /// <summary> ///Represents strongly named DataRow class. ///</summary> public partial class supplierRow : global::System.Data.DataRow { private supplierDataTable tablesupplier; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal supplierRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tablesupplier = ((supplierDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id { get { return ((int)(this[this.tablesupplier.idColumn])); } set { this[this.tablesupplier.idColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string title { get { try { return ((string)(this[this.tablesupplier.titleColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'title\' в таблице \'supplier\' равно DBNull.", e); } } set { this[this.tablesupplier.titleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IstitleNull() { return this.IsNull(this.tablesupplier.titleColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SettitleNull() { this[this.tablesupplier.titleColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRow[] GetproductRows() { if ((this.Table.ChildRelations["FK_product_supplier"] == null)) { return new productRow[0]; } else { return ((productRow[])(base.GetChildRows(this.Table.ChildRelations["FK_product_supplier"]))); } } } /// <summary> ///Represents strongly named DataRow class. ///</summary> public partial class unitRow : global::System.Data.DataRow { private unitDataTable tableunit; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal unitRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableunit = ((unitDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id { get { return ((int)(this[this.tableunit.idColumn])); } set { this[this.tableunit.idColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string title { get { try { return ((string)(this[this.tableunit.titleColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'title\' в таблице \'unit\' равно DBNull.", e); } } set { this[this.tableunit.titleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IstitleNull() { return this.IsNull(this.tableunit.titleColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SettitleNull() { this[this.tableunit.titleColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRow[] GetproductRows() { if ((this.Table.ChildRelations["FK_product_unit"] == null)) { return new productRow[0]; } else { return ((productRow[])(base.GetChildRows(this.Table.ChildRelations["FK_product_unit"]))); } } } /// <summary> ///Represents strongly named DataRow class. ///</summary> public partial class userRow : global::System.Data.DataRow { private userDataTable tableuser; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal userRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableuser = ((userDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id { get { return ((int)(this[this.tableuser.idColumn])); } set { this[this.tableuser.idColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int id_роли { get { return ((int)(this[this.tableuser.id_ролиColumn])); } set { this[this.tableuser.id_ролиColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string ФИО { get { try { return ((string)(this[this.tableuser.ФИОColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'ФИО\' в таблице \'user\' равно DBNull.", e); } } set { this[this.tableuser.ФИОColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string Логин { get { try { return ((string)(this[this.tableuser.ЛогинColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Логин\' в таблице \'user\' равно DBNull.", e); } } set { this[this.tableuser.ЛогинColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public string Пароль { get { try { return ((string)(this[this.tableuser.ПарольColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Пароль\' в таблице \'user\' равно DBNull.", e); } } set { this[this.tableuser.ПарольColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public roleRow roleRow { get { return ((roleRow)(this.GetParentRow(this.Table.ParentRelations["FK_user_role"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_user_role"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsФИОNull() { return this.IsNull(this.tableuser.ФИОColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetФИОNull() { this[this.tableuser.ФИОColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsЛогинNull() { return this.IsNull(this.tableuser.ЛогинColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetЛогинNull() { this[this.tableuser.ЛогинColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool IsПарольNull() { return this.IsNull(this.tableuser.ПарольColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public void SetПарольNull() { this[this.tableuser.ПарольColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderRow[] GetorderRows() { if ((this.Table.ChildRelations["FK_order_user"] == null)) { return new orderRow[0]; } else { return ((orderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_order_user"]))); } } } /// <summary> ///Row event argument class ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class categoryRowChangeEvent : global::System.EventArgs { private categoryRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public categoryRowChangeEvent(categoryRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public categoryRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// <summary> ///Row event argument class ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class orderRowChangeEvent : global::System.EventArgs { private orderRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderRowChangeEvent(orderRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// <summary> ///Row event argument class ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class pickup_pointRowChangeEvent : global::System.EventArgs { private pickup_pointRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public pickup_pointRowChangeEvent(pickup_pointRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public pickup_pointRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// <summary> ///Row event argument class ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class producerRowChangeEvent : global::System.EventArgs { private producerRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public producerRowChangeEvent(producerRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public producerRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// <summary> ///Row event argument class ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class productRowChangeEvent : global::System.EventArgs { private productRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRowChangeEvent(productRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// <summary> ///Row event argument class ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class roleRowChangeEvent : global::System.EventArgs { private roleRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public roleRowChangeEvent(roleRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public roleRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// <summary> ///Row event argument class ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class supplierRowChangeEvent : global::System.EventArgs { private supplierRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public supplierRowChangeEvent(supplierRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public supplierRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// <summary> ///Row event argument class ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class unitRowChangeEvent : global::System.EventArgs { private unitRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public unitRowChangeEvent(unitRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public unitRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// <summary> ///Row event argument class ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public class userRowChangeEvent : global::System.EventArgs { private userRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userRowChangeEvent(userRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } } } namespace Demo.MarketDataSetTableAdapters { /// <summary> ///Represents the connection and commands used to retrieve and save data. ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DataObjectAttribute(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class categoryTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public categoryTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::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)) { ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::System.Data.SqlClient.SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { this.CommandCollection[i].Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.DeleteCommand != null))) { this.Adapter.DeleteCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.InsertCommand != null))) { this.Adapter.InsertCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.UpdateCommand != null))) { this.Adapter.UpdateCommand.Transaction = this._transaction; } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "category"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("title", "title"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[category] WHERE (([id] = @Original_id) AND ((@IsNull_title = 1" + " AND [title] IS NULL) OR ([title] = @Original_title)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_title", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[category] ([id], [title]) VALUES (@id, @title);\r\nSELECT id, ti" + "tle FROM category WHERE (id = @id)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[category] SET [id] = @id, [title] = @title WHERE (([id] = @Original" + "_id) AND ((@IsNull_title = 1 AND [title] IS NULL) OR ([title] = @Original_title)" + "));\r\nSELECT id, title FROM category WHERE (id = @id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_title", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Demo.Properties.Settings.Default.MarketConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT id, title FROM dbo.category"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(MarketDataSet.categoryDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual MarketDataSet.categoryDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; MarketDataSet.categoryDataTable dataTable = new MarketDataSet.categoryDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet.categoryDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet dataSet) { return this.Adapter.Update(dataSet, "category"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow dataRow) { return this.Adapter.Update(new global::System.Data.DataRow[] { dataRow}); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_id, string Original_title) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id)); if ((Original_title == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int id, string title) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int id, string title, int Original_id, string Original_title) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(title)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_id)); if ((Original_title == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string title, int Original_id, string Original_title) { return this.Update(Original_id, title, Original_id, Original_title); } } /// <summary> ///Represents the connection and commands used to retrieve and save data. ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DataObjectAttribute(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class orderTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public orderTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::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)) { ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::System.Data.SqlClient.SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { this.CommandCollection[i].Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.DeleteCommand != null))) { this.Adapter.DeleteCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.InsertCommand != null))) { this.Adapter.InsertCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.UpdateCommand != null))) { this.Adapter.UpdateCommand.Transaction = this._transaction; } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "order"; tableMapping.ColumnMappings.Add("Номер_заказа", "Номер_заказа"); tableMapping.ColumnMappings.Add("Артикул_заказа", "Артикул_заказа"); tableMapping.ColumnMappings.Add("Дата_заказа", "Дата_заказа"); tableMapping.ColumnMappings.Add("Дата_доставки", "Дата_доставки"); tableMapping.ColumnMappings.Add("id_пункта_выдачи", "id_пункта_выдачи"); tableMapping.ColumnMappings.Add("id_пользователя", "id_пользователя"); tableMapping.ColumnMappings.Add("Код_для_получения", "Код_для_получения"); tableMapping.ColumnMappings.Add("Статус_заказа", "Статус_заказа"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[order] WHERE (([Номер_заказа] = @Original_Номер_заказа) AND ((@IsNull_Артикул_заказа = 1 AND [Артикул_заказа] IS NULL) OR ([Артикул_заказа] = @Original_Артикул_заказа)) AND ((@IsNull_Дата_заказа = 1 AND [Дата_заказа] IS NULL) OR ([Дата_заказа] = @Original_Дата_заказа)) AND ((@IsNull_Дата_доставки = 1 AND [Дата_доставки] IS NULL) OR ([Дата_доставки] = @Original_Дата_доставки)) AND ((@IsNull_id_пункта_выдачи = 1 AND [id_пункта_выдачи] IS NULL) OR ([id_пункта_выдачи] = @Original_id_пункта_выдачи)) AND ([id_пользователя] = @Original_id_пользователя) AND ((@IsNull_Код_для_получения = 1 AND [Код_для_получения] IS NULL) OR ([Код_для_получения] = @Original_Код_для_получения)) AND ((@IsNull_Статус_заказа = 1 AND [Статус_заказа] IS NULL) OR ([Статус_заказа] = @Original_Статус_заказа)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Номер_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Номер_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Артикул_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Артикул_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Дата_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Дата_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Дата_доставки", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_доставки", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Дата_доставки", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_доставки", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_id_пункта_выдачи", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пункта_выдачи", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_пункта_выдачи", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пункта_выдачи", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_пользователя", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пользователя", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Код_для_получения", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_для_получения", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_для_получения", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_для_получения", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Статус_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Статус_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Статус_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Статус_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[order] ([Артикул_заказа], [Дата_заказа], [Дата_доставки], [id_пункта_выдачи], [id_пользователя], [Код_для_получения], [Статус_заказа]) VALUES (@Артикул_заказа, @Дата_заказа, @Дата_доставки, @id_пункта_выдачи, @id_пользователя, @Код_для_получения, @Статус_заказа); SELECT Номер_заказа, Артикул_заказа, Дата_заказа, Дата_доставки, id_пункта_выдачи, id_пользователя, Код_для_получения, Статус_заказа FROM [order] WHERE (Номер_заказа = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Артикул_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_доставки", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_доставки", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_пункта_выдачи", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пункта_выдачи", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_пользователя", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пользователя", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_для_получения", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_для_получения", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Статус_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Статус_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[order] SET [Артикул_заказа] = @Артикул_заказа, [Дата_заказа] = @Дата_заказа, [Дата_доставки] = @Дата_доставки, [id_пункта_выдачи] = @id_пункта_выдачи, [id_пользователя] = @id_пользователя, [Код_для_получения] = @Код_для_получения, [Статус_заказа] = @Статус_заказа WHERE (([Номер_заказа] = @Original_Номер_заказа) AND ((@IsNull_Артикул_заказа = 1 AND [Артикул_заказа] IS NULL) OR ([Артикул_заказа] = @Original_Артикул_заказа)) AND ((@IsNull_Дата_заказа = 1 AND [Дата_заказа] IS NULL) OR ([Дата_заказа] = @Original_Дата_заказа)) AND ((@IsNull_Дата_доставки = 1 AND [Дата_доставки] IS NULL) OR ([Дата_доставки] = @Original_Дата_доставки)) AND ((@IsNull_id_пункта_выдачи = 1 AND [id_пункта_выдачи] IS NULL) OR ([id_пункта_выдачи] = @Original_id_пункта_выдачи)) AND ([id_пользователя] = @Original_id_пользователя) AND ((@IsNull_Код_для_получения = 1 AND [Код_для_получения] IS NULL) OR ([Код_для_получения] = @Original_Код_для_получения)) AND ((@IsNull_Статус_заказа = 1 AND [Статус_заказа] IS NULL) OR ([Статус_заказа] = @Original_Статус_заказа))); SELECT Номер_заказа, Артикул_заказа, Дата_заказа, Дата_доставки, id_пункта_выдачи, id_пользователя, Код_для_получения, Статус_заказа FROM [order] WHERE (Номер_заказа = @Номер_заказа)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Артикул_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_доставки", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_доставки", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_пункта_выдачи", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пункта_выдачи", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_пользователя", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пользователя", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_для_получения", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_для_получения", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Статус_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Статус_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Номер_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Номер_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Артикул_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Артикул_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Дата_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Дата_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Дата_доставки", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_доставки", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Дата_доставки", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_доставки", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_id_пункта_выдачи", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пункта_выдачи", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_пункта_выдачи", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пункта_выдачи", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_пользователя", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_пользователя", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Код_для_получения", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_для_получения", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_для_получения", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_для_получения", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Статус_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Статус_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Статус_заказа", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Статус_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Номер_заказа", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Номер_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Demo.Properties.Settings.Default.MarketConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT Номер_заказа, Артикул_заказа, Дата_заказа, Дата_доставки, id_пункта_выдачи" + ", id_пользователя, Код_для_получения, Статус_заказа FROM dbo.[order]"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(MarketDataSet.orderDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual MarketDataSet.orderDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; MarketDataSet.orderDataTable dataTable = new MarketDataSet.orderDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet.orderDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet dataSet) { return this.Adapter.Update(dataSet, "order"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow dataRow) { return this.Adapter.Update(new global::System.Data.DataRow[] { dataRow}); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_Номер_заказа, string Original_Артикул_заказа, string Original_Дата_заказа, global::System.Nullable<global::System.DateTime> Original_Дата_доставки, global::System.Nullable<int> Original_id_пункта_выдачи, int Original_id_пользователя, global::System.Nullable<short> Original_Код_для_получения, string Original_Статус_заказа) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Номер_заказа)); if ((Original_Артикул_заказа == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Артикул_заказа)); } if ((Original_Дата_заказа == null)) { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Дата_заказа)); } if ((Original_Дата_доставки.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_Дата_доставки.Value)); } else { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; } if ((Original_id_пункта_выдачи.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_id_пункта_выдачи.Value)); } else { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; } this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(Original_id_пользователя)); if ((Original_Код_для_получения.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[11].Value = ((short)(Original_Код_для_получения.Value)); } else { this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[11].Value = global::System.DBNull.Value; } if ((Original_Статус_заказа == null)) { this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[13].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[13].Value = ((string)(Original_Статус_заказа)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string Артикул_заказа, string Дата_заказа, global::System.Nullable<global::System.DateTime> Дата_доставки, global::System.Nullable<int> id_пункта_выдачи, int id_пользователя, global::System.Nullable<short> Код_для_получения, string Статус_заказа) { if ((Артикул_заказа == null)) { this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Артикул_заказа)); } if ((Дата_заказа == null)) { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Дата_заказа)); } if ((Дата_доставки.HasValue == true)) { this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(Дата_доставки.Value)); } else { this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; } if ((id_пункта_выдачи.HasValue == true)) { this.Adapter.InsertCommand.Parameters[3].Value = ((int)(id_пункта_выдачи.Value)); } else { this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; } this.Adapter.InsertCommand.Parameters[4].Value = ((int)(id_пользователя)); if ((Код_для_получения.HasValue == true)) { this.Adapter.InsertCommand.Parameters[5].Value = ((short)(Код_для_получения.Value)); } else { this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; } if ((Статус_заказа == null)) { this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Статус_заказа)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string Артикул_заказа, string Дата_заказа, global::System.Nullable<global::System.DateTime> Дата_доставки, global::System.Nullable<int> id_пункта_выдачи, int id_пользователя, global::System.Nullable<short> Код_для_получения, string Статус_заказа, int Original_Номер_заказа, string Original_Артикул_заказа, string Original_Дата_заказа, global::System.Nullable<global::System.DateTime> Original_Дата_доставки, global::System.Nullable<int> Original_id_пункта_выдачи, int Original_id_пользователя, global::System.Nullable<short> Original_Код_для_получения, string Original_Статус_заказа, int Номер_заказа) { if ((Артикул_заказа == null)) { this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Артикул_заказа)); } if ((Дата_заказа == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Дата_заказа)); } if ((Дата_доставки.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(Дата_доставки.Value)); } else { this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; } if ((id_пункта_выдачи.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(id_пункта_выдачи.Value)); } else { this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(id_пользователя)); if ((Код_для_получения.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[5].Value = ((short)(Код_для_получения.Value)); } else { this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } if ((Статус_заказа == null)) { this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Статус_заказа)); } this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Номер_заказа)); if ((Original_Артикул_заказа == null)) { this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Артикул_заказа)); } if ((Original_Дата_заказа == null)) { this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Дата_заказа)); } if ((Original_Дата_доставки.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[13].Value = ((System.DateTime)(Original_Дата_доставки.Value)); } else { this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; } if ((Original_id_пункта_выдачи.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_id_пункта_выдачи.Value)); } else { this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(Original_id_пользователя)); if ((Original_Код_для_получения.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[18].Value = ((short)(Original_Код_для_получения.Value)); } else { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; } if ((Original_Статус_заказа == null)) { this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_Статус_заказа)); } this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(Номер_заказа)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string Артикул_заказа, string Дата_заказа, global::System.Nullable<global::System.DateTime> Дата_доставки, global::System.Nullable<int> id_пункта_выдачи, int id_пользователя, global::System.Nullable<short> Код_для_получения, string Статус_заказа, int Original_Номер_заказа, string Original_Артикул_заказа, string Original_Дата_заказа, global::System.Nullable<global::System.DateTime> Original_Дата_доставки, global::System.Nullable<int> Original_id_пункта_выдачи, int Original_id_пользователя, global::System.Nullable<short> Original_Код_для_получения, string Original_Статус_заказа) { return this.Update(Артикул_заказа, Дата_заказа, Дата_доставки, id_пункта_выдачи, id_пользователя, Код_для_получения, Статус_заказа, Original_Номер_заказа, Original_Артикул_заказа, Original_Дата_заказа, Original_Дата_доставки, Original_id_пункта_выдачи, Original_id_пользователя, Original_Код_для_получения, Original_Статус_заказа, Original_Номер_заказа); } } /// <summary> ///Represents the connection and commands used to retrieve and save data. ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DataObjectAttribute(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class pickup_pointTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public pickup_pointTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::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)) { ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::System.Data.SqlClient.SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { this.CommandCollection[i].Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.DeleteCommand != null))) { this.Adapter.DeleteCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.InsertCommand != null))) { this.Adapter.InsertCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.UpdateCommand != null))) { this.Adapter.UpdateCommand.Transaction = this._transaction; } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "pickup_point"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("index", "index"); tableMapping.ColumnMappings.Add("city", "city"); tableMapping.ColumnMappings.Add("street", "street"); tableMapping.ColumnMappings.Add("house", "house"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[pickup_point] WHERE (([id] = @Original_id) AND ([index] = @Ori" + "ginal_index) AND ([city] = @Original_city) AND ([street] = @Original_street) AND" + " ((@IsNull_house = 1 AND [house] IS NULL) OR ([house] = @Original_house)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_index", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "index", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_city", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "city", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_street", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "street", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_house", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "house", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_house", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "house", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[pickup_point] ([index], [city], [street], [house]) VALUES (@in" + "dex, @city, @street, @house);\r\nSELECT id, [index], city, street, house FROM pick" + "up_point WHERE (id = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@index", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "index", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@city", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "city", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@street", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "street", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@house", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "house", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[pickup_point] SET [index] = @index, [city] = @city, [street] = @street, [house] = @house WHERE (([id] = @Original_id) AND ([index] = @Original_index) AND ([city] = @Original_city) AND ([street] = @Original_street) AND ((@IsNull_house = 1 AND [house] IS NULL) OR ([house] = @Original_house))); SELECT id, [index], city, street, house FROM pickup_point WHERE (id = @id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@index", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "index", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@city", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "city", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@street", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "street", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@house", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "house", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_index", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "index", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_city", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "city", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_street", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "street", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_house", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "house", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_house", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "house", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Demo.Properties.Settings.Default.MarketConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT id, [index], city, street, house FROM dbo.pickup_point"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(MarketDataSet.pickup_pointDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual MarketDataSet.pickup_pointDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; MarketDataSet.pickup_pointDataTable dataTable = new MarketDataSet.pickup_pointDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet.pickup_pointDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet dataSet) { return this.Adapter.Update(dataSet, "pickup_point"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow dataRow) { return this.Adapter.Update(new global::System.Data.DataRow[] { dataRow}); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_id, int Original_index, string Original_city, string Original_street, global::System.Nullable<byte> Original_house) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_index)); if ((Original_city == null)) { throw new global::System.ArgumentNullException("Original_city"); } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_city)); } if ((Original_street == null)) { throw new global::System.ArgumentNullException("Original_street"); } else { this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_street)); } if ((Original_house.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[5].Value = ((byte)(Original_house.Value)); } else { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int index, string city, string street, global::System.Nullable<byte> house) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(index)); if ((city == null)) { throw new global::System.ArgumentNullException("city"); } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(city)); } if ((street == null)) { throw new global::System.ArgumentNullException("street"); } else { this.Adapter.InsertCommand.Parameters[2].Value = ((string)(street)); } if ((house.HasValue == true)) { this.Adapter.InsertCommand.Parameters[3].Value = ((byte)(house.Value)); } else { this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int index, string city, string street, global::System.Nullable<byte> house, int Original_id, int Original_index, string Original_city, string Original_street, global::System.Nullable<byte> Original_house, int id) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(index)); if ((city == null)) { throw new global::System.ArgumentNullException("city"); } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(city)); } if ((street == null)) { throw new global::System.ArgumentNullException("street"); } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(street)); } if ((house.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((byte)(house.Value)); } else { this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_id)); this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_index)); if ((Original_city == null)) { throw new global::System.ArgumentNullException("Original_city"); } else { this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_city)); } if ((Original_street == null)) { throw new global::System.ArgumentNullException("Original_street"); } else { this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_street)); } if ((Original_house.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[9].Value = ((byte)(Original_house.Value)); } else { this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(id)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int index, string city, string street, global::System.Nullable<byte> house, int Original_id, int Original_index, string Original_city, string Original_street, global::System.Nullable<byte> Original_house) { return this.Update(index, city, street, house, Original_id, Original_index, Original_city, Original_street, Original_house, Original_id); } } /// <summary> ///Represents the connection and commands used to retrieve and save data. ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DataObjectAttribute(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class producerTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public producerTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::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)) { ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::System.Data.SqlClient.SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { this.CommandCollection[i].Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.DeleteCommand != null))) { this.Adapter.DeleteCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.InsertCommand != null))) { this.Adapter.InsertCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.UpdateCommand != null))) { this.Adapter.UpdateCommand.Transaction = this._transaction; } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "producer"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("title", "title"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[producer] WHERE (([id] = @Original_id) AND ((@IsNull_title = 1" + " AND [title] IS NULL) OR ([title] = @Original_title)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_title", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[producer] ([id], [title]) VALUES (@id, @title);\r\nSELECT id, ti" + "tle FROM producer WHERE (id = @id)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[producer] SET [id] = @id, [title] = @title WHERE (([id] = @Original" + "_id) AND ((@IsNull_title = 1 AND [title] IS NULL) OR ([title] = @Original_title)" + "));\r\nSELECT id, title FROM producer WHERE (id = @id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_title", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Demo.Properties.Settings.Default.MarketConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT id, title FROM dbo.producer"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(MarketDataSet.producerDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual MarketDataSet.producerDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; MarketDataSet.producerDataTable dataTable = new MarketDataSet.producerDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet.producerDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet dataSet) { return this.Adapter.Update(dataSet, "producer"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow dataRow) { return this.Adapter.Update(new global::System.Data.DataRow[] { dataRow}); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_id, string Original_title) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id)); if ((Original_title == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int id, string title) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int id, string title, int Original_id, string Original_title) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(title)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_id)); if ((Original_title == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string title, int Original_id, string Original_title) { return this.Update(Original_id, title, Original_id, Original_title); } } /// <summary> ///Represents the connection and commands used to retrieve and save data. ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DataObjectAttribute(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class productTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public productTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::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)) { ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::System.Data.SqlClient.SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { this.CommandCollection[i].Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.DeleteCommand != null))) { this.Adapter.DeleteCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.InsertCommand != null))) { this.Adapter.InsertCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.UpdateCommand != null))) { this.Adapter.UpdateCommand.Transaction = this._transaction; } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "product"; tableMapping.ColumnMappings.Add("Артикул", "Артикул"); tableMapping.ColumnMappings.Add("Наименование_товара", "Наименование_товара"); tableMapping.ColumnMappings.Add("Единица_измерения", "Единица_измерения"); tableMapping.ColumnMappings.Add("Цена", "Цена"); tableMapping.ColumnMappings.Add("Поставщик", "Поставщик"); tableMapping.ColumnMappings.Add("Производитель", "Производитель"); tableMapping.ColumnMappings.Add("Категория_товара", "Категория_товара"); tableMapping.ColumnMappings.Add("Действующая_скидка", "Действующая_скидка"); tableMapping.ColumnMappings.Add("Кол_во_на_складе", "Кол_во_на_складе"); tableMapping.ColumnMappings.Add("Описание_товара", "Описание_товара"); tableMapping.ColumnMappings.Add("Фото", "Фото"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[product] WHERE (([Артикул] = @Original_Артикул) AND ((@IsNull_Наименование_товара = 1 AND [Наименование_товара] IS NULL) OR ([Наименование_товара] = @Original_Наименование_товара)) AND ((@IsNull_Единица_измерения = 1 AND [Единица_измерения] IS NULL) OR ([Единица_измерения] = @Original_Единица_измерения)) AND ((@IsNull_Цена = 1 AND [Цена] IS NULL) OR ([Цена] = @Original_Цена)) AND ((@IsNull_Поставщик = 1 AND [Поставщик] IS NULL) OR ([Поставщик] = @Original_Поставщик)) AND ((@IsNull_Производитель = 1 AND [Производитель] IS NULL) OR ([Производитель] = @Original_Производитель)) AND ((@IsNull_Категория_товара = 1 AND [Категория_товара] IS NULL) OR ([Категория_товара] = @Original_Категория_товара)) AND ((@IsNull_Действующая_скидка = 1 AND [Действующая_скидка] IS NULL) OR ([Действующая_скидка] = @Original_Действующая_скидка)) AND ((@IsNull_Кол_во_на_складе = 1 AND [Кол_во_на_складе] IS NULL) OR ([Кол_во_на_складе] = @Original_Кол_во_на_складе)) AND ((@IsNull_Описание_товара = 1 AND [Описание_товара] IS NULL) OR ([Описание_товара] = @Original_Описание_товара)) AND ((@IsNull_Фото = 1 AND [Фото] IS NULL) OR ([Фото] = @Original_Фото)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Артикул", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Наименование_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Наименование_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Единица_измерения", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Единица_измерения", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Единица_измерения", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Единица_измерения", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Цена", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Цена", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 0, "Цена", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Поставщик", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Поставщик", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Поставщик", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Поставщик", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Производитель", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Производитель", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Производитель", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Производитель", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Категория_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Категория_товара", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Категория_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Категория_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Действующая_скидка", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Действующая_скидка", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Действующая_скидка", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Действующая_скидка", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Кол_во_на_складе", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Кол_во_на_складе", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Кол_во_на_складе", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Кол_во_на_складе", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Описание_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Описание_товара", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Описание_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Описание_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Фото", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фото", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Фото", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фото", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[product] ([Артикул], [Наименование_товара], [Единица_измерения], [Цена], [Поставщик], [Производитель], [Категория_товара], [Действующая_скидка], [Кол_во_на_складе], [Описание_товара], [Фото]) VALUES (@Артикул, @Наименование_товара, @Единица_измерения, @Цена, @Поставщик, @Производитель, @Категория_товара, @Действующая_скидка, @Кол_во_на_складе, @Описание_товара, @Фото); SELECT Артикул, Наименование_товара, Единица_измерения, Цена, Поставщик, Производитель, Категория_товара, Действующая_скидка, Кол_во_на_складе, Описание_товара, Фото FROM product WHERE (Артикул = @Артикул)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Артикул", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Наименование_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Единица_измерения", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Единица_измерения", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Цена", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 0, "Цена", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Поставщик", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Поставщик", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Производитель", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Производитель", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Категория_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Категория_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Действующая_скидка", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Действующая_скидка", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Кол_во_на_складе", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Кол_во_на_складе", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Описание_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Описание_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Фото", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фото", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[product] SET [Артикул] = @Артикул, [Наименование_товара] = @Наимено" + "вание_товара, [Единица_измерения] = @Единица_измерения, [Цена] = @Цена, [Поставщ" + "ик] = @Поставщик, [Производитель] = @Производитель, [Категория_товара] = @Катего" + "рия_товара, [Действующая_скидка] = @Действующая_скидка, [Кол_во_на_складе] = @Ко" + "л_во_на_складе, [Описание_товара] = @Описание_товара, [Фото] = @Фото WHERE (([Ар" + "тикул] = @Original_Артикул) AND ((@IsNull_Наименование_товара = 1 AND [Наименова" + "ние_товара] IS NULL) OR ([Наименование_товара] = @Original_Наименование_товара))" + " AND ((@IsNull_Единица_измерения = 1 AND [Единица_измерения] IS NULL) OR ([Едини" + "ца_измерения] = @Original_Единица_измерения)) AND ((@IsNull_Цена = 1 AND [Цена] " + "IS NULL) OR ([Цена] = @Original_Цена)) AND ((@IsNull_Поставщик = 1 AND [Поставщи" + "к] IS NULL) OR ([Поставщик] = @Original_Поставщик)) AND ((@IsNull_Производитель " + "= 1 AND [Производитель] IS NULL) OR ([Производитель] = @Original_Производитель))" + " AND ((@IsNull_Категория_товара = 1 AND [Категория_товара] IS NULL) OR ([Категор" + "ия_товара] = @Original_Категория_товара)) AND ((@IsNull_Действующая_скидка = 1 A" + "ND [Действующая_скидка] IS NULL) OR ([Действующая_скидка] = @Original_Действующа" + "я_скидка)) AND ((@IsNull_Кол_во_на_складе = 1 AND [Кол_во_на_складе] IS NULL) OR" + " ([Кол_во_на_складе] = @Original_Кол_во_на_складе)) AND ((@IsNull_Описание_товар" + "а = 1 AND [Описание_товара] IS NULL) OR ([Описание_товара] = @Original_Описание_" + "товара)) AND ((@IsNull_Фото = 1 AND [Фото] IS NULL) OR ([Фото] = @Original_Фото)" + "));\r\nSELECT Артикул, Наименование_товара, Единица_измерения, Цена, Поставщик, Пр" + "оизводитель, Категория_товара, Действующая_скидка, Кол_во_на_складе, Описание_то" + "вара, Фото FROM product WHERE (Артикул = @Артикул)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Артикул", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Наименование_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Единица_измерения", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Единица_измерения", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Цена", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 0, "Цена", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Поставщик", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Поставщик", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Производитель", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Производитель", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Категория_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Категория_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Действующая_скидка", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Действующая_скидка", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Кол_во_на_складе", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Кол_во_на_складе", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Описание_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Описание_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Фото", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фото", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Артикул", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Артикул", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Наименование_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Наименование_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Единица_измерения", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Единица_измерения", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Единица_измерения", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Единица_измерения", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Цена", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Цена", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 0, "Цена", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Поставщик", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Поставщик", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Поставщик", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Поставщик", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Производитель", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Производитель", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Производитель", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Производитель", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Категория_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Категория_товара", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Категория_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Категория_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Действующая_скидка", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Действующая_скидка", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Действующая_скидка", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Действующая_скидка", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Кол_во_на_складе", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Кол_во_на_складе", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Кол_во_на_складе", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Кол_во_на_складе", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Описание_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Описание_товара", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Описание_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Описание_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Фото", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фото", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Фото", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фото", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Demo.Properties.Settings.Default.MarketConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT Артикул, Наименование_товара, Единица_измерения, Цена, Поставщик, Производ" + "итель, Категория_товара, Действующая_скидка, Кол_во_на_складе, Описание_товара, " + "Фото FROM dbo.product"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(MarketDataSet.productDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual MarketDataSet.productDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; MarketDataSet.productDataTable dataTable = new MarketDataSet.productDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet.productDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet dataSet) { return this.Adapter.Update(dataSet, "product"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow dataRow) { return this.Adapter.Update(new global::System.Data.DataRow[] { dataRow}); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(string Original_Артикул, string Original_Наименование_товара, global::System.Nullable<int> Original_Единица_измерения, global::System.Nullable<decimal> Original_Цена, global::System.Nullable<int> Original_Поставщик, global::System.Nullable<int> Original_Производитель, global::System.Nullable<int> Original_Категория_товара, global::System.Nullable<byte> Original_Действующая_скидка, global::System.Nullable<byte> Original_Кол_во_на_складе, string Original_Описание_товара, string Original_Фото) { if ((Original_Артикул == null)) { throw new global::System.ArgumentNullException("Original_Артикул"); } else { this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Артикул)); } if ((Original_Наименование_товара == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Наименование_товара)); } if ((Original_Единица_измерения.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Единица_измерения.Value)); } else { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; } if ((Original_Цена.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[6].Value = ((decimal)(Original_Цена.Value)); } else { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; } if ((Original_Поставщик.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_Поставщик.Value)); } else { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; } if ((Original_Производитель.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_Производитель.Value)); } else { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; } if ((Original_Категория_товара.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_Категория_товара.Value)); } else { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; } if ((Original_Действующая_скидка.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[14].Value = ((byte)(Original_Действующая_скидка.Value)); } else { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; } if ((Original_Кол_во_на_складе.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[16].Value = ((byte)(Original_Кол_во_на_складе.Value)); } else { this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value; } if ((Original_Описание_товара == null)) { this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[18].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[18].Value = ((string)(Original_Описание_товара)); } if ((Original_Фото == null)) { this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[20].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[20].Value = ((string)(Original_Фото)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(string Артикул, string Наименование_товара, global::System.Nullable<int> Единица_измерения, global::System.Nullable<decimal> Цена, global::System.Nullable<int> Поставщик, global::System.Nullable<int> Производитель, global::System.Nullable<int> Категория_товара, global::System.Nullable<byte> Действующая_скидка, global::System.Nullable<byte> Кол_во_на_складе, string Описание_товара, string Фото) { if ((Артикул == null)) { throw new global::System.ArgumentNullException("Артикул"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Артикул)); } if ((Наименование_товара == null)) { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Наименование_товара)); } if ((Единица_измерения.HasValue == true)) { this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Единица_измерения.Value)); } else { this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; } if ((Цена.HasValue == true)) { this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(Цена.Value)); } else { this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; } if ((Поставщик.HasValue == true)) { this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Поставщик.Value)); } else { this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; } if ((Производитель.HasValue == true)) { this.Adapter.InsertCommand.Parameters[5].Value = ((int)(Производитель.Value)); } else { this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; } if ((Категория_товара.HasValue == true)) { this.Adapter.InsertCommand.Parameters[6].Value = ((int)(Категория_товара.Value)); } else { this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; } if ((Действующая_скидка.HasValue == true)) { this.Adapter.InsertCommand.Parameters[7].Value = ((byte)(Действующая_скидка.Value)); } else { this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; } if ((Кол_во_на_складе.HasValue == true)) { this.Adapter.InsertCommand.Parameters[8].Value = ((byte)(Кол_во_на_складе.Value)); } else { this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; } if ((Описание_товара == null)) { this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[9].Value = ((string)(Описание_товара)); } if ((Фото == null)) { this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[10].Value = ((string)(Фото)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string Артикул, string Наименование_товара, global::System.Nullable<int> Единица_измерения, global::System.Nullable<decimal> Цена, global::System.Nullable<int> Поставщик, global::System.Nullable<int> Производитель, global::System.Nullable<int> Категория_товара, global::System.Nullable<byte> Действующая_скидка, global::System.Nullable<byte> Кол_во_на_складе, string Описание_товара, string Фото, string Original_Артикул, string Original_Наименование_товара, global::System.Nullable<int> Original_Единица_измерения, global::System.Nullable<decimal> Original_Цена, global::System.Nullable<int> Original_Поставщик, global::System.Nullable<int> Original_Производитель, global::System.Nullable<int> Original_Категория_товара, global::System.Nullable<byte> Original_Действующая_скидка, global::System.Nullable<byte> Original_Кол_во_на_складе, string Original_Описание_товара, string Original_Фото) { if ((Артикул == null)) { throw new global::System.ArgumentNullException("Артикул"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Артикул)); } if ((Наименование_товара == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Наименование_товара)); } if ((Единица_измерения.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Единица_измерения.Value)); } else { this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; } if ((Цена.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(Цена.Value)); } else { this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; } if ((Поставщик.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Поставщик.Value)); } else { this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } if ((Производитель.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Производитель.Value)); } else { this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } if ((Категория_товара.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Категория_товара.Value)); } else { this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; } if ((Действующая_скидка.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[7].Value = ((byte)(Действующая_скидка.Value)); } else { this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; } if ((Кол_во_на_складе.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[8].Value = ((byte)(Кол_во_на_складе.Value)); } else { this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; } if ((Описание_товара == null)) { this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Описание_товара)); } if ((Фото == null)) { this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Фото)); } if ((Original_Артикул == null)) { throw new global::System.ArgumentNullException("Original_Артикул"); } else { this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Артикул)); } if ((Original_Наименование_товара == null)) { this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_Наименование_товара)); } if ((Original_Единица_измерения.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_Единица_измерения.Value)); } else { this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; } if ((Original_Цена.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[17].Value = ((decimal)(Original_Цена.Value)); } else { this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; } if ((Original_Поставщик.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Original_Поставщик.Value)); } else { this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; } if ((Original_Производитель.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(Original_Производитель.Value)); } else { this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; } if ((Original_Категория_товара.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[23].Value = ((int)(Original_Категория_товара.Value)); } else { this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value; } if ((Original_Действующая_скидка.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[25].Value = ((byte)(Original_Действующая_скидка.Value)); } else { this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[25].Value = global::System.DBNull.Value; } if ((Original_Кол_во_на_складе.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[27].Value = ((byte)(Original_Кол_во_на_складе.Value)); } else { this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[27].Value = global::System.DBNull.Value; } if ((Original_Описание_товара == null)) { this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[29].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[29].Value = ((string)(Original_Описание_товара)); } if ((Original_Фото == null)) { this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[31].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[31].Value = ((string)(Original_Фото)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update( string Наименование_товара, global::System.Nullable<int> Единица_измерения, global::System.Nullable<decimal> Цена, global::System.Nullable<int> Поставщик, global::System.Nullable<int> Производитель, global::System.Nullable<int> Категория_товара, global::System.Nullable<byte> Действующая_скидка, global::System.Nullable<byte> Кол_во_на_складе, string Описание_товара, string Фото, string Original_Артикул, string Original_Наименование_товара, global::System.Nullable<int> Original_Единица_измерения, global::System.Nullable<decimal> Original_Цена, global::System.Nullable<int> Original_Поставщик, global::System.Nullable<int> Original_Производитель, global::System.Nullable<int> Original_Категория_товара, global::System.Nullable<byte> Original_Действующая_скидка, global::System.Nullable<byte> Original_Кол_во_на_складе, string Original_Описание_товара, string Original_Фото) { return this.Update(Original_Артикул, Наименование_товара, Единица_измерения, Цена, Поставщик, Производитель, Категория_товара, Действующая_скидка, Кол_во_на_складе, Описание_товара, Фото, Original_Артикул, Original_Наименование_товара, Original_Единица_измерения, Original_Цена, Original_Поставщик, Original_Производитель, Original_Категория_товара, Original_Действующая_скидка, Original_Кол_во_на_складе, Original_Описание_товара, Original_Фото); } } /// <summary> ///Represents the connection and commands used to retrieve and save data. ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DataObjectAttribute(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class roleTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public roleTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::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)) { ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::System.Data.SqlClient.SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { this.CommandCollection[i].Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.DeleteCommand != null))) { this.Adapter.DeleteCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.InsertCommand != null))) { this.Adapter.InsertCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.UpdateCommand != null))) { this.Adapter.UpdateCommand.Transaction = this._transaction; } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "role"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("title", "title"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[role] WHERE (([id] = @Original_id) AND ([title] = @Original_ti" + "tle))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[role] ([id], [title]) VALUES (@id, @title);\r\nSELECT id, title " + "FROM role WHERE (id = @id)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[role] SET [id] = @id, [title] = @title WHERE (([id] = @Original_id)" + " AND ([title] = @Original_title));\r\nSELECT id, title FROM role WHERE (id = @id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Demo.Properties.Settings.Default.MarketConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT id, title FROM dbo.role"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(MarketDataSet.roleDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual MarketDataSet.roleDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; MarketDataSet.roleDataTable dataTable = new MarketDataSet.roleDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet.roleDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet dataSet) { return this.Adapter.Update(dataSet, "role"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow dataRow) { return this.Adapter.Update(new global::System.Data.DataRow[] { dataRow}); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_id, string Original_title) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id)); if ((Original_title == null)) { throw new global::System.ArgumentNullException("Original_title"); } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int id, string title) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { throw new global::System.ArgumentNullException("title"); } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int id, string title, int Original_id, string Original_title) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { throw new global::System.ArgumentNullException("title"); } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(title)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_id)); if ((Original_title == null)) { throw new global::System.ArgumentNullException("Original_title"); } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string title, int Original_id, string Original_title) { return this.Update(Original_id, title, Original_id, Original_title); } } /// <summary> ///Represents the connection and commands used to retrieve and save data. ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DataObjectAttribute(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class supplierTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public supplierTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::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)) { ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::System.Data.SqlClient.SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { this.CommandCollection[i].Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.DeleteCommand != null))) { this.Adapter.DeleteCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.InsertCommand != null))) { this.Adapter.InsertCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.UpdateCommand != null))) { this.Adapter.UpdateCommand.Transaction = this._transaction; } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "supplier"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("title", "title"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[supplier] WHERE (([id] = @Original_id) AND ((@IsNull_title = 1" + " AND [title] IS NULL) OR ([title] = @Original_title)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_title", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[supplier] ([id], [title]) VALUES (@id, @title);\r\nSELECT id, ti" + "tle FROM supplier WHERE (id = @id)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[supplier] SET [id] = @id, [title] = @title WHERE (([id] = @Original" + "_id) AND ((@IsNull_title = 1 AND [title] IS NULL) OR ([title] = @Original_title)" + "));\r\nSELECT id, title FROM supplier WHERE (id = @id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_title", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Demo.Properties.Settings.Default.MarketConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT id, title FROM dbo.supplier"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(MarketDataSet.supplierDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual MarketDataSet.supplierDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; MarketDataSet.supplierDataTable dataTable = new MarketDataSet.supplierDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet.supplierDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet dataSet) { return this.Adapter.Update(dataSet, "supplier"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow dataRow) { return this.Adapter.Update(new global::System.Data.DataRow[] { dataRow}); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_id, string Original_title) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id)); if ((Original_title == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int id, string title) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int id, string title, int Original_id, string Original_title) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(title)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_id)); if ((Original_title == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string title, int Original_id, string Original_title) { return this.Update(Original_id, title, Original_id, Original_title); } } /// <summary> ///Represents the connection and commands used to retrieve and save data. ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DataObjectAttribute(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class unitTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public unitTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::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)) { ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::System.Data.SqlClient.SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { this.CommandCollection[i].Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.DeleteCommand != null))) { this.Adapter.DeleteCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.InsertCommand != null))) { this.Adapter.InsertCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.UpdateCommand != null))) { this.Adapter.UpdateCommand.Transaction = this._transaction; } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "unit"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("title", "title"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[unit] WHERE (([id] = @Original_id) AND ((@IsNull_title = 1 AND" + " [title] IS NULL) OR ([title] = @Original_title)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_title", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[unit] ([id], [title]) VALUES (@id, @title);\r\nSELECT id, title " + "FROM unit WHERE (id = @id)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[unit] SET [id] = @id, [title] = @title WHERE (([id] = @Original_id)" + " AND ((@IsNull_title = 1 AND [title] IS NULL) OR ([title] = @Original_title)));\r" + "\nSELECT id, title FROM unit WHERE (id = @id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_title", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_title", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "title", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Demo.Properties.Settings.Default.MarketConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT id, title FROM dbo.unit"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(MarketDataSet.unitDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual MarketDataSet.unitDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; MarketDataSet.unitDataTable dataTable = new MarketDataSet.unitDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet.unitDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet dataSet) { return this.Adapter.Update(dataSet, "unit"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow dataRow) { return this.Adapter.Update(new global::System.Data.DataRow[] { dataRow}); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_id, string Original_title) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id)); if ((Original_title == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int id, string title) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int id, string title, int Original_id, string Original_title) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(id)); if ((title == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(title)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_id)); if ((Original_title == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_title)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(string title, int Original_id, string Original_title) { return this.Update(Original_id, title, Original_id, Original_title); } } /// <summary> ///Represents the connection and commands used to retrieve and save data. ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DataObjectAttribute(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public partial class userTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; private global::System.Data.SqlClient.SqlConnection _connection; private global::System.Data.SqlClient.SqlTransaction _transaction; private global::System.Data.SqlClient.SqlCommand[] _commandCollection; private bool _clearBeforeFill; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public userTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { get { if ((this._adapter == null)) { this.InitAdapter(); } return this._adapter; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::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)) { ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; } } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal global::System.Data.SqlClient.SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { this.CommandCollection[i].Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.DeleteCommand != null))) { this.Adapter.DeleteCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.InsertCommand != null))) { this.Adapter.InsertCommand.Transaction = this._transaction; } if (((this.Adapter != null) && (this.Adapter.UpdateCommand != null))) { this.Adapter.UpdateCommand.Transaction = this._transaction; } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { get { if ((this._commandCollection == null)) { this.InitCommandCollection(); } return this._commandCollection; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool ClearBeforeFill { get { return this._clearBeforeFill; } set { this._clearBeforeFill = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "user"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("id_роли", "id_роли"); tableMapping.ColumnMappings.Add("ФИО", "ФИО"); tableMapping.ColumnMappings.Add("Логин", "Логин"); tableMapping.ColumnMappings.Add("Пароль", "Пароль"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[user] WHERE (([id] = @Original_id) AND ([id_роли] = @Original_id_роли) AND ((@IsNull_ФИО = 1 AND [ФИО] IS NULL) OR ([ФИО] = @Original_ФИО)) AND ((@IsNull_Логин = 1 AND [Логин] IS NULL) OR ([Логин] = @Original_Логин)) AND ((@IsNull_Пароль = 1 AND [Пароль] IS NULL) OR ([Пароль] = @Original_Пароль)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_роли", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_роли", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ФИО", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ФИО", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ФИО", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ФИО", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Логин", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Логин", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Пароль", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Пароль", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[user] ([id_роли], [ФИО], [Логин], [Пароль]) VALUES (@id_роли, " + "@ФИО, @Логин, @Пароль);\r\nSELECT id, id_роли, ФИО, Логин, Пароль FROM [user] WHER" + "E (id = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_роли", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_роли", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ФИО", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ФИО", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Логин", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Пароль", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[user] SET [id_роли] = @id_роли, [ФИО] = @ФИО, [Логин] = @Логин, [Пароль] = @Пароль WHERE (([id] = @Original_id) AND ([id_роли] = @Original_id_роли) AND ((@IsNull_ФИО = 1 AND [ФИО] IS NULL) OR ([ФИО] = @Original_ФИО)) AND ((@IsNull_Логин = 1 AND [Логин] IS NULL) OR ([Логин] = @Original_Логин)) AND ((@IsNull_Пароль = 1 AND [Пароль] IS NULL) OR ([Пароль] = @Original_Пароль))); SELECT id, id_роли, ФИО, Логин, Пароль FROM [user] WHERE (id = @id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_роли", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_роли", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ФИО", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ФИО", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Логин", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Пароль", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_роли", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_роли", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ФИО", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ФИО", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ФИО", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ФИО", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Логин", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Логин", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Пароль", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Пароль", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::Demo.Properties.Settings.Default.MarketConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT id, id_роли, ФИО, Логин, Пароль FROM dbo.[user]"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] public virtual int Fill(MarketDataSet.userDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual MarketDataSet.userDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; MarketDataSet.userDataTable dataTable = new MarketDataSet.userDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet.userDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MarketDataSet dataSet) { return this.Adapter.Update(dataSet, "user"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow dataRow) { return this.Adapter.Update(new global::System.Data.DataRow[] { dataRow}); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(global::System.Data.DataRow[] dataRows) { return this.Adapter.Update(dataRows); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] public virtual int Delete(int Original_id, int Original_id_роли, string Original_ФИО, string Original_Логин, string Original_Пароль) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_id_роли)); if ((Original_ФИО == null)) { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_ФИО)); } if ((Original_Логин == null)) { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_Логин)); } if ((Original_Пароль == null)) { this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_Пароль)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.DeleteCommand.Connection.Open(); } try { int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.DeleteCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] public virtual int Insert(int id_роли, string ФИО, string Логин, string Пароль) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(id_роли)); if ((ФИО == null)) { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(ФИО)); } if ((Логин == null)) { this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Логин)); } if ((Пароль == null)) { this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Пароль)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.InsertCommand.Connection.Open(); } try { int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.InsertCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int id_роли, string ФИО, string Логин, string Пароль, int Original_id, int Original_id_роли, string Original_ФИО, string Original_Логин, string Original_Пароль, int id) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(id_роли)); if ((ФИО == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(ФИО)); } if ((Логин == null)) { this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Логин)); } if ((Пароль == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Пароль)); } this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_id)); this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_id_роли)); if ((Original_ФИО == null)) { this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_ФИО)); } if ((Original_Логин == null)) { this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Логин)); } if ((Original_Пароль == null)) { this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Пароль)); } this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(id)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { this.Adapter.UpdateCommand.Connection.Open(); } try { int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { this.Adapter.UpdateCommand.Connection.Close(); } } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] public virtual int Update(int id_роли, string ФИО, string Логин, string Пароль, int Original_id, int Original_id_роли, string Original_ФИО, string Original_Логин, string Original_Пароль) { return this.Update(id_роли, ФИО, Логин, Пароль, Original_id, Original_id_роли, Original_ФИО, Original_Логин, Original_Пароль, Original_id); } } /// <summary> ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios ///</summary> [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" + "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")] public partial class TableAdapterManager : global::System.ComponentModel.Component { private UpdateOrderOption _updateOrder; private categoryTableAdapter _categoryTableAdapter; private orderTableAdapter _orderTableAdapter; private pickup_pointTableAdapter _pickup_pointTableAdapter; private producerTableAdapter _producerTableAdapter; private productTableAdapter _productTableAdapter; private roleTableAdapter _roleTableAdapter; private supplierTableAdapter _supplierTableAdapter; private unitTableAdapter _unitTableAdapter; private userTableAdapter _userTableAdapter; private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public UpdateOrderOption UpdateOrder { get { return this._updateOrder; } set { this._updateOrder = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] public categoryTableAdapter categoryTableAdapter { get { return this._categoryTableAdapter; } set { this._categoryTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] public orderTableAdapter orderTableAdapter { get { return this._orderTableAdapter; } set { this._orderTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] public pickup_pointTableAdapter pickup_pointTableAdapter { get { return this._pickup_pointTableAdapter; } set { this._pickup_pointTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] public producerTableAdapter producerTableAdapter { get { return this._producerTableAdapter; } set { this._producerTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] public productTableAdapter productTableAdapter { get { return this._productTableAdapter; } set { this._productTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] public roleTableAdapter roleTableAdapter { get { return this._roleTableAdapter; } set { this._roleTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] public supplierTableAdapter supplierTableAdapter { get { return this._supplierTableAdapter; } set { this._supplierTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] public unitTableAdapter unitTableAdapter { get { return this._unitTableAdapter; } set { this._unitTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + "a", "System.Drawing.Design.UITypeEditor")] public userTableAdapter userTableAdapter { get { return this._userTableAdapter; } set { this._userTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public bool BackupDataSetBeforeUpdate { get { return this._backupDataSetBeforeUpdate; } set { this._backupDataSetBeforeUpdate = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public global::System.Data.IDbConnection Connection { get { if ((this._connection != null)) { return this._connection; } if (((this._categoryTableAdapter != null) && (this._categoryTableAdapter.Connection != null))) { return this._categoryTableAdapter.Connection; } if (((this._orderTableAdapter != null) && (this._orderTableAdapter.Connection != null))) { return this._orderTableAdapter.Connection; } if (((this._pickup_pointTableAdapter != null) && (this._pickup_pointTableAdapter.Connection != null))) { return this._pickup_pointTableAdapter.Connection; } if (((this._producerTableAdapter != null) && (this._producerTableAdapter.Connection != null))) { return this._producerTableAdapter.Connection; } if (((this._productTableAdapter != null) && (this._productTableAdapter.Connection != null))) { return this._productTableAdapter.Connection; } if (((this._roleTableAdapter != null) && (this._roleTableAdapter.Connection != null))) { return this._roleTableAdapter.Connection; } if (((this._supplierTableAdapter != null) && (this._supplierTableAdapter.Connection != null))) { return this._supplierTableAdapter.Connection; } if (((this._unitTableAdapter != null) && (this._unitTableAdapter.Connection != null))) { return this._unitTableAdapter.Connection; } if (((this._userTableAdapter != null) && (this._userTableAdapter.Connection != null))) { return this._userTableAdapter.Connection; } return null; } set { this._connection = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int TableAdapterInstanceCount { get { int count = 0; if ((this._categoryTableAdapter != null)) { count = (count + 1); } if ((this._orderTableAdapter != null)) { count = (count + 1); } if ((this._pickup_pointTableAdapter != null)) { count = (count + 1); } if ((this._producerTableAdapter != null)) { count = (count + 1); } if ((this._productTableAdapter != null)) { count = (count + 1); } if ((this._roleTableAdapter != null)) { count = (count + 1); } if ((this._supplierTableAdapter != null)) { count = (count + 1); } if ((this._unitTableAdapter != null)) { count = (count + 1); } if ((this._userTableAdapter != null)) { count = (count + 1); } return count; } } /// <summary> ///Update rows in top-down order. ///</summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private int UpdateUpdatedRows(MarketDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) { int result = 0; if ((this._roleTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.role.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._roleTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._categoryTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.category.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._categoryTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._pickup_pointTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.pickup_point.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._pickup_pointTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._producerTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.producer.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._producerTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._supplierTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.supplier.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._supplierTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._unitTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.unit.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._unitTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._userTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.user.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._userTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._orderTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.order.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._orderTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._productTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.product.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._productTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } return result; } /// <summary> ///Insert rows in top-down order. ///</summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private int UpdateInsertedRows(MarketDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) { int result = 0; if ((this._roleTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.role.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._roleTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._categoryTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.category.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._categoryTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._pickup_pointTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.pickup_point.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._pickup_pointTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._producerTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.producer.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._producerTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._supplierTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.supplier.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._supplierTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._unitTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.unit.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._unitTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._userTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.user.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._userTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._orderTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.order.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._orderTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._productTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.product.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._productTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } return result; } /// <summary> ///Delete rows in bottom-up order. ///</summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private int UpdateDeletedRows(MarketDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) { int result = 0; if ((this._productTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.product.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._productTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._orderTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.order.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._orderTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._userTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.user.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._userTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._unitTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.unit.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._unitTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._supplierTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.supplier.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._supplierTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._producerTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.producer.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._producerTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._pickup_pointTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.pickup_point.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._pickup_pointTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._categoryTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.category.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._categoryTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._roleTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.role.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._roleTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } return result; } /// <summary> ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first ///</summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) { if (((updatedRows == null) || (updatedRows.Length < 1))) { return updatedRows; } if (((allAddedRows == null) || (allAddedRows.Count < 1))) { return updatedRows; } global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>(); for (int i = 0; (i < updatedRows.Length); i = (i + 1)) { global::System.Data.DataRow row = updatedRows[i]; if ((allAddedRows.Contains(row) == false)) { realUpdatedRows.Add(row); } } return realUpdatedRows.ToArray(); } /// <summary> ///Update all changes to the dataset. ///</summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public virtual int UpdateAll(MarketDataSet dataSet) { if ((dataSet == null)) { throw new global::System.ArgumentNullException("dataSet"); } if ((dataSet.HasChanges() == false)) { return 0; } if (((this._categoryTableAdapter != null) && (this.MatchTableAdapterConnection(this._categoryTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._orderTableAdapter != null) && (this.MatchTableAdapterConnection(this._orderTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._pickup_pointTableAdapter != null) && (this.MatchTableAdapterConnection(this._pickup_pointTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._producerTableAdapter != null) && (this.MatchTableAdapterConnection(this._producerTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._productTableAdapter != null) && (this.MatchTableAdapterConnection(this._productTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._roleTableAdapter != null) && (this.MatchTableAdapterConnection(this._roleTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._supplierTableAdapter != null) && (this.MatchTableAdapterConnection(this._supplierTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._unitTableAdapter != null) && (this.MatchTableAdapterConnection(this._unitTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._userTableAdapter != null) && (this.MatchTableAdapterConnection(this._userTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } global::System.Data.IDbConnection workConnection = this.Connection; if ((workConnection == null)) { throw new global::System.ApplicationException("TableAdapterManager не содержит сведений о подключении. Укажите для каждого адапт" + "ера таблицы TableAdapterManager допустимый экземпляр адаптера таблицы."); } bool workConnOpened = false; if (((workConnection.State & global::System.Data.ConnectionState.Broken) == global::System.Data.ConnectionState.Broken)) { workConnection.Close(); } if ((workConnection.State == global::System.Data.ConnectionState.Closed)) { workConnection.Open(); workConnOpened = true; } global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction(); if ((workTransaction == null)) { throw new global::System.ApplicationException("Не удается начать транзакцию. Текущее соединение данных не поддерживает транзакци" + "и или текущее состояние не позволяет начать транзакцию."); } global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>(); global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>(); global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>(); global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>(); int result = 0; global::System.Data.DataSet backupDataSet = null; if (this.BackupDataSetBeforeUpdate) { backupDataSet = new global::System.Data.DataSet(); backupDataSet.Merge(dataSet); } try { // ---- Prepare for update ----------- // if ((this._categoryTableAdapter != null)) { revertConnections.Add(this._categoryTableAdapter, this._categoryTableAdapter.Connection); this._categoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._categoryTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._categoryTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._categoryTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._categoryTableAdapter.Adapter); } } if ((this._orderTableAdapter != null)) { revertConnections.Add(this._orderTableAdapter, this._orderTableAdapter.Connection); this._orderTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._orderTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._orderTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._orderTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._orderTableAdapter.Adapter); } } if ((this._pickup_pointTableAdapter != null)) { revertConnections.Add(this._pickup_pointTableAdapter, this._pickup_pointTableAdapter.Connection); this._pickup_pointTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._pickup_pointTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._pickup_pointTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._pickup_pointTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._pickup_pointTableAdapter.Adapter); } } if ((this._producerTableAdapter != null)) { revertConnections.Add(this._producerTableAdapter, this._producerTableAdapter.Connection); this._producerTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._producerTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._producerTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._producerTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._producerTableAdapter.Adapter); } } if ((this._productTableAdapter != null)) { revertConnections.Add(this._productTableAdapter, this._productTableAdapter.Connection); this._productTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._productTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._productTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._productTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._productTableAdapter.Adapter); } } if ((this._roleTableAdapter != null)) { revertConnections.Add(this._roleTableAdapter, this._roleTableAdapter.Connection); this._roleTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._roleTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._roleTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._roleTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._roleTableAdapter.Adapter); } } if ((this._supplierTableAdapter != null)) { revertConnections.Add(this._supplierTableAdapter, this._supplierTableAdapter.Connection); this._supplierTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._supplierTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._supplierTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._supplierTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._supplierTableAdapter.Adapter); } } if ((this._unitTableAdapter != null)) { revertConnections.Add(this._unitTableAdapter, this._unitTableAdapter.Connection); this._unitTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._unitTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._unitTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._unitTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._unitTableAdapter.Adapter); } } if ((this._userTableAdapter != null)) { revertConnections.Add(this._userTableAdapter, this._userTableAdapter.Connection); this._userTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._userTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._userTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._userTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._userTableAdapter.Adapter); } } // //---- Perform updates ----------- // if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) { result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); } else { result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); } result = (result + this.UpdateDeletedRows(dataSet, allChangedRows)); // //---- Commit updates ----------- // workTransaction.Commit(); if ((0 < allAddedRows.Count)) { global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; allAddedRows.CopyTo(rows); for (int i = 0; (i < rows.Length); i = (i + 1)) { global::System.Data.DataRow row = rows[i]; row.AcceptChanges(); } } if ((0 < allChangedRows.Count)) { global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count]; allChangedRows.CopyTo(rows); for (int i = 0; (i < rows.Length); i = (i + 1)) { global::System.Data.DataRow row = rows[i]; row.AcceptChanges(); } } } catch (global::System.Exception ex) { workTransaction.Rollback(); // ---- Restore the dataset ----------- if (this.BackupDataSetBeforeUpdate) { global::System.Diagnostics.Debug.Assert((backupDataSet != null)); dataSet.Clear(); dataSet.Merge(backupDataSet); } else { if ((0 < allAddedRows.Count)) { global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; allAddedRows.CopyTo(rows); for (int i = 0; (i < rows.Length); i = (i + 1)) { global::System.Data.DataRow row = rows[i]; row.AcceptChanges(); row.SetAdded(); } } } throw ex; } finally { if (workConnOpened) { workConnection.Close(); } if ((this._categoryTableAdapter != null)) { this._categoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._categoryTableAdapter])); this._categoryTableAdapter.Transaction = null; } if ((this._orderTableAdapter != null)) { this._orderTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._orderTableAdapter])); this._orderTableAdapter.Transaction = null; } if ((this._pickup_pointTableAdapter != null)) { this._pickup_pointTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._pickup_pointTableAdapter])); this._pickup_pointTableAdapter.Transaction = null; } if ((this._producerTableAdapter != null)) { this._producerTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._producerTableAdapter])); this._producerTableAdapter.Transaction = null; } if ((this._productTableAdapter != null)) { this._productTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productTableAdapter])); this._productTableAdapter.Transaction = null; } if ((this._roleTableAdapter != null)) { this._roleTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._roleTableAdapter])); this._roleTableAdapter.Transaction = null; } if ((this._supplierTableAdapter != null)) { this._supplierTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._supplierTableAdapter])); this._supplierTableAdapter.Transaction = null; } if ((this._unitTableAdapter != null)) { this._unitTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._unitTableAdapter])); this._unitTableAdapter.Transaction = null; } if ((this._userTableAdapter != null)) { this._userTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._userTableAdapter])); this._userTableAdapter.Transaction = null; } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); for (int i = 0; (i < adapters.Length); i = (i + 1)) { global::System.Data.Common.DataAdapter adapter = adapters[i]; adapter.AcceptChangesDuringUpdate = true; } } } return result; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) { global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) { if ((this._connection != null)) { return true; } if (((this.Connection == null) || (inputConnection == null))) { return true; } if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) { return true; } return false; } /// <summary> ///Update Order Option ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public enum UpdateOrderOption { InsertUpdateDelete = 0, UpdateInsertDelete = 1, } /// <summary> ///Used to sort self-referenced table's rows ///</summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> { private global::System.Data.DataRelation _relation; private int _childFirst; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) { this._relation = relation; if (childFirst) { this._childFirst = -1; } else { this._childFirst = 1; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) { global::System.Diagnostics.Debug.Assert((row != null)); global::System.Data.DataRow root = row; distance = 0; global::System.Collections.Generic.IDictionary<global::System.Data.DataRow, global::System.Data.DataRow> traversedRows = new global::System.Collections.Generic.Dictionary<global::System.Data.DataRow, global::System.Data.DataRow>(); traversedRows[row] = row; global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); for ( ; ((parent != null) && (traversedRows.ContainsKey(parent) == false)); ) { distance = (distance + 1); root = parent; traversedRows[parent] = parent; parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); } if ((distance == 0)) { traversedRows.Clear(); traversedRows[row] = row; parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); for ( ; ((parent != null) && (traversedRows.ContainsKey(parent) == false)); ) { distance = (distance + 1); root = parent; traversedRows[parent] = parent; parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); } } return root; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) { if (object.ReferenceEquals(row1, row2)) { return 0; } if ((row1 == null)) { return -1; } if ((row2 == null)) { return 1; } int distance1 = 0; global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1); int distance2 = 0; global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2); if (object.ReferenceEquals(root1, root2)) { return (this._childFirst * distance1.CompareTo(distance2)); } else { global::System.Diagnostics.Debug.Assert(((root1.Table != null) && (root2.Table != null))); if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) { return -1; } else { return 1; } } } } } } #pragma warning restore 1591