//------------------------------------------------------------------------------ // // Этот код создан программой. // Исполняемая версия:4.0.30319.42000 // // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае // повторной генерации кода. // //------------------------------------------------------------------------------ #pragma warning disable 1591 namespace TestWSR4 { /// ///Represents a strongly typed in-memory cache of data. /// [global::System.Serializable()] [global::System.ComponentModel.DesignerCategoryAttribute("code")] [global::System.ComponentModel.ToolboxItem(true)] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] [global::System.Xml.Serialization.XmlRootAttribute("TestWSR4DataSet")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] public partial class TestWSR4DataSet : global::System.Data.DataSet { private AgentDataTable tableAgent; private AgentPriorityHistoryDataTable tableAgentPriorityHistory; private AgentTypeDataTable tableAgentType; private MaterialDataTable tableMaterial; private MaterialCountHistoryDataTable tableMaterialCountHistory; private MaterialSupplierDataTable tableMaterialSupplier; private MaterialTypeDataTable tableMaterialType; private ProductDataTable tableProduct; private ProductCostHistoryDataTable tableProductCostHistory; private ProductMaterialDataTable tableProductMaterial; private ProductSaleDataTable tableProductSale; private ProductTypeDataTable tableProductType; private ShopDataTable tableShop; private SupplierDataTable tableSupplier; private ItogSumProductDataTable tableItogSumProduct; private ProductsPredDataTable tableProductsPred; private ProizvProductDataTable tableProizvProduct; private global::System.Data.DataRelation relationFK_Agent_AgentType; private global::System.Data.DataRelation relationFK_AgentPriorityHistory_Agent; private global::System.Data.DataRelation relationFK_Material_MaterialType; private global::System.Data.DataRelation relationFK_MaterialCountHistory_Material; private global::System.Data.DataRelation relationFK_MaterialSupplier_Material; private global::System.Data.DataRelation relationFK_MaterialSupplier_Supplier; private global::System.Data.DataRelation relationFK_Product_ProductType; private global::System.Data.DataRelation relationFK_ProductCostHistory_Product; private global::System.Data.DataRelation relationFK_ProductMaterial_Material; private global::System.Data.DataRelation relationFK_ProductMaterial_Product; private global::System.Data.DataRelation relationFK_ProductSale_Agent; private global::System.Data.DataRelation relationFK_ProductSale_Product; private global::System.Data.DataRelation relationFK_Shop_Agent; private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public TestWSR4DataSet() { 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", "16.0.0.0")] protected TestWSR4DataSet(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["Agent"] != null)) { base.Tables.Add(new AgentDataTable(ds.Tables["Agent"])); } if ((ds.Tables["AgentPriorityHistory"] != null)) { base.Tables.Add(new AgentPriorityHistoryDataTable(ds.Tables["AgentPriorityHistory"])); } if ((ds.Tables["AgentType"] != null)) { base.Tables.Add(new AgentTypeDataTable(ds.Tables["AgentType"])); } if ((ds.Tables["Material"] != null)) { base.Tables.Add(new MaterialDataTable(ds.Tables["Material"])); } if ((ds.Tables["MaterialCountHistory"] != null)) { base.Tables.Add(new MaterialCountHistoryDataTable(ds.Tables["MaterialCountHistory"])); } if ((ds.Tables["MaterialSupplier"] != null)) { base.Tables.Add(new MaterialSupplierDataTable(ds.Tables["MaterialSupplier"])); } if ((ds.Tables["MaterialType"] != null)) { base.Tables.Add(new MaterialTypeDataTable(ds.Tables["MaterialType"])); } if ((ds.Tables["Product"] != null)) { base.Tables.Add(new ProductDataTable(ds.Tables["Product"])); } if ((ds.Tables["ProductCostHistory"] != null)) { base.Tables.Add(new ProductCostHistoryDataTable(ds.Tables["ProductCostHistory"])); } if ((ds.Tables["ProductMaterial"] != null)) { base.Tables.Add(new ProductMaterialDataTable(ds.Tables["ProductMaterial"])); } if ((ds.Tables["ProductSale"] != null)) { base.Tables.Add(new ProductSaleDataTable(ds.Tables["ProductSale"])); } if ((ds.Tables["ProductType"] != null)) { base.Tables.Add(new ProductTypeDataTable(ds.Tables["ProductType"])); } if ((ds.Tables["Shop"] != null)) { base.Tables.Add(new ShopDataTable(ds.Tables["Shop"])); } if ((ds.Tables["Supplier"] != null)) { base.Tables.Add(new SupplierDataTable(ds.Tables["Supplier"])); } if ((ds.Tables["ItogSumProduct"] != null)) { base.Tables.Add(new ItogSumProductDataTable(ds.Tables["ItogSumProduct"])); } if ((ds.Tables["ProductsPred"] != null)) { base.Tables.Add(new ProductsPredDataTable(ds.Tables["ProductsPred"])); } if ((ds.Tables["ProizvProduct"] != null)) { base.Tables.Add(new ProizvProductDataTable(ds.Tables["ProizvProduct"])); } 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", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public AgentDataTable Agent { get { return this.tableAgent; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public AgentPriorityHistoryDataTable AgentPriorityHistory { get { return this.tableAgentPriorityHistory; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public AgentTypeDataTable AgentType { get { return this.tableAgentType; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public MaterialDataTable Material { get { return this.tableMaterial; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public MaterialCountHistoryDataTable MaterialCountHistory { get { return this.tableMaterialCountHistory; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public MaterialSupplierDataTable MaterialSupplier { get { return this.tableMaterialSupplier; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public MaterialTypeDataTable MaterialType { get { return this.tableMaterialType; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public ProductCostHistoryDataTable ProductCostHistory { get { return this.tableProductCostHistory; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public ProductMaterialDataTable ProductMaterial { get { return this.tableProductMaterial; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public ProductSaleDataTable ProductSale { get { return this.tableProductSale; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public ProductTypeDataTable ProductType { get { return this.tableProductType; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public ShopDataTable Shop { get { return this.tableShop; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public ItogSumProductDataTable ItogSumProduct { get { return this.tableItogSumProduct; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public ProductsPredDataTable ProductsPred { get { return this.tableProductsPred; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] public ProizvProductDataTable ProizvProduct { get { return this.tableProizvProduct; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.0.0.0")] public override global::System.Data.DataSet Clone() { TestWSR4DataSet cln = ((TestWSR4DataSet)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override bool ShouldSerializeTables() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override bool ShouldSerializeRelations() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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["Agent"] != null)) { base.Tables.Add(new AgentDataTable(ds.Tables["Agent"])); } if ((ds.Tables["AgentPriorityHistory"] != null)) { base.Tables.Add(new AgentPriorityHistoryDataTable(ds.Tables["AgentPriorityHistory"])); } if ((ds.Tables["AgentType"] != null)) { base.Tables.Add(new AgentTypeDataTable(ds.Tables["AgentType"])); } if ((ds.Tables["Material"] != null)) { base.Tables.Add(new MaterialDataTable(ds.Tables["Material"])); } if ((ds.Tables["MaterialCountHistory"] != null)) { base.Tables.Add(new MaterialCountHistoryDataTable(ds.Tables["MaterialCountHistory"])); } if ((ds.Tables["MaterialSupplier"] != null)) { base.Tables.Add(new MaterialSupplierDataTable(ds.Tables["MaterialSupplier"])); } if ((ds.Tables["MaterialType"] != null)) { base.Tables.Add(new MaterialTypeDataTable(ds.Tables["MaterialType"])); } if ((ds.Tables["Product"] != null)) { base.Tables.Add(new ProductDataTable(ds.Tables["Product"])); } if ((ds.Tables["ProductCostHistory"] != null)) { base.Tables.Add(new ProductCostHistoryDataTable(ds.Tables["ProductCostHistory"])); } if ((ds.Tables["ProductMaterial"] != null)) { base.Tables.Add(new ProductMaterialDataTable(ds.Tables["ProductMaterial"])); } if ((ds.Tables["ProductSale"] != null)) { base.Tables.Add(new ProductSaleDataTable(ds.Tables["ProductSale"])); } if ((ds.Tables["ProductType"] != null)) { base.Tables.Add(new ProductTypeDataTable(ds.Tables["ProductType"])); } if ((ds.Tables["Shop"] != null)) { base.Tables.Add(new ShopDataTable(ds.Tables["Shop"])); } if ((ds.Tables["Supplier"] != null)) { base.Tables.Add(new SupplierDataTable(ds.Tables["Supplier"])); } if ((ds.Tables["ItogSumProduct"] != null)) { base.Tables.Add(new ItogSumProductDataTable(ds.Tables["ItogSumProduct"])); } if ((ds.Tables["ProductsPred"] != null)) { base.Tables.Add(new ProductsPredDataTable(ds.Tables["ProductsPred"])); } if ((ds.Tables["ProizvProduct"] != null)) { base.Tables.Add(new ProizvProductDataTable(ds.Tables["ProizvProduct"])); } 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", "16.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", "16.0.0.0")] internal void InitVars() { this.InitVars(true); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars(bool initTable) { this.tableAgent = ((AgentDataTable)(base.Tables["Agent"])); if ((initTable == true)) { if ((this.tableAgent != null)) { this.tableAgent.InitVars(); } } this.tableAgentPriorityHistory = ((AgentPriorityHistoryDataTable)(base.Tables["AgentPriorityHistory"])); if ((initTable == true)) { if ((this.tableAgentPriorityHistory != null)) { this.tableAgentPriorityHistory.InitVars(); } } this.tableAgentType = ((AgentTypeDataTable)(base.Tables["AgentType"])); if ((initTable == true)) { if ((this.tableAgentType != null)) { this.tableAgentType.InitVars(); } } this.tableMaterial = ((MaterialDataTable)(base.Tables["Material"])); if ((initTable == true)) { if ((this.tableMaterial != null)) { this.tableMaterial.InitVars(); } } this.tableMaterialCountHistory = ((MaterialCountHistoryDataTable)(base.Tables["MaterialCountHistory"])); if ((initTable == true)) { if ((this.tableMaterialCountHistory != null)) { this.tableMaterialCountHistory.InitVars(); } } this.tableMaterialSupplier = ((MaterialSupplierDataTable)(base.Tables["MaterialSupplier"])); if ((initTable == true)) { if ((this.tableMaterialSupplier != null)) { this.tableMaterialSupplier.InitVars(); } } this.tableMaterialType = ((MaterialTypeDataTable)(base.Tables["MaterialType"])); if ((initTable == true)) { if ((this.tableMaterialType != null)) { this.tableMaterialType.InitVars(); } } this.tableProduct = ((ProductDataTable)(base.Tables["Product"])); if ((initTable == true)) { if ((this.tableProduct != null)) { this.tableProduct.InitVars(); } } this.tableProductCostHistory = ((ProductCostHistoryDataTable)(base.Tables["ProductCostHistory"])); if ((initTable == true)) { if ((this.tableProductCostHistory != null)) { this.tableProductCostHistory.InitVars(); } } this.tableProductMaterial = ((ProductMaterialDataTable)(base.Tables["ProductMaterial"])); if ((initTable == true)) { if ((this.tableProductMaterial != null)) { this.tableProductMaterial.InitVars(); } } this.tableProductSale = ((ProductSaleDataTable)(base.Tables["ProductSale"])); if ((initTable == true)) { if ((this.tableProductSale != null)) { this.tableProductSale.InitVars(); } } this.tableProductType = ((ProductTypeDataTable)(base.Tables["ProductType"])); if ((initTable == true)) { if ((this.tableProductType != null)) { this.tableProductType.InitVars(); } } this.tableShop = ((ShopDataTable)(base.Tables["Shop"])); if ((initTable == true)) { if ((this.tableShop != null)) { this.tableShop.InitVars(); } } this.tableSupplier = ((SupplierDataTable)(base.Tables["Supplier"])); if ((initTable == true)) { if ((this.tableSupplier != null)) { this.tableSupplier.InitVars(); } } this.tableItogSumProduct = ((ItogSumProductDataTable)(base.Tables["ItogSumProduct"])); if ((initTable == true)) { if ((this.tableItogSumProduct != null)) { this.tableItogSumProduct.InitVars(); } } this.tableProductsPred = ((ProductsPredDataTable)(base.Tables["ProductsPred"])); if ((initTable == true)) { if ((this.tableProductsPred != null)) { this.tableProductsPred.InitVars(); } } this.tableProizvProduct = ((ProizvProductDataTable)(base.Tables["ProizvProduct"])); if ((initTable == true)) { if ((this.tableProizvProduct != null)) { this.tableProizvProduct.InitVars(); } } this.relationFK_Agent_AgentType = this.Relations["FK_Agent_AgentType"]; this.relationFK_AgentPriorityHistory_Agent = this.Relations["FK_AgentPriorityHistory_Agent"]; this.relationFK_Material_MaterialType = this.Relations["FK_Material_MaterialType"]; this.relationFK_MaterialCountHistory_Material = this.Relations["FK_MaterialCountHistory_Material"]; this.relationFK_MaterialSupplier_Material = this.Relations["FK_MaterialSupplier_Material"]; this.relationFK_MaterialSupplier_Supplier = this.Relations["FK_MaterialSupplier_Supplier"]; this.relationFK_Product_ProductType = this.Relations["FK_Product_ProductType"]; this.relationFK_ProductCostHistory_Product = this.Relations["FK_ProductCostHistory_Product"]; this.relationFK_ProductMaterial_Material = this.Relations["FK_ProductMaterial_Material"]; this.relationFK_ProductMaterial_Product = this.Relations["FK_ProductMaterial_Product"]; this.relationFK_ProductSale_Agent = this.Relations["FK_ProductSale_Agent"]; this.relationFK_ProductSale_Product = this.Relations["FK_ProductSale_Product"]; this.relationFK_Shop_Agent = this.Relations["FK_Shop_Agent"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitClass() { this.DataSetName = "TestWSR4DataSet"; this.Prefix = ""; this.Namespace = "http://tempuri.org/TestWSR4DataSet.xsd"; this.EnforceConstraints = true; this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; this.tableAgent = new AgentDataTable(); base.Tables.Add(this.tableAgent); this.tableAgentPriorityHistory = new AgentPriorityHistoryDataTable(); base.Tables.Add(this.tableAgentPriorityHistory); this.tableAgentType = new AgentTypeDataTable(); base.Tables.Add(this.tableAgentType); this.tableMaterial = new MaterialDataTable(); base.Tables.Add(this.tableMaterial); this.tableMaterialCountHistory = new MaterialCountHistoryDataTable(); base.Tables.Add(this.tableMaterialCountHistory); this.tableMaterialSupplier = new MaterialSupplierDataTable(); base.Tables.Add(this.tableMaterialSupplier); this.tableMaterialType = new MaterialTypeDataTable(); base.Tables.Add(this.tableMaterialType); this.tableProduct = new ProductDataTable(); base.Tables.Add(this.tableProduct); this.tableProductCostHistory = new ProductCostHistoryDataTable(); base.Tables.Add(this.tableProductCostHistory); this.tableProductMaterial = new ProductMaterialDataTable(); base.Tables.Add(this.tableProductMaterial); this.tableProductSale = new ProductSaleDataTable(); base.Tables.Add(this.tableProductSale); this.tableProductType = new ProductTypeDataTable(); base.Tables.Add(this.tableProductType); this.tableShop = new ShopDataTable(); base.Tables.Add(this.tableShop); this.tableSupplier = new SupplierDataTable(); base.Tables.Add(this.tableSupplier); this.tableItogSumProduct = new ItogSumProductDataTable(); base.Tables.Add(this.tableItogSumProduct); this.tableProductsPred = new ProductsPredDataTable(); base.Tables.Add(this.tableProductsPred); this.tableProizvProduct = new ProizvProductDataTable(); base.Tables.Add(this.tableProizvProduct); this.relationFK_Agent_AgentType = new global::System.Data.DataRelation("FK_Agent_AgentType", new global::System.Data.DataColumn[] { this.tableAgentType.IDColumn}, new global::System.Data.DataColumn[] { this.tableAgent.AgentTypeIDColumn}, false); this.Relations.Add(this.relationFK_Agent_AgentType); this.relationFK_AgentPriorityHistory_Agent = new global::System.Data.DataRelation("FK_AgentPriorityHistory_Agent", new global::System.Data.DataColumn[] { this.tableAgent.IDColumn}, new global::System.Data.DataColumn[] { this.tableAgentPriorityHistory.AgentIDColumn}, false); this.Relations.Add(this.relationFK_AgentPriorityHistory_Agent); this.relationFK_Material_MaterialType = new global::System.Data.DataRelation("FK_Material_MaterialType", new global::System.Data.DataColumn[] { this.tableMaterialType.IDColumn}, new global::System.Data.DataColumn[] { this.tableMaterial.MaterialTypeIDColumn}, false); this.Relations.Add(this.relationFK_Material_MaterialType); this.relationFK_MaterialCountHistory_Material = new global::System.Data.DataRelation("FK_MaterialCountHistory_Material", new global::System.Data.DataColumn[] { this.tableMaterial.IDColumn}, new global::System.Data.DataColumn[] { this.tableMaterialCountHistory.MaterialIDColumn}, false); this.Relations.Add(this.relationFK_MaterialCountHistory_Material); this.relationFK_MaterialSupplier_Material = new global::System.Data.DataRelation("FK_MaterialSupplier_Material", new global::System.Data.DataColumn[] { this.tableMaterial.IDColumn}, new global::System.Data.DataColumn[] { this.tableMaterialSupplier.MaterialIDColumn}, false); this.Relations.Add(this.relationFK_MaterialSupplier_Material); this.relationFK_MaterialSupplier_Supplier = new global::System.Data.DataRelation("FK_MaterialSupplier_Supplier", new global::System.Data.DataColumn[] { this.tableSupplier.IDColumn}, new global::System.Data.DataColumn[] { this.tableMaterialSupplier.SupplierIDColumn}, false); this.Relations.Add(this.relationFK_MaterialSupplier_Supplier); this.relationFK_Product_ProductType = new global::System.Data.DataRelation("FK_Product_ProductType", new global::System.Data.DataColumn[] { this.tableProductType.IDColumn}, new global::System.Data.DataColumn[] { this.tableProduct.ProductTypeIDColumn}, false); this.Relations.Add(this.relationFK_Product_ProductType); this.relationFK_ProductCostHistory_Product = new global::System.Data.DataRelation("FK_ProductCostHistory_Product", new global::System.Data.DataColumn[] { this.tableProduct.IDColumn}, new global::System.Data.DataColumn[] { this.tableProductCostHistory.ProductIDColumn}, false); this.Relations.Add(this.relationFK_ProductCostHistory_Product); this.relationFK_ProductMaterial_Material = new global::System.Data.DataRelation("FK_ProductMaterial_Material", new global::System.Data.DataColumn[] { this.tableMaterial.IDColumn}, new global::System.Data.DataColumn[] { this.tableProductMaterial.MaterialIDColumn}, false); this.Relations.Add(this.relationFK_ProductMaterial_Material); this.relationFK_ProductMaterial_Product = new global::System.Data.DataRelation("FK_ProductMaterial_Product", new global::System.Data.DataColumn[] { this.tableProduct.IDColumn}, new global::System.Data.DataColumn[] { this.tableProductMaterial.ProductIDColumn}, false); this.Relations.Add(this.relationFK_ProductMaterial_Product); this.relationFK_ProductSale_Agent = new global::System.Data.DataRelation("FK_ProductSale_Agent", new global::System.Data.DataColumn[] { this.tableAgent.IDColumn}, new global::System.Data.DataColumn[] { this.tableProductSale.AgentIDColumn}, false); this.Relations.Add(this.relationFK_ProductSale_Agent); this.relationFK_ProductSale_Product = new global::System.Data.DataRelation("FK_ProductSale_Product", new global::System.Data.DataColumn[] { this.tableProduct.IDColumn}, new global::System.Data.DataColumn[] { this.tableProductSale.ProductIDColumn}, false); this.Relations.Add(this.relationFK_ProductSale_Product); this.relationFK_Shop_Agent = new global::System.Data.DataRelation("FK_Shop_Agent", new global::System.Data.DataColumn[] { this.tableAgent.IDColumn}, new global::System.Data.DataColumn[] { this.tableShop.AgentIDColumn}, false); this.Relations.Add(this.relationFK_Shop_Agent); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeAgent() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeAgentPriorityHistory() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeAgentType() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeMaterial() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeMaterialCountHistory() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeMaterialSupplier() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeMaterialType() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeProduct() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeProductCostHistory() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeProductMaterial() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeProductSale() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeProductType() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeShop() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeSupplier() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeItogSumProduct() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeProductsPred() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private bool ShouldSerializeProizvProduct() { return false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { TestWSR4DataSet ds = new TestWSR4DataSet(); 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", "16.0.0.0")] public delegate void AgentRowChangeEventHandler(object sender, AgentRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void AgentPriorityHistoryRowChangeEventHandler(object sender, AgentPriorityHistoryRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void AgentTypeRowChangeEventHandler(object sender, AgentTypeRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void MaterialRowChangeEventHandler(object sender, MaterialRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void MaterialCountHistoryRowChangeEventHandler(object sender, MaterialCountHistoryRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void MaterialSupplierRowChangeEventHandler(object sender, MaterialSupplierRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void MaterialTypeRowChangeEventHandler(object sender, MaterialTypeRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ProductRowChangeEventHandler(object sender, ProductRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ProductCostHistoryRowChangeEventHandler(object sender, ProductCostHistoryRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ProductMaterialRowChangeEventHandler(object sender, ProductMaterialRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ProductSaleRowChangeEventHandler(object sender, ProductSaleRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ProductTypeRowChangeEventHandler(object sender, ProductTypeRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ShopRowChangeEventHandler(object sender, ShopRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void SupplierRowChangeEventHandler(object sender, SupplierRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ItogSumProductRowChangeEventHandler(object sender, ItogSumProductRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ProductsPredRowChangeEventHandler(object sender, ProductsPredRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void ProizvProductRowChangeEventHandler(object sender, ProizvProductRowChangeEvent e); /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class AgentDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnTitle; private global::System.Data.DataColumn columnAgentTypeID; private global::System.Data.DataColumn columnAddress; private global::System.Data.DataColumn columnINN; private global::System.Data.DataColumn columnKPP; private global::System.Data.DataColumn columnDirectorName; private global::System.Data.DataColumn columnPhone; private global::System.Data.DataColumn columnEmail; private global::System.Data.DataColumn columnLogo; private global::System.Data.DataColumn columnPriority; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentDataTable() { this.TableName = "Agent"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal AgentDataTable(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", "16.0.0.0")] protected AgentDataTable(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", "16.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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn AgentTypeIDColumn { get { return this.columnAgentTypeID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn AddressColumn { get { return this.columnAddress; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn INNColumn { get { return this.columnINN; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn KPPColumn { get { return this.columnKPP; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn DirectorNameColumn { get { return this.columnDirectorName; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn PhoneColumn { get { return this.columnPhone; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn EmailColumn { get { return this.columnEmail; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn LogoColumn { get { return this.columnLogo; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn PriorityColumn { get { return this.columnPriority; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public AgentRow this[int index] { get { return ((AgentRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentRowChangeEventHandler AgentRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentRowChangeEventHandler AgentRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentRowChangeEventHandler AgentRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentRowChangeEventHandler AgentRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddAgentRow(AgentRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentRow AddAgentRow(string Title, AgentTypeRow parentAgentTypeRowByFK_Agent_AgentType, string Address, string INN, string KPP, string DirectorName, string Phone, string Email, string Logo, int Priority) { AgentRow rowAgentRow = ((AgentRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Title, null, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority}; if ((parentAgentTypeRowByFK_Agent_AgentType != null)) { columnValuesArray[2] = parentAgentTypeRowByFK_Agent_AgentType[0]; } rowAgentRow.ItemArray = columnValuesArray; this.Rows.Add(rowAgentRow); return rowAgentRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentRow FindByID(int ID) { return ((AgentRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { AgentDataTable cln = ((AgentDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new AgentDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnTitle = base.Columns["Title"]; this.columnAgentTypeID = base.Columns["AgentTypeID"]; this.columnAddress = base.Columns["Address"]; this.columnINN = base.Columns["INN"]; this.columnKPP = base.Columns["KPP"]; this.columnDirectorName = base.Columns["DirectorName"]; this.columnPhone = base.Columns["Phone"]; this.columnEmail = base.Columns["Email"]; this.columnLogo = base.Columns["Logo"]; this.columnPriority = base.Columns["Priority"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnAgentTypeID = new global::System.Data.DataColumn("AgentTypeID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAgentTypeID); this.columnAddress = new global::System.Data.DataColumn("Address", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAddress); this.columnINN = new global::System.Data.DataColumn("INN", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnINN); this.columnKPP = new global::System.Data.DataColumn("KPP", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnKPP); this.columnDirectorName = new global::System.Data.DataColumn("DirectorName", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDirectorName); this.columnPhone = new global::System.Data.DataColumn("Phone", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnPhone); this.columnEmail = new global::System.Data.DataColumn("Email", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnEmail); this.columnLogo = new global::System.Data.DataColumn("Logo", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnLogo); this.columnPriority = new global::System.Data.DataColumn("Priority", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnPriority); 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.columnTitle.AllowDBNull = false; this.columnTitle.MaxLength = 150; this.columnAgentTypeID.AllowDBNull = false; this.columnAddress.MaxLength = 300; this.columnINN.AllowDBNull = false; this.columnINN.MaxLength = 12; this.columnKPP.MaxLength = 9; this.columnDirectorName.MaxLength = 100; this.columnPhone.AllowDBNull = false; this.columnPhone.MaxLength = 20; this.columnEmail.MaxLength = 255; this.columnLogo.MaxLength = 100; this.columnPriority.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentRow NewAgentRow() { return ((AgentRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new AgentRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(AgentRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.AgentRowChanged != null)) { this.AgentRowChanged(this, new AgentRowChangeEvent(((AgentRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.AgentRowChanging != null)) { this.AgentRowChanging(this, new AgentRowChangeEvent(((AgentRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.AgentRowDeleted != null)) { this.AgentRowDeleted(this, new AgentRowChangeEvent(((AgentRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.AgentRowDeleting != null)) { this.AgentRowDeleting(this, new AgentRowChangeEvent(((AgentRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveAgentRow(AgentRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "AgentDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class AgentPriorityHistoryDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnAgentID; private global::System.Data.DataColumn columnChangeDate; private global::System.Data.DataColumn columnPriorityValue; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentPriorityHistoryDataTable() { this.TableName = "AgentPriorityHistory"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal AgentPriorityHistoryDataTable(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", "16.0.0.0")] protected AgentPriorityHistoryDataTable(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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn AgentIDColumn { get { return this.columnAgentID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ChangeDateColumn { get { return this.columnChangeDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn PriorityValueColumn { get { return this.columnPriorityValue; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public AgentPriorityHistoryRow this[int index] { get { return ((AgentPriorityHistoryRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentPriorityHistoryRowChangeEventHandler AgentPriorityHistoryRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentPriorityHistoryRowChangeEventHandler AgentPriorityHistoryRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentPriorityHistoryRowChangeEventHandler AgentPriorityHistoryRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentPriorityHistoryRowChangeEventHandler AgentPriorityHistoryRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddAgentPriorityHistoryRow(AgentPriorityHistoryRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentPriorityHistoryRow AddAgentPriorityHistoryRow(AgentRow parentAgentRowByFK_AgentPriorityHistory_Agent, System.DateTime ChangeDate, int PriorityValue) { AgentPriorityHistoryRow rowAgentPriorityHistoryRow = ((AgentPriorityHistoryRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null, ChangeDate, PriorityValue}; if ((parentAgentRowByFK_AgentPriorityHistory_Agent != null)) { columnValuesArray[1] = parentAgentRowByFK_AgentPriorityHistory_Agent[0]; } rowAgentPriorityHistoryRow.ItemArray = columnValuesArray; this.Rows.Add(rowAgentPriorityHistoryRow); return rowAgentPriorityHistoryRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentPriorityHistoryRow FindByID(int ID) { return ((AgentPriorityHistoryRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { AgentPriorityHistoryDataTable cln = ((AgentPriorityHistoryDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new AgentPriorityHistoryDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnAgentID = base.Columns["AgentID"]; this.columnChangeDate = base.Columns["ChangeDate"]; this.columnPriorityValue = base.Columns["PriorityValue"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnAgentID = new global::System.Data.DataColumn("AgentID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAgentID); this.columnChangeDate = new global::System.Data.DataColumn("ChangeDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnChangeDate); this.columnPriorityValue = new global::System.Data.DataColumn("PriorityValue", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnPriorityValue); 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.columnAgentID.AllowDBNull = false; this.columnChangeDate.AllowDBNull = false; this.columnPriorityValue.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentPriorityHistoryRow NewAgentPriorityHistoryRow() { return ((AgentPriorityHistoryRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new AgentPriorityHistoryRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(AgentPriorityHistoryRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.AgentPriorityHistoryRowChanged != null)) { this.AgentPriorityHistoryRowChanged(this, new AgentPriorityHistoryRowChangeEvent(((AgentPriorityHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.AgentPriorityHistoryRowChanging != null)) { this.AgentPriorityHistoryRowChanging(this, new AgentPriorityHistoryRowChangeEvent(((AgentPriorityHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.AgentPriorityHistoryRowDeleted != null)) { this.AgentPriorityHistoryRowDeleted(this, new AgentPriorityHistoryRowChangeEvent(((AgentPriorityHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.AgentPriorityHistoryRowDeleting != null)) { this.AgentPriorityHistoryRowDeleting(this, new AgentPriorityHistoryRowChangeEvent(((AgentPriorityHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveAgentPriorityHistoryRow(AgentPriorityHistoryRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "AgentPriorityHistoryDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class AgentTypeDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnTitle; private global::System.Data.DataColumn columnImage; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentTypeDataTable() { this.TableName = "AgentType"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal AgentTypeDataTable(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", "16.0.0.0")] protected AgentTypeDataTable(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", "16.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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn ImageColumn { get { return this.columnImage; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public AgentTypeRow this[int index] { get { return ((AgentTypeRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentTypeRowChangeEventHandler AgentTypeRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentTypeRowChangeEventHandler AgentTypeRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentTypeRowChangeEventHandler AgentTypeRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event AgentTypeRowChangeEventHandler AgentTypeRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddAgentTypeRow(AgentTypeRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentTypeRow AddAgentTypeRow(string Title, string Image) { AgentTypeRow rowAgentTypeRow = ((AgentTypeRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Title, Image}; rowAgentTypeRow.ItemArray = columnValuesArray; this.Rows.Add(rowAgentTypeRow); return rowAgentTypeRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentTypeRow FindByID(int ID) { return ((AgentTypeRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { AgentTypeDataTable cln = ((AgentTypeDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new AgentTypeDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnTitle = base.Columns["Title"]; this.columnImage = base.Columns["Image"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnImage = new global::System.Data.DataColumn("Image", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnImage); 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.columnTitle.AllowDBNull = false; this.columnTitle.MaxLength = 50; this.columnImage.MaxLength = 100; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentTypeRow NewAgentTypeRow() { return ((AgentTypeRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new AgentTypeRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(AgentTypeRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.AgentTypeRowChanged != null)) { this.AgentTypeRowChanged(this, new AgentTypeRowChangeEvent(((AgentTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.AgentTypeRowChanging != null)) { this.AgentTypeRowChanging(this, new AgentTypeRowChangeEvent(((AgentTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.AgentTypeRowDeleted != null)) { this.AgentTypeRowDeleted(this, new AgentTypeRowChangeEvent(((AgentTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.AgentTypeRowDeleting != null)) { this.AgentTypeRowDeleting(this, new AgentTypeRowChangeEvent(((AgentTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveAgentTypeRow(AgentTypeRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "AgentTypeDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class MaterialDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnTitle; private global::System.Data.DataColumn columnCountInPack; private global::System.Data.DataColumn columnUnit; private global::System.Data.DataColumn columnCountInStock; private global::System.Data.DataColumn columnMinCount; private global::System.Data.DataColumn columnDescription; private global::System.Data.DataColumn columnCost; private global::System.Data.DataColumn columnImage; private global::System.Data.DataColumn columnMaterialTypeID; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialDataTable() { this.TableName = "Material"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal MaterialDataTable(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", "16.0.0.0")] protected MaterialDataTable(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", "16.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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn CountInPackColumn { get { return this.columnCountInPack; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn UnitColumn { get { return this.columnUnit; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CountInStockColumn { get { return this.columnCountInStock; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn MinCountColumn { get { return this.columnMinCount; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn DescriptionColumn { get { return this.columnDescription; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CostColumn { get { return this.columnCost; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ImageColumn { get { return this.columnImage; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn MaterialTypeIDColumn { get { return this.columnMaterialTypeID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public MaterialRow this[int index] { get { return ((MaterialRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialRowChangeEventHandler MaterialRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialRowChangeEventHandler MaterialRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialRowChangeEventHandler MaterialRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialRowChangeEventHandler MaterialRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddMaterialRow(MaterialRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialRow AddMaterialRow(string Title, int CountInPack, string Unit, double CountInStock, double MinCount, string Description, decimal Cost, string Image, MaterialTypeRow parentMaterialTypeRowByFK_Material_MaterialType) { MaterialRow rowMaterialRow = ((MaterialRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Title, CountInPack, Unit, CountInStock, MinCount, Description, Cost, Image, null}; if ((parentMaterialTypeRowByFK_Material_MaterialType != null)) { columnValuesArray[9] = parentMaterialTypeRowByFK_Material_MaterialType[0]; } rowMaterialRow.ItemArray = columnValuesArray; this.Rows.Add(rowMaterialRow); return rowMaterialRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialRow FindByID(int ID) { return ((MaterialRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { MaterialDataTable cln = ((MaterialDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new MaterialDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnTitle = base.Columns["Title"]; this.columnCountInPack = base.Columns["CountInPack"]; this.columnUnit = base.Columns["Unit"]; this.columnCountInStock = base.Columns["CountInStock"]; this.columnMinCount = base.Columns["MinCount"]; this.columnDescription = base.Columns["Description"]; this.columnCost = base.Columns["Cost"]; this.columnImage = base.Columns["Image"]; this.columnMaterialTypeID = base.Columns["MaterialTypeID"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnCountInPack = new global::System.Data.DataColumn("CountInPack", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCountInPack); this.columnUnit = new global::System.Data.DataColumn("Unit", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnUnit); this.columnCountInStock = new global::System.Data.DataColumn("CountInStock", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCountInStock); this.columnMinCount = new global::System.Data.DataColumn("MinCount", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMinCount); this.columnDescription = new global::System.Data.DataColumn("Description", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDescription); this.columnCost = new global::System.Data.DataColumn("Cost", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCost); this.columnImage = new global::System.Data.DataColumn("Image", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnImage); this.columnMaterialTypeID = new global::System.Data.DataColumn("MaterialTypeID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMaterialTypeID); 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.columnTitle.AllowDBNull = false; this.columnTitle.MaxLength = 100; this.columnCountInPack.AllowDBNull = false; this.columnUnit.AllowDBNull = false; this.columnUnit.MaxLength = 10; this.columnMinCount.AllowDBNull = false; this.columnDescription.MaxLength = 2147483647; this.columnCost.AllowDBNull = false; this.columnImage.MaxLength = 100; this.columnMaterialTypeID.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialRow NewMaterialRow() { return ((MaterialRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new MaterialRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(MaterialRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.MaterialRowChanged != null)) { this.MaterialRowChanged(this, new MaterialRowChangeEvent(((MaterialRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.MaterialRowChanging != null)) { this.MaterialRowChanging(this, new MaterialRowChangeEvent(((MaterialRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.MaterialRowDeleted != null)) { this.MaterialRowDeleted(this, new MaterialRowChangeEvent(((MaterialRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.MaterialRowDeleting != null)) { this.MaterialRowDeleting(this, new MaterialRowChangeEvent(((MaterialRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveMaterialRow(MaterialRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "MaterialDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class MaterialCountHistoryDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnMaterialID; private global::System.Data.DataColumn columnChangeDate; private global::System.Data.DataColumn columnCountValue; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialCountHistoryDataTable() { this.TableName = "MaterialCountHistory"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal MaterialCountHistoryDataTable(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", "16.0.0.0")] protected MaterialCountHistoryDataTable(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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn MaterialIDColumn { get { return this.columnMaterialID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ChangeDateColumn { get { return this.columnChangeDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CountValueColumn { get { return this.columnCountValue; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public MaterialCountHistoryRow this[int index] { get { return ((MaterialCountHistoryRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialCountHistoryRowChangeEventHandler MaterialCountHistoryRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialCountHistoryRowChangeEventHandler MaterialCountHistoryRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialCountHistoryRowChangeEventHandler MaterialCountHistoryRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialCountHistoryRowChangeEventHandler MaterialCountHistoryRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddMaterialCountHistoryRow(MaterialCountHistoryRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialCountHistoryRow AddMaterialCountHistoryRow(MaterialRow parentMaterialRowByFK_MaterialCountHistory_Material, System.DateTime ChangeDate, double CountValue) { MaterialCountHistoryRow rowMaterialCountHistoryRow = ((MaterialCountHistoryRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null, ChangeDate, CountValue}; if ((parentMaterialRowByFK_MaterialCountHistory_Material != null)) { columnValuesArray[1] = parentMaterialRowByFK_MaterialCountHistory_Material[0]; } rowMaterialCountHistoryRow.ItemArray = columnValuesArray; this.Rows.Add(rowMaterialCountHistoryRow); return rowMaterialCountHistoryRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialCountHistoryRow FindByID(int ID) { return ((MaterialCountHistoryRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { MaterialCountHistoryDataTable cln = ((MaterialCountHistoryDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new MaterialCountHistoryDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnMaterialID = base.Columns["MaterialID"]; this.columnChangeDate = base.Columns["ChangeDate"]; this.columnCountValue = base.Columns["CountValue"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnMaterialID = new global::System.Data.DataColumn("MaterialID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMaterialID); this.columnChangeDate = new global::System.Data.DataColumn("ChangeDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnChangeDate); this.columnCountValue = new global::System.Data.DataColumn("CountValue", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCountValue); 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.columnMaterialID.AllowDBNull = false; this.columnChangeDate.AllowDBNull = false; this.columnCountValue.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialCountHistoryRow NewMaterialCountHistoryRow() { return ((MaterialCountHistoryRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new MaterialCountHistoryRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(MaterialCountHistoryRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.MaterialCountHistoryRowChanged != null)) { this.MaterialCountHistoryRowChanged(this, new MaterialCountHistoryRowChangeEvent(((MaterialCountHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.MaterialCountHistoryRowChanging != null)) { this.MaterialCountHistoryRowChanging(this, new MaterialCountHistoryRowChangeEvent(((MaterialCountHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.MaterialCountHistoryRowDeleted != null)) { this.MaterialCountHistoryRowDeleted(this, new MaterialCountHistoryRowChangeEvent(((MaterialCountHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.MaterialCountHistoryRowDeleting != null)) { this.MaterialCountHistoryRowDeleting(this, new MaterialCountHistoryRowChangeEvent(((MaterialCountHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveMaterialCountHistoryRow(MaterialCountHistoryRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "MaterialCountHistoryDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class MaterialSupplierDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnMaterialID; private global::System.Data.DataColumn columnSupplierID; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialSupplierDataTable() { this.TableName = "MaterialSupplier"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal MaterialSupplierDataTable(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", "16.0.0.0")] protected MaterialSupplierDataTable(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", "16.0.0.0")] public global::System.Data.DataColumn MaterialIDColumn { get { return this.columnMaterialID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn SupplierIDColumn { get { return this.columnSupplierID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public MaterialSupplierRow this[int index] { get { return ((MaterialSupplierRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialSupplierRowChangeEventHandler MaterialSupplierRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialSupplierRowChangeEventHandler MaterialSupplierRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialSupplierRowChangeEventHandler MaterialSupplierRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialSupplierRowChangeEventHandler MaterialSupplierRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddMaterialSupplierRow(MaterialSupplierRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialSupplierRow AddMaterialSupplierRow(MaterialRow parentMaterialRowByFK_MaterialSupplier_Material, SupplierRow parentSupplierRowByFK_MaterialSupplier_Supplier) { MaterialSupplierRow rowMaterialSupplierRow = ((MaterialSupplierRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null}; if ((parentMaterialRowByFK_MaterialSupplier_Material != null)) { columnValuesArray[0] = parentMaterialRowByFK_MaterialSupplier_Material[0]; } if ((parentSupplierRowByFK_MaterialSupplier_Supplier != null)) { columnValuesArray[1] = parentSupplierRowByFK_MaterialSupplier_Supplier[0]; } rowMaterialSupplierRow.ItemArray = columnValuesArray; this.Rows.Add(rowMaterialSupplierRow); return rowMaterialSupplierRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialSupplierRow FindByMaterialIDSupplierID(int MaterialID, int SupplierID) { return ((MaterialSupplierRow)(this.Rows.Find(new object[] { MaterialID, SupplierID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { MaterialSupplierDataTable cln = ((MaterialSupplierDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new MaterialSupplierDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnMaterialID = base.Columns["MaterialID"]; this.columnSupplierID = base.Columns["SupplierID"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitClass() { this.columnMaterialID = new global::System.Data.DataColumn("MaterialID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMaterialID); this.columnSupplierID = new global::System.Data.DataColumn("SupplierID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSupplierID); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnMaterialID, this.columnSupplierID}, true)); this.columnMaterialID.AllowDBNull = false; this.columnSupplierID.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialSupplierRow NewMaterialSupplierRow() { return ((MaterialSupplierRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new MaterialSupplierRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(MaterialSupplierRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.MaterialSupplierRowChanged != null)) { this.MaterialSupplierRowChanged(this, new MaterialSupplierRowChangeEvent(((MaterialSupplierRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.MaterialSupplierRowChanging != null)) { this.MaterialSupplierRowChanging(this, new MaterialSupplierRowChangeEvent(((MaterialSupplierRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.MaterialSupplierRowDeleted != null)) { this.MaterialSupplierRowDeleted(this, new MaterialSupplierRowChangeEvent(((MaterialSupplierRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.MaterialSupplierRowDeleting != null)) { this.MaterialSupplierRowDeleting(this, new MaterialSupplierRowChangeEvent(((MaterialSupplierRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveMaterialSupplierRow(MaterialSupplierRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "MaterialSupplierDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class MaterialTypeDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnTitle; private global::System.Data.DataColumn columnDefectedPercent; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialTypeDataTable() { this.TableName = "MaterialType"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal MaterialTypeDataTable(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", "16.0.0.0")] protected MaterialTypeDataTable(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", "16.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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn DefectedPercentColumn { get { return this.columnDefectedPercent; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public MaterialTypeRow this[int index] { get { return ((MaterialTypeRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialTypeRowChangeEventHandler MaterialTypeRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialTypeRowChangeEventHandler MaterialTypeRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialTypeRowChangeEventHandler MaterialTypeRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event MaterialTypeRowChangeEventHandler MaterialTypeRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddMaterialTypeRow(MaterialTypeRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialTypeRow AddMaterialTypeRow(string Title, double DefectedPercent) { MaterialTypeRow rowMaterialTypeRow = ((MaterialTypeRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Title, DefectedPercent}; rowMaterialTypeRow.ItemArray = columnValuesArray; this.Rows.Add(rowMaterialTypeRow); return rowMaterialTypeRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialTypeRow FindByID(int ID) { return ((MaterialTypeRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { MaterialTypeDataTable cln = ((MaterialTypeDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new MaterialTypeDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnTitle = base.Columns["Title"]; this.columnDefectedPercent = base.Columns["DefectedPercent"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnDefectedPercent = new global::System.Data.DataColumn("DefectedPercent", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDefectedPercent); 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.columnTitle.AllowDBNull = false; this.columnTitle.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialTypeRow NewMaterialTypeRow() { return ((MaterialTypeRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new MaterialTypeRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(MaterialTypeRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.MaterialTypeRowChanged != null)) { this.MaterialTypeRowChanged(this, new MaterialTypeRowChangeEvent(((MaterialTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.MaterialTypeRowChanging != null)) { this.MaterialTypeRowChanging(this, new MaterialTypeRowChangeEvent(((MaterialTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.MaterialTypeRowDeleted != null)) { this.MaterialTypeRowDeleted(this, new MaterialTypeRowChangeEvent(((MaterialTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.MaterialTypeRowDeleting != null)) { this.MaterialTypeRowDeleting(this, new MaterialTypeRowChangeEvent(((MaterialTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveMaterialTypeRow(MaterialTypeRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "MaterialTypeDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ProductDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnTitle; private global::System.Data.DataColumn columnProductTypeID; private global::System.Data.DataColumn columnArticleNumber; private global::System.Data.DataColumn columnDescription; private global::System.Data.DataColumn columnImage; private global::System.Data.DataColumn columnProductionPersonCount; private global::System.Data.DataColumn columnProductionWorkshopNumber; private global::System.Data.DataColumn columnMinCostForAgent; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn ProductTypeIDColumn { get { return this.columnProductTypeID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ArticleNumberColumn { get { return this.columnArticleNumber; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn DescriptionColumn { get { return this.columnDescription; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ImageColumn { get { return this.columnImage; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ProductionPersonCountColumn { get { return this.columnProductionPersonCount; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ProductionWorkshopNumberColumn { get { return this.columnProductionWorkshopNumber; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn MinCostForAgentColumn { get { return this.columnMinCostForAgent; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public ProductRow this[int index] { get { return ((ProductRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductRowChangeEventHandler ProductRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductRowChangeEventHandler ProductRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductRowChangeEventHandler ProductRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductRowChangeEventHandler ProductRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public ProductRow AddProductRow(string Title, ProductTypeRow parentProductTypeRowByFK_Product_ProductType, string ArticleNumber, string Description, string Image, int ProductionPersonCount, int ProductionWorkshopNumber, decimal MinCostForAgent) { ProductRow rowProductRow = ((ProductRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Title, null, ArticleNumber, Description, Image, ProductionPersonCount, ProductionWorkshopNumber, MinCostForAgent}; if ((parentProductTypeRowByFK_Product_ProductType != null)) { columnValuesArray[2] = parentProductTypeRowByFK_Product_ProductType[0]; } rowProductRow.ItemArray = columnValuesArray; this.Rows.Add(rowProductRow); return rowProductRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductRow FindByID(int ID) { return ((ProductRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnTitle = base.Columns["Title"]; this.columnProductTypeID = base.Columns["ProductTypeID"]; this.columnArticleNumber = base.Columns["ArticleNumber"]; this.columnDescription = base.Columns["Description"]; this.columnImage = base.Columns["Image"]; this.columnProductionPersonCount = base.Columns["ProductionPersonCount"]; this.columnProductionWorkshopNumber = base.Columns["ProductionWorkshopNumber"]; this.columnMinCostForAgent = base.Columns["MinCostForAgent"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnProductTypeID = new global::System.Data.DataColumn("ProductTypeID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductTypeID); this.columnArticleNumber = new global::System.Data.DataColumn("ArticleNumber", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnArticleNumber); this.columnDescription = new global::System.Data.DataColumn("Description", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDescription); this.columnImage = new global::System.Data.DataColumn("Image", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnImage); this.columnProductionPersonCount = new global::System.Data.DataColumn("ProductionPersonCount", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductionPersonCount); this.columnProductionWorkshopNumber = new global::System.Data.DataColumn("ProductionWorkshopNumber", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductionWorkshopNumber); this.columnMinCostForAgent = new global::System.Data.DataColumn("MinCostForAgent", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMinCostForAgent); 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.columnTitle.AllowDBNull = false; this.columnTitle.MaxLength = 100; this.columnArticleNumber.AllowDBNull = false; this.columnArticleNumber.MaxLength = 10; this.columnDescription.MaxLength = 2147483647; this.columnImage.MaxLength = 100; this.columnMinCostForAgent.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductRow NewProductRow() { return ((ProductRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ProductCostHistoryDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnProductID; private global::System.Data.DataColumn columnChangeDate; private global::System.Data.DataColumn columnCostValue; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductCostHistoryDataTable() { this.TableName = "ProductCostHistory"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductCostHistoryDataTable(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", "16.0.0.0")] protected ProductCostHistoryDataTable(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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn ProductIDColumn { get { return this.columnProductID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ChangeDateColumn { get { return this.columnChangeDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CostValueColumn { get { return this.columnCostValue; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public ProductCostHistoryRow this[int index] { get { return ((ProductCostHistoryRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductCostHistoryRowChangeEventHandler ProductCostHistoryRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductCostHistoryRowChangeEventHandler ProductCostHistoryRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductCostHistoryRowChangeEventHandler ProductCostHistoryRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductCostHistoryRowChangeEventHandler ProductCostHistoryRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddProductCostHistoryRow(ProductCostHistoryRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductCostHistoryRow AddProductCostHistoryRow(ProductRow parentProductRowByFK_ProductCostHistory_Product, System.DateTime ChangeDate, decimal CostValue) { ProductCostHistoryRow rowProductCostHistoryRow = ((ProductCostHistoryRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null, ChangeDate, CostValue}; if ((parentProductRowByFK_ProductCostHistory_Product != null)) { columnValuesArray[1] = parentProductRowByFK_ProductCostHistory_Product[0]; } rowProductCostHistoryRow.ItemArray = columnValuesArray; this.Rows.Add(rowProductCostHistoryRow); return rowProductCostHistoryRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductCostHistoryRow FindByID(int ID) { return ((ProductCostHistoryRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { ProductCostHistoryDataTable cln = ((ProductCostHistoryDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new ProductCostHistoryDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnProductID = base.Columns["ProductID"]; this.columnChangeDate = base.Columns["ChangeDate"]; this.columnCostValue = base.Columns["CostValue"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnProductID = new global::System.Data.DataColumn("ProductID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductID); this.columnChangeDate = new global::System.Data.DataColumn("ChangeDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnChangeDate); this.columnCostValue = new global::System.Data.DataColumn("CostValue", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCostValue); 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.columnProductID.AllowDBNull = false; this.columnChangeDate.AllowDBNull = false; this.columnCostValue.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductCostHistoryRow NewProductCostHistoryRow() { return ((ProductCostHistoryRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new ProductCostHistoryRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(ProductCostHistoryRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ProductCostHistoryRowChanged != null)) { this.ProductCostHistoryRowChanged(this, new ProductCostHistoryRowChangeEvent(((ProductCostHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ProductCostHistoryRowChanging != null)) { this.ProductCostHistoryRowChanging(this, new ProductCostHistoryRowChangeEvent(((ProductCostHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ProductCostHistoryRowDeleted != null)) { this.ProductCostHistoryRowDeleted(this, new ProductCostHistoryRowChangeEvent(((ProductCostHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ProductCostHistoryRowDeleting != null)) { this.ProductCostHistoryRowDeleting(this, new ProductCostHistoryRowChangeEvent(((ProductCostHistoryRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveProductCostHistoryRow(ProductCostHistoryRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "ProductCostHistoryDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ProductMaterialDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnProductID; private global::System.Data.DataColumn columnMaterialID; private global::System.Data.DataColumn columnCount; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductMaterialDataTable() { this.TableName = "ProductMaterial"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductMaterialDataTable(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", "16.0.0.0")] protected ProductMaterialDataTable(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", "16.0.0.0")] public global::System.Data.DataColumn ProductIDColumn { get { return this.columnProductID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn MaterialIDColumn { get { return this.columnMaterialID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CountColumn { get { return this.columnCount; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public ProductMaterialRow this[int index] { get { return ((ProductMaterialRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductMaterialRowChangeEventHandler ProductMaterialRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductMaterialRowChangeEventHandler ProductMaterialRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductMaterialRowChangeEventHandler ProductMaterialRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductMaterialRowChangeEventHandler ProductMaterialRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddProductMaterialRow(ProductMaterialRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductMaterialRow AddProductMaterialRow(ProductRow parentProductRowByFK_ProductMaterial_Product, MaterialRow parentMaterialRowByFK_ProductMaterial_Material, double Count) { ProductMaterialRow rowProductMaterialRow = ((ProductMaterialRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null, Count}; if ((parentProductRowByFK_ProductMaterial_Product != null)) { columnValuesArray[0] = parentProductRowByFK_ProductMaterial_Product[0]; } if ((parentMaterialRowByFK_ProductMaterial_Material != null)) { columnValuesArray[1] = parentMaterialRowByFK_ProductMaterial_Material[0]; } rowProductMaterialRow.ItemArray = columnValuesArray; this.Rows.Add(rowProductMaterialRow); return rowProductMaterialRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductMaterialRow FindByProductIDMaterialID(int ProductID, int MaterialID) { return ((ProductMaterialRow)(this.Rows.Find(new object[] { ProductID, MaterialID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { ProductMaterialDataTable cln = ((ProductMaterialDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new ProductMaterialDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnProductID = base.Columns["ProductID"]; this.columnMaterialID = base.Columns["MaterialID"]; this.columnCount = base.Columns["Count"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitClass() { this.columnProductID = new global::System.Data.DataColumn("ProductID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductID); this.columnMaterialID = new global::System.Data.DataColumn("MaterialID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMaterialID); this.columnCount = new global::System.Data.DataColumn("Count", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCount); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnProductID, this.columnMaterialID}, true)); this.columnProductID.AllowDBNull = false; this.columnMaterialID.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductMaterialRow NewProductMaterialRow() { return ((ProductMaterialRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new ProductMaterialRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(ProductMaterialRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ProductMaterialRowChanged != null)) { this.ProductMaterialRowChanged(this, new ProductMaterialRowChangeEvent(((ProductMaterialRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ProductMaterialRowChanging != null)) { this.ProductMaterialRowChanging(this, new ProductMaterialRowChangeEvent(((ProductMaterialRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ProductMaterialRowDeleted != null)) { this.ProductMaterialRowDeleted(this, new ProductMaterialRowChangeEvent(((ProductMaterialRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ProductMaterialRowDeleting != null)) { this.ProductMaterialRowDeleting(this, new ProductMaterialRowChangeEvent(((ProductMaterialRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveProductMaterialRow(ProductMaterialRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "ProductMaterialDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ProductSaleDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnAgentID; private global::System.Data.DataColumn columnProductID; private global::System.Data.DataColumn columnSaleDate; private global::System.Data.DataColumn columnProductCount; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductSaleDataTable() { this.TableName = "ProductSale"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductSaleDataTable(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", "16.0.0.0")] protected ProductSaleDataTable(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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn AgentIDColumn { get { return this.columnAgentID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ProductIDColumn { get { return this.columnProductID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn SaleDateColumn { get { return this.columnSaleDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ProductCountColumn { get { return this.columnProductCount; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public ProductSaleRow this[int index] { get { return ((ProductSaleRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductSaleRowChangeEventHandler ProductSaleRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductSaleRowChangeEventHandler ProductSaleRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductSaleRowChangeEventHandler ProductSaleRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductSaleRowChangeEventHandler ProductSaleRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddProductSaleRow(ProductSaleRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductSaleRow AddProductSaleRow(AgentRow parentAgentRowByFK_ProductSale_Agent, ProductRow parentProductRowByFK_ProductSale_Product, System.DateTime SaleDate, int ProductCount) { ProductSaleRow rowProductSaleRow = ((ProductSaleRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null, null, SaleDate, ProductCount}; if ((parentAgentRowByFK_ProductSale_Agent != null)) { columnValuesArray[1] = parentAgentRowByFK_ProductSale_Agent[0]; } if ((parentProductRowByFK_ProductSale_Product != null)) { columnValuesArray[2] = parentProductRowByFK_ProductSale_Product[0]; } rowProductSaleRow.ItemArray = columnValuesArray; this.Rows.Add(rowProductSaleRow); return rowProductSaleRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductSaleRow FindByID(int ID) { return ((ProductSaleRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { ProductSaleDataTable cln = ((ProductSaleDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new ProductSaleDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnAgentID = base.Columns["AgentID"]; this.columnProductID = base.Columns["ProductID"]; this.columnSaleDate = base.Columns["SaleDate"]; this.columnProductCount = base.Columns["ProductCount"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnAgentID = new global::System.Data.DataColumn("AgentID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAgentID); this.columnProductID = new global::System.Data.DataColumn("ProductID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductID); this.columnSaleDate = new global::System.Data.DataColumn("SaleDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSaleDate); this.columnProductCount = new global::System.Data.DataColumn("ProductCount", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductCount); 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.columnAgentID.AllowDBNull = false; this.columnProductID.AllowDBNull = false; this.columnSaleDate.AllowDBNull = false; this.columnProductCount.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductSaleRow NewProductSaleRow() { return ((ProductSaleRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new ProductSaleRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(ProductSaleRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ProductSaleRowChanged != null)) { this.ProductSaleRowChanged(this, new ProductSaleRowChangeEvent(((ProductSaleRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ProductSaleRowChanging != null)) { this.ProductSaleRowChanging(this, new ProductSaleRowChangeEvent(((ProductSaleRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ProductSaleRowDeleted != null)) { this.ProductSaleRowDeleted(this, new ProductSaleRowChangeEvent(((ProductSaleRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ProductSaleRowDeleting != null)) { this.ProductSaleRowDeleting(this, new ProductSaleRowChangeEvent(((ProductSaleRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveProductSaleRow(ProductSaleRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "ProductSaleDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ProductTypeDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnTitle; private global::System.Data.DataColumn columnDefectedPercent; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductTypeDataTable() { this.TableName = "ProductType"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductTypeDataTable(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", "16.0.0.0")] protected ProductTypeDataTable(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", "16.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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn DefectedPercentColumn { get { return this.columnDefectedPercent; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public ProductTypeRow this[int index] { get { return ((ProductTypeRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductTypeRowChangeEventHandler ProductTypeRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductTypeRowChangeEventHandler ProductTypeRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductTypeRowChangeEventHandler ProductTypeRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductTypeRowChangeEventHandler ProductTypeRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddProductTypeRow(ProductTypeRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductTypeRow AddProductTypeRow(string Title, double DefectedPercent) { ProductTypeRow rowProductTypeRow = ((ProductTypeRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Title, DefectedPercent}; rowProductTypeRow.ItemArray = columnValuesArray; this.Rows.Add(rowProductTypeRow); return rowProductTypeRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductTypeRow FindByID(int ID) { return ((ProductTypeRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { ProductTypeDataTable cln = ((ProductTypeDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new ProductTypeDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnTitle = base.Columns["Title"]; this.columnDefectedPercent = base.Columns["DefectedPercent"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnDefectedPercent = new global::System.Data.DataColumn("DefectedPercent", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDefectedPercent); 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.columnTitle.AllowDBNull = false; this.columnTitle.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductTypeRow NewProductTypeRow() { return ((ProductTypeRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new ProductTypeRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(ProductTypeRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ProductTypeRowChanged != null)) { this.ProductTypeRowChanged(this, new ProductTypeRowChangeEvent(((ProductTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ProductTypeRowChanging != null)) { this.ProductTypeRowChanging(this, new ProductTypeRowChangeEvent(((ProductTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ProductTypeRowDeleted != null)) { this.ProductTypeRowDeleted(this, new ProductTypeRowChangeEvent(((ProductTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ProductTypeRowDeleting != null)) { this.ProductTypeRowDeleting(this, new ProductTypeRowChangeEvent(((ProductTypeRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveProductTypeRow(ProductTypeRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "ProductTypeDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ShopDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnTitle; private global::System.Data.DataColumn columnAddress; private global::System.Data.DataColumn columnAgentID; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ShopDataTable() { this.TableName = "Shop"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ShopDataTable(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", "16.0.0.0")] protected ShopDataTable(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", "16.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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn AddressColumn { get { return this.columnAddress; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn AgentIDColumn { get { return this.columnAgentID; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public ShopRow this[int index] { get { return ((ShopRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ShopRowChangeEventHandler ShopRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ShopRowChangeEventHandler ShopRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ShopRowChangeEventHandler ShopRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ShopRowChangeEventHandler ShopRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddShopRow(ShopRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ShopRow AddShopRow(string Title, string Address, AgentRow parentAgentRowByFK_Shop_Agent) { ShopRow rowShopRow = ((ShopRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Title, Address, null}; if ((parentAgentRowByFK_Shop_Agent != null)) { columnValuesArray[3] = parentAgentRowByFK_Shop_Agent[0]; } rowShopRow.ItemArray = columnValuesArray; this.Rows.Add(rowShopRow); return rowShopRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ShopRow FindByID(int ID) { return ((ShopRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { ShopDataTable cln = ((ShopDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new ShopDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnTitle = base.Columns["Title"]; this.columnAddress = base.Columns["Address"]; this.columnAgentID = base.Columns["AgentID"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnAddress = new global::System.Data.DataColumn("Address", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAddress); this.columnAgentID = new global::System.Data.DataColumn("AgentID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAgentID); 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.columnTitle.AllowDBNull = false; this.columnTitle.MaxLength = 150; this.columnAddress.MaxLength = 300; this.columnAgentID.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ShopRow NewShopRow() { return ((ShopRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new ShopRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(ShopRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ShopRowChanged != null)) { this.ShopRowChanged(this, new ShopRowChangeEvent(((ShopRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ShopRowChanging != null)) { this.ShopRowChanging(this, new ShopRowChangeEvent(((ShopRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ShopRowDeleted != null)) { this.ShopRowDeleted(this, new ShopRowChangeEvent(((ShopRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ShopRowDeleting != null)) { this.ShopRowDeleting(this, new ShopRowChangeEvent(((ShopRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveShopRow(ShopRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "ShopDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class SupplierDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnTitle; private global::System.Data.DataColumn columnINN; private global::System.Data.DataColumn columnStartDate; private global::System.Data.DataColumn columnQualityRating; private global::System.Data.DataColumn columnSupplierType; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn INNColumn { get { return this.columnINN; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn StartDateColumn { get { return this.columnStartDate; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn QualityRatingColumn { get { return this.columnQualityRating; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn SupplierTypeColumn { get { return this.columnSupplierType; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public SupplierRow this[int index] { get { return ((SupplierRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event SupplierRowChangeEventHandler SupplierRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event SupplierRowChangeEventHandler SupplierRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event SupplierRowChangeEventHandler SupplierRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event SupplierRowChangeEventHandler SupplierRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public SupplierRow AddSupplierRow(string Title, string INN, System.DateTime StartDate, int QualityRating, string SupplierType) { SupplierRow rowSupplierRow = ((SupplierRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, Title, INN, StartDate, QualityRating, SupplierType}; rowSupplierRow.ItemArray = columnValuesArray; this.Rows.Add(rowSupplierRow); return rowSupplierRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnTitle = base.Columns["Title"]; this.columnINN = base.Columns["INN"]; this.columnStartDate = base.Columns["StartDate"]; this.columnQualityRating = base.Columns["QualityRating"]; this.columnSupplierType = base.Columns["SupplierType"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnINN = new global::System.Data.DataColumn("INN", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnINN); this.columnStartDate = new global::System.Data.DataColumn("StartDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnStartDate); this.columnQualityRating = new global::System.Data.DataColumn("QualityRating", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnQualityRating); this.columnSupplierType = new global::System.Data.DataColumn("SupplierType", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnSupplierType); 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.columnTitle.AllowDBNull = false; this.columnTitle.MaxLength = 150; this.columnINN.AllowDBNull = false; this.columnINN.MaxLength = 12; this.columnStartDate.AllowDBNull = false; this.columnSupplierType.MaxLength = 20; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public SupplierRow NewSupplierRow() { return ((SupplierRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ItogSumProductDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnProduct; private global::System.Data.DataColumn columnCost; private global::System.Data.DataColumn columnID; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ItogSumProductDataTable() { this.TableName = "ItogSumProduct"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ItogSumProductDataTable(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", "16.0.0.0")] protected ItogSumProductDataTable(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", "16.0.0.0")] public global::System.Data.DataColumn ProductColumn { get { return this.columnProduct; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CostColumn { get { return this.columnCost; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.0.0.0")] public ItogSumProductRow this[int index] { get { return ((ItogSumProductRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ItogSumProductRowChangeEventHandler ItogSumProductRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ItogSumProductRowChangeEventHandler ItogSumProductRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ItogSumProductRowChangeEventHandler ItogSumProductRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ItogSumProductRowChangeEventHandler ItogSumProductRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddItogSumProductRow(ItogSumProductRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ItogSumProductRow AddItogSumProductRow(string Product, double Cost, int ID) { ItogSumProductRow rowItogSumProductRow = ((ItogSumProductRow)(this.NewRow())); object[] columnValuesArray = new object[] { Product, Cost, ID}; rowItogSumProductRow.ItemArray = columnValuesArray; this.Rows.Add(rowItogSumProductRow); return rowItogSumProductRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ItogSumProductRow FindByID(int ID) { return ((ItogSumProductRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { ItogSumProductDataTable cln = ((ItogSumProductDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new ItogSumProductDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnProduct = base.Columns["Product"]; this.columnCost = base.Columns["Cost"]; this.columnID = base.Columns["ID"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitClass() { this.columnProduct = new global::System.Data.DataColumn("Product", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProduct); this.columnCost = new global::System.Data.DataColumn("Cost", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCost); this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnID); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnID}, true)); this.columnProduct.AllowDBNull = false; this.columnProduct.MaxLength = 100; this.columnID.AllowDBNull = false; this.columnID.Unique = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ItogSumProductRow NewItogSumProductRow() { return ((ItogSumProductRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new ItogSumProductRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(ItogSumProductRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ItogSumProductRowChanged != null)) { this.ItogSumProductRowChanged(this, new ItogSumProductRowChangeEvent(((ItogSumProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ItogSumProductRowChanging != null)) { this.ItogSumProductRowChanging(this, new ItogSumProductRowChangeEvent(((ItogSumProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ItogSumProductRowDeleted != null)) { this.ItogSumProductRowDeleted(this, new ItogSumProductRowChangeEvent(((ItogSumProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ItogSumProductRowDeleting != null)) { this.ItogSumProductRowDeleting(this, new ItogSumProductRowChangeEvent(((ItogSumProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveItogSumProductRow(ItogSumProductRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "ItogSumProductDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ProductsPredDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnTitle; private global::System.Data.DataColumn columnType; private global::System.Data.DataColumn columnCost; private global::System.Data.DataColumn columnArticleNumber; private global::System.Data.DataColumn columnProductionPersonCount; private global::System.Data.DataColumn columnProductionWorkshopNumber; private global::System.Data.DataColumn columnMinCostForAgent; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductsPredDataTable() { this.TableName = "ProductsPred"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductsPredDataTable(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", "16.0.0.0")] protected ProductsPredDataTable(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", "16.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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn TypeColumn { get { return this.columnType; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CostColumn { get { return this.columnCost; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ArticleNumberColumn { get { return this.columnArticleNumber; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ProductionPersonCountColumn { get { return this.columnProductionPersonCount; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ProductionWorkshopNumberColumn { get { return this.columnProductionWorkshopNumber; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn MinCostForAgentColumn { get { return this.columnMinCostForAgent; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public ProductsPredRow this[int index] { get { return ((ProductsPredRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductsPredRowChangeEventHandler ProductsPredRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductsPredRowChangeEventHandler ProductsPredRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductsPredRowChangeEventHandler ProductsPredRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProductsPredRowChangeEventHandler ProductsPredRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddProductsPredRow(ProductsPredRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductsPredRow AddProductsPredRow(int ID, string Title, string Type, double Cost, string ArticleNumber, int ProductionPersonCount, int ProductionWorkshopNumber, decimal MinCostForAgent) { ProductsPredRow rowProductsPredRow = ((ProductsPredRow)(this.NewRow())); object[] columnValuesArray = new object[] { ID, Title, Type, Cost, ArticleNumber, ProductionPersonCount, ProductionWorkshopNumber, MinCostForAgent}; rowProductsPredRow.ItemArray = columnValuesArray; this.Rows.Add(rowProductsPredRow); return rowProductsPredRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductsPredRow FindByID(int ID) { return ((ProductsPredRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { ProductsPredDataTable cln = ((ProductsPredDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new ProductsPredDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnTitle = base.Columns["Title"]; this.columnType = base.Columns["Type"]; this.columnCost = base.Columns["Cost"]; this.columnArticleNumber = base.Columns["ArticleNumber"]; this.columnProductionPersonCount = base.Columns["ProductionPersonCount"]; this.columnProductionWorkshopNumber = base.Columns["ProductionWorkshopNumber"]; this.columnMinCostForAgent = base.Columns["MinCostForAgent"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnType = new global::System.Data.DataColumn("Type", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnType); this.columnCost = new global::System.Data.DataColumn("Cost", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCost); this.columnArticleNumber = new global::System.Data.DataColumn("ArticleNumber", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnArticleNumber); this.columnProductionPersonCount = new global::System.Data.DataColumn("ProductionPersonCount", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductionPersonCount); this.columnProductionWorkshopNumber = new global::System.Data.DataColumn("ProductionWorkshopNumber", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProductionWorkshopNumber); this.columnMinCostForAgent = new global::System.Data.DataColumn("MinCostForAgent", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMinCostForAgent); 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 = 100; this.columnType.AllowDBNull = false; this.columnType.MaxLength = 50; this.columnArticleNumber.AllowDBNull = false; this.columnArticleNumber.MaxLength = 10; this.columnMinCostForAgent.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductsPredRow NewProductsPredRow() { return ((ProductsPredRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new ProductsPredRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(ProductsPredRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ProductsPredRowChanged != null)) { this.ProductsPredRowChanged(this, new ProductsPredRowChangeEvent(((ProductsPredRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ProductsPredRowChanging != null)) { this.ProductsPredRowChanging(this, new ProductsPredRowChangeEvent(((ProductsPredRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ProductsPredRowDeleted != null)) { this.ProductsPredRowDeleted(this, new ProductsPredRowChangeEvent(((ProductsPredRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ProductsPredRowDeleting != null)) { this.ProductsPredRowDeleting(this, new ProductsPredRowChangeEvent(((ProductsPredRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveProductsPredRow(ProductsPredRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "ProductsPredDataTable"; 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; } } /// ///Represents the strongly named DataTable class. /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] public partial class ProizvProductDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnID; private global::System.Data.DataColumn columnProduct; private global::System.Data.DataColumn columnMaterial; private global::System.Data.DataColumn columnCount; private global::System.Data.DataColumn columnCost; private global::System.Data.DataColumn columnProizv; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProizvProductDataTable() { this.TableName = "ProizvProduct"; this.BeginInit(); this.InitClass(); this.EndInit(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProizvProductDataTable(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", "16.0.0.0")] protected ProizvProductDataTable(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", "16.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", "16.0.0.0")] public global::System.Data.DataColumn ProductColumn { get { return this.columnProduct; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn MaterialColumn { get { return this.columnMaterial; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CountColumn { get { return this.columnCount; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CostColumn { get { return this.columnCost; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn ProizvColumn { get { return this.columnProizv; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public ProizvProductRow this[int index] { get { return ((ProizvProductRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProizvProductRowChangeEventHandler ProizvProductRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProizvProductRowChangeEventHandler ProizvProductRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProizvProductRowChangeEventHandler ProizvProductRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public event ProizvProductRowChangeEventHandler ProizvProductRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void AddProizvProductRow(ProizvProductRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProizvProductRow AddProizvProductRow(int ID, string Product, string Material, double Count, decimal Cost, double Proizv) { ProizvProductRow rowProizvProductRow = ((ProizvProductRow)(this.NewRow())); object[] columnValuesArray = new object[] { ID, Product, Material, Count, Cost, Proizv}; rowProizvProductRow.ItemArray = columnValuesArray; this.Rows.Add(rowProizvProductRow); return rowProizvProductRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProizvProductRow FindByID(int ID) { return ((ProizvProductRow)(this.Rows.Find(new object[] { ID}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public override global::System.Data.DataTable Clone() { ProizvProductDataTable cln = ((ProizvProductDataTable)(base.Clone())); cln.InitVars(); return cln; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { return new ProizvProductDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnID = base.Columns["ID"]; this.columnProduct = base.Columns["Product"]; this.columnMaterial = base.Columns["Material"]; this.columnCount = base.Columns["Count"]; this.columnCost = base.Columns["Cost"]; this.columnProizv = base.Columns["Proizv"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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.columnProduct = new global::System.Data.DataColumn("Product", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProduct); this.columnMaterial = new global::System.Data.DataColumn("Material", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMaterial); this.columnCount = new global::System.Data.DataColumn("Count", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCount); this.columnCost = new global::System.Data.DataColumn("Cost", typeof(decimal), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCost); this.columnProizv = new global::System.Data.DataColumn("Proizv", typeof(double), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnProizv); 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.columnProduct.AllowDBNull = false; this.columnProduct.MaxLength = 100; this.columnMaterial.AllowDBNull = false; this.columnMaterial.MaxLength = 100; this.columnCost.AllowDBNull = false; this.columnProizv.ReadOnly = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProizvProductRow NewProizvProductRow() { return ((ProizvProductRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { return new ProizvProductRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override global::System.Type GetRowType() { return typeof(ProizvProductRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); if ((this.ProizvProductRowChanged != null)) { this.ProizvProductRowChanged(this, new ProizvProductRowChangeEvent(((ProizvProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); if ((this.ProizvProductRowChanging != null)) { this.ProizvProductRowChanging(this, new ProizvProductRowChangeEvent(((ProizvProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); if ((this.ProizvProductRowDeleted != null)) { this.ProizvProductRowDeleted(this, new ProizvProductRowChangeEvent(((ProizvProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); if ((this.ProizvProductRowDeleting != null)) { this.ProizvProductRowDeleting(this, new ProizvProductRowChangeEvent(((ProizvProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void RemoveProizvProductRow(ProizvProductRow row) { this.Rows.Remove(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(); TestWSR4DataSet ds = new TestWSR4DataSet(); 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 = "ProizvProductDataTable"; 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; } } /// ///Represents strongly named DataRow class. /// public partial class AgentRow : global::System.Data.DataRow { private AgentDataTable tableAgent; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal AgentRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableAgent = ((AgentDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableAgent.IDColumn])); } set { this[this.tableAgent.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Title { get { return ((string)(this[this.tableAgent.TitleColumn])); } set { this[this.tableAgent.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int AgentTypeID { get { return ((int)(this[this.tableAgent.AgentTypeIDColumn])); } set { this[this.tableAgent.AgentTypeIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Address { get { try { return ((string)(this[this.tableAgent.AddressColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Address\' в таблице \'Agent\' равно DBNull.", e); } } set { this[this.tableAgent.AddressColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string INN { get { return ((string)(this[this.tableAgent.INNColumn])); } set { this[this.tableAgent.INNColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string KPP { get { try { return ((string)(this[this.tableAgent.KPPColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'KPP\' в таблице \'Agent\' равно DBNull.", e); } } set { this[this.tableAgent.KPPColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string DirectorName { get { try { return ((string)(this[this.tableAgent.DirectorNameColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'DirectorName\' в таблице \'Agent\' равно DBNull.", e); } } set { this[this.tableAgent.DirectorNameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Phone { get { return ((string)(this[this.tableAgent.PhoneColumn])); } set { this[this.tableAgent.PhoneColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Email { get { try { return ((string)(this[this.tableAgent.EmailColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Email\' в таблице \'Agent\' равно DBNull.", e); } } set { this[this.tableAgent.EmailColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Logo { get { try { return ((string)(this[this.tableAgent.LogoColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Logo\' в таблице \'Agent\' равно DBNull.", e); } } set { this[this.tableAgent.LogoColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int Priority { get { return ((int)(this[this.tableAgent.PriorityColumn])); } set { this[this.tableAgent.PriorityColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentTypeRow AgentTypeRow { get { return ((AgentTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_Agent_AgentType"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Agent_AgentType"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsAddressNull() { return this.IsNull(this.tableAgent.AddressColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetAddressNull() { this[this.tableAgent.AddressColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsKPPNull() { return this.IsNull(this.tableAgent.KPPColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetKPPNull() { this[this.tableAgent.KPPColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsDirectorNameNull() { return this.IsNull(this.tableAgent.DirectorNameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetDirectorNameNull() { this[this.tableAgent.DirectorNameColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsEmailNull() { return this.IsNull(this.tableAgent.EmailColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetEmailNull() { this[this.tableAgent.EmailColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsLogoNull() { return this.IsNull(this.tableAgent.LogoColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetLogoNull() { this[this.tableAgent.LogoColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentPriorityHistoryRow[] GetAgentPriorityHistoryRows() { if ((this.Table.ChildRelations["FK_AgentPriorityHistory_Agent"] == null)) { return new AgentPriorityHistoryRow[0]; } else { return ((AgentPriorityHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_AgentPriorityHistory_Agent"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductSaleRow[] GetProductSaleRows() { if ((this.Table.ChildRelations["FK_ProductSale_Agent"] == null)) { return new ProductSaleRow[0]; } else { return ((ProductSaleRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductSale_Agent"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ShopRow[] GetShopRows() { if ((this.Table.ChildRelations["FK_Shop_Agent"] == null)) { return new ShopRow[0]; } else { return ((ShopRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Shop_Agent"]))); } } } /// ///Represents strongly named DataRow class. /// public partial class AgentPriorityHistoryRow : global::System.Data.DataRow { private AgentPriorityHistoryDataTable tableAgentPriorityHistory; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal AgentPriorityHistoryRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableAgentPriorityHistory = ((AgentPriorityHistoryDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableAgentPriorityHistory.IDColumn])); } set { this[this.tableAgentPriorityHistory.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int AgentID { get { return ((int)(this[this.tableAgentPriorityHistory.AgentIDColumn])); } set { this[this.tableAgentPriorityHistory.AgentIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public System.DateTime ChangeDate { get { return ((global::System.DateTime)(this[this.tableAgentPriorityHistory.ChangeDateColumn])); } set { this[this.tableAgentPriorityHistory.ChangeDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int PriorityValue { get { return ((int)(this[this.tableAgentPriorityHistory.PriorityValueColumn])); } set { this[this.tableAgentPriorityHistory.PriorityValueColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentRow AgentRow { get { return ((AgentRow)(this.GetParentRow(this.Table.ParentRelations["FK_AgentPriorityHistory_Agent"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_AgentPriorityHistory_Agent"]); } } } /// ///Represents strongly named DataRow class. /// public partial class AgentTypeRow : global::System.Data.DataRow { private AgentTypeDataTable tableAgentType; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal AgentTypeRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableAgentType = ((AgentTypeDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableAgentType.IDColumn])); } set { this[this.tableAgentType.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Title { get { return ((string)(this[this.tableAgentType.TitleColumn])); } set { this[this.tableAgentType.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Image { get { try { return ((string)(this[this.tableAgentType.ImageColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Image\' в таблице \'AgentType\' равно DBNull.", e); } } set { this[this.tableAgentType.ImageColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsImageNull() { return this.IsNull(this.tableAgentType.ImageColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetImageNull() { this[this.tableAgentType.ImageColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentRow[] GetAgentRows() { if ((this.Table.ChildRelations["FK_Agent_AgentType"] == null)) { return new AgentRow[0]; } else { return ((AgentRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Agent_AgentType"]))); } } } /// ///Represents strongly named DataRow class. /// public partial class MaterialRow : global::System.Data.DataRow { private MaterialDataTable tableMaterial; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal MaterialRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableMaterial = ((MaterialDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableMaterial.IDColumn])); } set { this[this.tableMaterial.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Title { get { return ((string)(this[this.tableMaterial.TitleColumn])); } set { this[this.tableMaterial.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int CountInPack { get { return ((int)(this[this.tableMaterial.CountInPackColumn])); } set { this[this.tableMaterial.CountInPackColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Unit { get { return ((string)(this[this.tableMaterial.UnitColumn])); } set { this[this.tableMaterial.UnitColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double CountInStock { get { try { return ((double)(this[this.tableMaterial.CountInStockColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'CountInStock\' в таблице \'Material\' равно DBNull.", e); } } set { this[this.tableMaterial.CountInStockColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double MinCount { get { return ((double)(this[this.tableMaterial.MinCountColumn])); } set { this[this.tableMaterial.MinCountColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Description { get { try { return ((string)(this[this.tableMaterial.DescriptionColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Description\' в таблице \'Material\' равно DBNull.", e); } } set { this[this.tableMaterial.DescriptionColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public decimal Cost { get { return ((decimal)(this[this.tableMaterial.CostColumn])); } set { this[this.tableMaterial.CostColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Image { get { try { return ((string)(this[this.tableMaterial.ImageColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Image\' в таблице \'Material\' равно DBNull.", e); } } set { this[this.tableMaterial.ImageColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int MaterialTypeID { get { return ((int)(this[this.tableMaterial.MaterialTypeIDColumn])); } set { this[this.tableMaterial.MaterialTypeIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialTypeRow MaterialTypeRow { get { return ((MaterialTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_Material_MaterialType"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Material_MaterialType"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsCountInStockNull() { return this.IsNull(this.tableMaterial.CountInStockColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetCountInStockNull() { this[this.tableMaterial.CountInStockColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsDescriptionNull() { return this.IsNull(this.tableMaterial.DescriptionColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetDescriptionNull() { this[this.tableMaterial.DescriptionColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsImageNull() { return this.IsNull(this.tableMaterial.ImageColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetImageNull() { this[this.tableMaterial.ImageColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialCountHistoryRow[] GetMaterialCountHistoryRows() { if ((this.Table.ChildRelations["FK_MaterialCountHistory_Material"] == null)) { return new MaterialCountHistoryRow[0]; } else { return ((MaterialCountHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_MaterialCountHistory_Material"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialSupplierRow[] GetMaterialSupplierRows() { if ((this.Table.ChildRelations["FK_MaterialSupplier_Material"] == null)) { return new MaterialSupplierRow[0]; } else { return ((MaterialSupplierRow[])(base.GetChildRows(this.Table.ChildRelations["FK_MaterialSupplier_Material"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductMaterialRow[] GetProductMaterialRows() { if ((this.Table.ChildRelations["FK_ProductMaterial_Material"] == null)) { return new ProductMaterialRow[0]; } else { return ((ProductMaterialRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductMaterial_Material"]))); } } } /// ///Represents strongly named DataRow class. /// public partial class MaterialCountHistoryRow : global::System.Data.DataRow { private MaterialCountHistoryDataTable tableMaterialCountHistory; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal MaterialCountHistoryRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableMaterialCountHistory = ((MaterialCountHistoryDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableMaterialCountHistory.IDColumn])); } set { this[this.tableMaterialCountHistory.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int MaterialID { get { return ((int)(this[this.tableMaterialCountHistory.MaterialIDColumn])); } set { this[this.tableMaterialCountHistory.MaterialIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public System.DateTime ChangeDate { get { return ((global::System.DateTime)(this[this.tableMaterialCountHistory.ChangeDateColumn])); } set { this[this.tableMaterialCountHistory.ChangeDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double CountValue { get { return ((double)(this[this.tableMaterialCountHistory.CountValueColumn])); } set { this[this.tableMaterialCountHistory.CountValueColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialRow MaterialRow { get { return ((MaterialRow)(this.GetParentRow(this.Table.ParentRelations["FK_MaterialCountHistory_Material"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_MaterialCountHistory_Material"]); } } } /// ///Represents strongly named DataRow class. /// public partial class MaterialSupplierRow : global::System.Data.DataRow { private MaterialSupplierDataTable tableMaterialSupplier; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal MaterialSupplierRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableMaterialSupplier = ((MaterialSupplierDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int MaterialID { get { return ((int)(this[this.tableMaterialSupplier.MaterialIDColumn])); } set { this[this.tableMaterialSupplier.MaterialIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int SupplierID { get { return ((int)(this[this.tableMaterialSupplier.SupplierIDColumn])); } set { this[this.tableMaterialSupplier.SupplierIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialRow MaterialRow { get { return ((MaterialRow)(this.GetParentRow(this.Table.ParentRelations["FK_MaterialSupplier_Material"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_MaterialSupplier_Material"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public SupplierRow SupplierRow { get { return ((SupplierRow)(this.GetParentRow(this.Table.ParentRelations["FK_MaterialSupplier_Supplier"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_MaterialSupplier_Supplier"]); } } } /// ///Represents strongly named DataRow class. /// public partial class MaterialTypeRow : global::System.Data.DataRow { private MaterialTypeDataTable tableMaterialType; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal MaterialTypeRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableMaterialType = ((MaterialTypeDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableMaterialType.IDColumn])); } set { this[this.tableMaterialType.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Title { get { return ((string)(this[this.tableMaterialType.TitleColumn])); } set { this[this.tableMaterialType.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double DefectedPercent { get { try { return ((double)(this[this.tableMaterialType.DefectedPercentColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'DefectedPercent\' в таблице \'MaterialType\' равно DBNull.", e); } } set { this[this.tableMaterialType.DefectedPercentColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsDefectedPercentNull() { return this.IsNull(this.tableMaterialType.DefectedPercentColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetDefectedPercentNull() { this[this.tableMaterialType.DefectedPercentColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialRow[] GetMaterialRows() { if ((this.Table.ChildRelations["FK_Material_MaterialType"] == null)) { return new MaterialRow[0]; } else { return ((MaterialRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Material_MaterialType"]))); } } } /// ///Represents strongly named DataRow class. /// public partial class ProductRow : global::System.Data.DataRow { private ProductDataTable tableProduct; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableProduct.IDColumn])); } set { this[this.tableProduct.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Title { get { return ((string)(this[this.tableProduct.TitleColumn])); } set { this[this.tableProduct.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ProductTypeID { get { try { return ((int)(this[this.tableProduct.ProductTypeIDColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'ProductTypeID\' в таблице \'Product\' равно DBNull.", e); } } set { this[this.tableProduct.ProductTypeIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string ArticleNumber { get { return ((string)(this[this.tableProduct.ArticleNumberColumn])); } set { this[this.tableProduct.ArticleNumberColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Description { get { try { return ((string)(this[this.tableProduct.DescriptionColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Description\' в таблице \'Product\' равно DBNull.", e); } } set { this[this.tableProduct.DescriptionColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Image { get { try { return ((string)(this[this.tableProduct.ImageColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Image\' в таблице \'Product\' равно DBNull.", e); } } set { this[this.tableProduct.ImageColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ProductionPersonCount { get { try { return ((int)(this[this.tableProduct.ProductionPersonCountColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'ProductionPersonCount\' в таблице \'Product\' равно DBNull.", e); } } set { this[this.tableProduct.ProductionPersonCountColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ProductionWorkshopNumber { get { try { return ((int)(this[this.tableProduct.ProductionWorkshopNumberColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'ProductionWorkshopNumber\' в таблице \'Product\' равно DBNull." + "", e); } } set { this[this.tableProduct.ProductionWorkshopNumberColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public decimal MinCostForAgent { get { return ((decimal)(this[this.tableProduct.MinCostForAgentColumn])); } set { this[this.tableProduct.MinCostForAgentColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductTypeRow ProductTypeRow { get { return ((ProductTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_Product_ProductType"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Product_ProductType"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsProductTypeIDNull() { return this.IsNull(this.tableProduct.ProductTypeIDColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetProductTypeIDNull() { this[this.tableProduct.ProductTypeIDColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsDescriptionNull() { return this.IsNull(this.tableProduct.DescriptionColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetDescriptionNull() { this[this.tableProduct.DescriptionColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsImageNull() { return this.IsNull(this.tableProduct.ImageColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetImageNull() { this[this.tableProduct.ImageColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsProductionPersonCountNull() { return this.IsNull(this.tableProduct.ProductionPersonCountColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetProductionPersonCountNull() { this[this.tableProduct.ProductionPersonCountColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsProductionWorkshopNumberNull() { return this.IsNull(this.tableProduct.ProductionWorkshopNumberColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetProductionWorkshopNumberNull() { this[this.tableProduct.ProductionWorkshopNumberColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductCostHistoryRow[] GetProductCostHistoryRows() { if ((this.Table.ChildRelations["FK_ProductCostHistory_Product"] == null)) { return new ProductCostHistoryRow[0]; } else { return ((ProductCostHistoryRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductCostHistory_Product"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductMaterialRow[] GetProductMaterialRows() { if ((this.Table.ChildRelations["FK_ProductMaterial_Product"] == null)) { return new ProductMaterialRow[0]; } else { return ((ProductMaterialRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductMaterial_Product"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductSaleRow[] GetProductSaleRows() { if ((this.Table.ChildRelations["FK_ProductSale_Product"] == null)) { return new ProductSaleRow[0]; } else { return ((ProductSaleRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductSale_Product"]))); } } } /// ///Represents strongly named DataRow class. /// public partial class ProductCostHistoryRow : global::System.Data.DataRow { private ProductCostHistoryDataTable tableProductCostHistory; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductCostHistoryRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableProductCostHistory = ((ProductCostHistoryDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableProductCostHistory.IDColumn])); } set { this[this.tableProductCostHistory.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ProductID { get { return ((int)(this[this.tableProductCostHistory.ProductIDColumn])); } set { this[this.tableProductCostHistory.ProductIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public System.DateTime ChangeDate { get { return ((global::System.DateTime)(this[this.tableProductCostHistory.ChangeDateColumn])); } set { this[this.tableProductCostHistory.ChangeDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public decimal CostValue { get { return ((decimal)(this[this.tableProductCostHistory.CostValueColumn])); } set { this[this.tableProductCostHistory.CostValueColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductRow ProductRow { get { return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductCostHistory_Product"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_ProductCostHistory_Product"]); } } } /// ///Represents strongly named DataRow class. /// public partial class ProductMaterialRow : global::System.Data.DataRow { private ProductMaterialDataTable tableProductMaterial; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductMaterialRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableProductMaterial = ((ProductMaterialDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ProductID { get { return ((int)(this[this.tableProductMaterial.ProductIDColumn])); } set { this[this.tableProductMaterial.ProductIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int MaterialID { get { return ((int)(this[this.tableProductMaterial.MaterialIDColumn])); } set { this[this.tableProductMaterial.MaterialIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double Count { get { try { return ((double)(this[this.tableProductMaterial.CountColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Count\' в таблице \'ProductMaterial\' равно DBNull.", e); } } set { this[this.tableProductMaterial.CountColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialRow MaterialRow { get { return ((MaterialRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductMaterial_Material"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_ProductMaterial_Material"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductRow ProductRow { get { return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductMaterial_Product"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_ProductMaterial_Product"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsCountNull() { return this.IsNull(this.tableProductMaterial.CountColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetCountNull() { this[this.tableProductMaterial.CountColumn] = global::System.Convert.DBNull; } } /// ///Represents strongly named DataRow class. /// public partial class ProductSaleRow : global::System.Data.DataRow { private ProductSaleDataTable tableProductSale; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductSaleRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableProductSale = ((ProductSaleDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableProductSale.IDColumn])); } set { this[this.tableProductSale.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int AgentID { get { return ((int)(this[this.tableProductSale.AgentIDColumn])); } set { this[this.tableProductSale.AgentIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ProductID { get { return ((int)(this[this.tableProductSale.ProductIDColumn])); } set { this[this.tableProductSale.ProductIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public System.DateTime SaleDate { get { return ((global::System.DateTime)(this[this.tableProductSale.SaleDateColumn])); } set { this[this.tableProductSale.SaleDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ProductCount { get { return ((int)(this[this.tableProductSale.ProductCountColumn])); } set { this[this.tableProductSale.ProductCountColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentRow AgentRow { get { return ((AgentRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductSale_Agent"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_ProductSale_Agent"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductRow ProductRow { get { return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductSale_Product"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_ProductSale_Product"]); } } } /// ///Represents strongly named DataRow class. /// public partial class ProductTypeRow : global::System.Data.DataRow { private ProductTypeDataTable tableProductType; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductTypeRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableProductType = ((ProductTypeDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableProductType.IDColumn])); } set { this[this.tableProductType.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Title { get { return ((string)(this[this.tableProductType.TitleColumn])); } set { this[this.tableProductType.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double DefectedPercent { get { try { return ((double)(this[this.tableProductType.DefectedPercentColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'DefectedPercent\' в таблице \'ProductType\' равно DBNull.", e); } } set { this[this.tableProductType.DefectedPercentColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsDefectedPercentNull() { return this.IsNull(this.tableProductType.DefectedPercentColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetDefectedPercentNull() { this[this.tableProductType.DefectedPercentColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductRow[] GetProductRows() { if ((this.Table.ChildRelations["FK_Product_ProductType"] == null)) { return new ProductRow[0]; } else { return ((ProductRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Product_ProductType"]))); } } } /// ///Represents strongly named DataRow class. /// public partial class ShopRow : global::System.Data.DataRow { private ShopDataTable tableShop; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ShopRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableShop = ((ShopDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableShop.IDColumn])); } set { this[this.tableShop.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Title { get { return ((string)(this[this.tableShop.TitleColumn])); } set { this[this.tableShop.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Address { get { try { return ((string)(this[this.tableShop.AddressColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Address\' в таблице \'Shop\' равно DBNull.", e); } } set { this[this.tableShop.AddressColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int AgentID { get { return ((int)(this[this.tableShop.AgentIDColumn])); } set { this[this.tableShop.AgentIDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentRow AgentRow { get { return ((AgentRow)(this.GetParentRow(this.Table.ParentRelations["FK_Shop_Agent"]))); } set { this.SetParentRow(value, this.Table.ParentRelations["FK_Shop_Agent"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsAddressNull() { return this.IsNull(this.tableShop.AddressColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetAddressNull() { this[this.tableShop.AddressColumn] = global::System.Convert.DBNull; } } /// ///Represents strongly named DataRow class. /// public partial class SupplierRow : global::System.Data.DataRow { private SupplierDataTable tableSupplier; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.0.0.0")] public string Title { get { return ((string)(this[this.tableSupplier.TitleColumn])); } set { this[this.tableSupplier.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string INN { get { return ((string)(this[this.tableSupplier.INNColumn])); } set { this[this.tableSupplier.INNColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public System.DateTime StartDate { get { return ((global::System.DateTime)(this[this.tableSupplier.StartDateColumn])); } set { this[this.tableSupplier.StartDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int QualityRating { get { try { return ((int)(this[this.tableSupplier.QualityRatingColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'QualityRating\' в таблице \'Supplier\' равно DBNull.", e); } } set { this[this.tableSupplier.QualityRatingColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string SupplierType { get { try { return ((string)(this[this.tableSupplier.SupplierTypeColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'SupplierType\' в таблице \'Supplier\' равно DBNull.", e); } } set { this[this.tableSupplier.SupplierTypeColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsQualityRatingNull() { return this.IsNull(this.tableSupplier.QualityRatingColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetQualityRatingNull() { this[this.tableSupplier.QualityRatingColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsSupplierTypeNull() { return this.IsNull(this.tableSupplier.SupplierTypeColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetSupplierTypeNull() { this[this.tableSupplier.SupplierTypeColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialSupplierRow[] GetMaterialSupplierRows() { if ((this.Table.ChildRelations["FK_MaterialSupplier_Supplier"] == null)) { return new MaterialSupplierRow[0]; } else { return ((MaterialSupplierRow[])(base.GetChildRows(this.Table.ChildRelations["FK_MaterialSupplier_Supplier"]))); } } } /// ///Represents strongly named DataRow class. /// public partial class ItogSumProductRow : global::System.Data.DataRow { private ItogSumProductDataTable tableItogSumProduct; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ItogSumProductRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableItogSumProduct = ((ItogSumProductDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Product { get { return ((string)(this[this.tableItogSumProduct.ProductColumn])); } set { this[this.tableItogSumProduct.ProductColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double Cost { get { try { return ((double)(this[this.tableItogSumProduct.CostColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Cost\' в таблице \'ItogSumProduct\' равно DBNull.", e); } } set { this[this.tableItogSumProduct.CostColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableItogSumProduct.IDColumn])); } set { this[this.tableItogSumProduct.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsCostNull() { return this.IsNull(this.tableItogSumProduct.CostColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetCostNull() { this[this.tableItogSumProduct.CostColumn] = global::System.Convert.DBNull; } } /// ///Represents strongly named DataRow class. /// public partial class ProductsPredRow : global::System.Data.DataRow { private ProductsPredDataTable tableProductsPred; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProductsPredRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableProductsPred = ((ProductsPredDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableProductsPred.IDColumn])); } set { this[this.tableProductsPred.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Title { get { return ((string)(this[this.tableProductsPred.TitleColumn])); } set { this[this.tableProductsPred.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Type { get { return ((string)(this[this.tableProductsPred.TypeColumn])); } set { this[this.tableProductsPred.TypeColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double Cost { get { try { return ((double)(this[this.tableProductsPred.CostColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Cost\' в таблице \'ProductsPred\' равно DBNull.", e); } } set { this[this.tableProductsPred.CostColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string ArticleNumber { get { return ((string)(this[this.tableProductsPred.ArticleNumberColumn])); } set { this[this.tableProductsPred.ArticleNumberColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ProductionPersonCount { get { try { return ((int)(this[this.tableProductsPred.ProductionPersonCountColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'ProductionPersonCount\' в таблице \'ProductsPred\' равно DBNul" + "l.", e); } } set { this[this.tableProductsPred.ProductionPersonCountColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ProductionWorkshopNumber { get { try { return ((int)(this[this.tableProductsPred.ProductionWorkshopNumberColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'ProductionWorkshopNumber\' в таблице \'ProductsPred\' равно DB" + "Null.", e); } } set { this[this.tableProductsPred.ProductionWorkshopNumberColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public decimal MinCostForAgent { get { return ((decimal)(this[this.tableProductsPred.MinCostForAgentColumn])); } set { this[this.tableProductsPred.MinCostForAgentColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsCostNull() { return this.IsNull(this.tableProductsPred.CostColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetCostNull() { this[this.tableProductsPred.CostColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsProductionPersonCountNull() { return this.IsNull(this.tableProductsPred.ProductionPersonCountColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetProductionPersonCountNull() { this[this.tableProductsPred.ProductionPersonCountColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsProductionWorkshopNumberNull() { return this.IsNull(this.tableProductsPred.ProductionWorkshopNumberColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetProductionWorkshopNumberNull() { this[this.tableProductsPred.ProductionWorkshopNumberColumn] = global::System.Convert.DBNull; } } /// ///Represents strongly named DataRow class. /// public partial class ProizvProductRow : global::System.Data.DataRow { private ProizvProductDataTable tableProizvProduct; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal ProizvProductRow(global::System.Data.DataRowBuilder rb) : base(rb) { this.tableProizvProduct = ((ProizvProductDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int ID { get { return ((int)(this[this.tableProizvProduct.IDColumn])); } set { this[this.tableProizvProduct.IDColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Product { get { return ((string)(this[this.tableProizvProduct.ProductColumn])); } set { this[this.tableProizvProduct.ProductColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public string Material { get { return ((string)(this[this.tableProizvProduct.MaterialColumn])); } set { this[this.tableProizvProduct.MaterialColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double Count { get { try { return ((double)(this[this.tableProizvProduct.CountColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Count\' в таблице \'ProizvProduct\' равно DBNull.", e); } } set { this[this.tableProizvProduct.CountColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public decimal Cost { get { return ((decimal)(this[this.tableProizvProduct.CostColumn])); } set { this[this.tableProizvProduct.CostColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public double Proizv { get { try { return ((double)(this[this.tableProizvProduct.ProizvColumn])); } catch (global::System.InvalidCastException e) { throw new global::System.Data.StrongTypingException("Значение для столбца \'Proizv\' в таблице \'ProizvProduct\' равно DBNull.", e); } } set { this[this.tableProizvProduct.ProizvColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsCountNull() { return this.IsNull(this.tableProizvProduct.CountColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetCountNull() { this[this.tableProizvProduct.CountColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsProizvNull() { return this.IsNull(this.tableProizvProduct.ProizvColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public void SetProizvNull() { this[this.tableProizvProduct.ProizvColumn] = global::System.Convert.DBNull; } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class AgentRowChangeEvent : global::System.EventArgs { private AgentRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentRowChangeEvent(AgentRow 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", "16.0.0.0")] public AgentRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class AgentPriorityHistoryRowChangeEvent : global::System.EventArgs { private AgentPriorityHistoryRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentPriorityHistoryRowChangeEvent(AgentPriorityHistoryRow 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", "16.0.0.0")] public AgentPriorityHistoryRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class AgentTypeRowChangeEvent : global::System.EventArgs { private AgentTypeRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AgentTypeRowChangeEvent(AgentTypeRow 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", "16.0.0.0")] public AgentTypeRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class MaterialRowChangeEvent : global::System.EventArgs { private MaterialRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialRowChangeEvent(MaterialRow 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", "16.0.0.0")] public MaterialRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class MaterialCountHistoryRowChangeEvent : global::System.EventArgs { private MaterialCountHistoryRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialCountHistoryRowChangeEvent(MaterialCountHistoryRow 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", "16.0.0.0")] public MaterialCountHistoryRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class MaterialSupplierRowChangeEvent : global::System.EventArgs { private MaterialSupplierRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialSupplierRowChangeEvent(MaterialSupplierRow 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", "16.0.0.0")] public MaterialSupplierRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class MaterialTypeRowChangeEvent : global::System.EventArgs { private MaterialTypeRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public MaterialTypeRowChangeEvent(MaterialTypeRow 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", "16.0.0.0")] public MaterialTypeRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.0.0.0")] public ProductRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class ProductCostHistoryRowChangeEvent : global::System.EventArgs { private ProductCostHistoryRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductCostHistoryRowChangeEvent(ProductCostHistoryRow 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", "16.0.0.0")] public ProductCostHistoryRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class ProductMaterialRowChangeEvent : global::System.EventArgs { private ProductMaterialRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductMaterialRowChangeEvent(ProductMaterialRow 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", "16.0.0.0")] public ProductMaterialRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class ProductSaleRowChangeEvent : global::System.EventArgs { private ProductSaleRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductSaleRowChangeEvent(ProductSaleRow 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", "16.0.0.0")] public ProductSaleRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class ProductTypeRowChangeEvent : global::System.EventArgs { private ProductTypeRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductTypeRowChangeEvent(ProductTypeRow 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", "16.0.0.0")] public ProductTypeRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class ShopRowChangeEvent : global::System.EventArgs { private ShopRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ShopRowChangeEvent(ShopRow 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", "16.0.0.0")] public ShopRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.0.0.0")] public SupplierRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class ItogSumProductRowChangeEvent : global::System.EventArgs { private ItogSumProductRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ItogSumProductRowChangeEvent(ItogSumProductRow 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", "16.0.0.0")] public ItogSumProductRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class ProductsPredRowChangeEvent : global::System.EventArgs { private ProductsPredRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProductsPredRowChangeEvent(ProductsPredRow 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", "16.0.0.0")] public ProductsPredRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } /// ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public class ProizvProductRowChangeEvent : global::System.EventArgs { private ProizvProductRow eventRow; private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ProizvProductRowChangeEvent(ProizvProductRow 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", "16.0.0.0")] public ProizvProductRow Row { get { return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataRowAction Action { get { return this.eventAction; } } } } } namespace TestWSR4.TestWSR4DataSetTableAdapters { /// ///Represents the connection and commands used to retrieve and save data. /// [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 AgentTableAdapter : 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", "16.0.0.0")] public AgentTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "Agent"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("Title", "Title"); tableMapping.ColumnMappings.Add("AgentTypeID", "AgentTypeID"); tableMapping.ColumnMappings.Add("Address", "Address"); tableMapping.ColumnMappings.Add("INN", "INN"); tableMapping.ColumnMappings.Add("KPP", "KPP"); tableMapping.ColumnMappings.Add("DirectorName", "DirectorName"); tableMapping.ColumnMappings.Add("Phone", "Phone"); tableMapping.ColumnMappings.Add("Email", "Email"); tableMapping.ColumnMappings.Add("Logo", "Logo"); tableMapping.ColumnMappings.Add("Priority", "Priority"); 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].[Agent] WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([AgentTypeID] = @Original_AgentTypeID) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ([INN] = @Original_INN) AND ((@IsNull_KPP = 1 AND [KPP] IS NULL) OR ([KPP] = @Original_KPP)) AND ((@IsNull_DirectorName = 1 AND [DirectorName] IS NULL) OR ([DirectorName] = @Original_DirectorName)) AND ([Phone] = @Original_Phone) AND ((@IsNull_Email = 1 AND [Email] IS NULL) OR ([Email] = @Original_Email)) AND ((@IsNull_Logo = 1 AND [Logo] IS NULL) OR ([Logo] = @Original_Logo)) AND ([Priority] = @Original_Priority))"; 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.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_KPP", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DirectorName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Email", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Logo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", 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].[Agent] ([Title], [AgentTypeID], [Address], [INN], [KPP], [DirectorName], [Phone], [Email], [Logo], [Priority]) VALUES (@Title, @AgentTypeID, @Address, @INN, @KPP, @DirectorName, @Phone, @Email, @Logo, @Priority); SELECT ID, Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority FROM Agent WHERE (ID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 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.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", 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].[Agent] SET [Title] = @Title, [AgentTypeID] = @AgentTypeID, [Address] = @Address, [INN] = @INN, [KPP] = @KPP, [DirectorName] = @DirectorName, [Phone] = @Phone, [Email] = @Email, [Logo] = @Logo, [Priority] = @Priority WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([AgentTypeID] = @Original_AgentTypeID) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ([INN] = @Original_INN) AND ((@IsNull_KPP = 1 AND [KPP] IS NULL) OR ([KPP] = @Original_KPP)) AND ((@IsNull_DirectorName = 1 AND [DirectorName] IS NULL) OR ([DirectorName] = @Original_DirectorName)) AND ([Phone] = @Original_Phone) AND ((@IsNull_Email = 1 AND [Email] IS NULL) OR ([Email] = @Original_Email)) AND ((@IsNull_Logo = 1 AND [Logo] IS NULL) OR ([Logo] = @Original_Logo)) AND ([Priority] = @Original_Priority)); SELECT ID, Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority FROM Agent WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 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("@AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_KPP", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DirectorName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Email", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Logo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Log" + "o, Priority FROM dbo.Agent"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.AgentDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.AgentDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.AgentDataTable dataTable = new TestWSR4DataSet.AgentDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.AgentDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "Agent"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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, int Original_AgentTypeID, string Original_Address, string Original_INN, string Original_KPP, string Original_DirectorName, string Original_Phone, string Original_Email, string Original_Logo, int Original_Priority) { 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)); } this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AgentTypeID)); if ((Original_Address == 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_Address)); } if ((Original_INN == null)) { throw new global::System.ArgumentNullException("Original_INN"); } else { this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_INN)); } if ((Original_KPP == 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_KPP)); } if ((Original_DirectorName == null)) { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_DirectorName)); } if ((Original_Phone == null)) { throw new global::System.ArgumentNullException("Original_Phone"); } else { this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_Phone)); } if ((Original_Email == null)) { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Email)); } if ((Original_Logo == null)) { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_Logo)); } this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(Original_Priority)); 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", "16.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 Title, int AgentTypeID, string Address, string INN, string KPP, string DirectorName, string Phone, string Email, string Logo, int Priority) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title)); } this.Adapter.InsertCommand.Parameters[1].Value = ((int)(AgentTypeID)); if ((Address == null)) { this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Address)); } if ((INN == null)) { throw new global::System.ArgumentNullException("INN"); } else { this.Adapter.InsertCommand.Parameters[3].Value = ((string)(INN)); } if ((KPP == null)) { this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[4].Value = ((string)(KPP)); } if ((DirectorName == null)) { this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[5].Value = ((string)(DirectorName)); } if ((Phone == null)) { throw new global::System.ArgumentNullException("Phone"); } else { this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Phone)); } if ((Email == null)) { this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[7].Value = ((string)(Email)); } if ((Logo == null)) { this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[8].Value = ((string)(Logo)); } this.Adapter.InsertCommand.Parameters[9].Value = ((int)(Priority)); 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", "16.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 AgentTypeID, string Address, string INN, string KPP, string DirectorName, string Phone, string Email, string Logo, int Priority, int Original_ID, string Original_Title, int Original_AgentTypeID, string Original_Address, string Original_INN, string Original_KPP, string Original_DirectorName, string Original_Phone, string Original_Email, string Original_Logo, int Original_Priority, int ID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title)); } this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(AgentTypeID)); if ((Address == null)) { this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Address)); } if ((INN == null)) { throw new global::System.ArgumentNullException("INN"); } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(INN)); } if ((KPP == null)) { this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(KPP)); } if ((DirectorName == null)) { this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(DirectorName)); } if ((Phone == null)) { throw new global::System.ArgumentNullException("Phone"); } else { this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Phone)); } if ((Email == null)) { this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Email)); } if ((Logo == null)) { this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Logo)); } this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Priority)); this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_ID)); if ((Original_Title == null)) { throw new global::System.ArgumentNullException("Original_Title"); } else { this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Title)); } this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_AgentTypeID)); if ((Original_Address == null)) { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Address)); } if ((Original_INN == null)) { throw new global::System.ArgumentNullException("Original_INN"); } else { this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_INN)); } if ((Original_KPP == null)) { this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_KPP)); } if ((Original_DirectorName == null)) { this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_DirectorName)); } if ((Original_Phone == null)) { throw new global::System.ArgumentNullException("Original_Phone"); } else { this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_Phone)); } if ((Original_Email == null)) { this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_Email)); } if ((Original_Logo == null)) { this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_Logo)); } this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Original_Priority)); this.Adapter.UpdateCommand.Parameters[26].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", "16.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 AgentTypeID, string Address, string INN, string KPP, string DirectorName, string Phone, string Email, string Logo, int Priority, int Original_ID, string Original_Title, int Original_AgentTypeID, string Original_Address, string Original_INN, string Original_KPP, string Original_DirectorName, string Original_Phone, string Original_Email, string Original_Logo, int Original_Priority) { return this.Update(Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority, Original_ID, Original_Title, Original_AgentTypeID, Original_Address, Original_INN, Original_KPP, Original_DirectorName, Original_Phone, Original_Email, Original_Logo, Original_Priority, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 AgentPriorityHistoryTableAdapter : 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", "16.0.0.0")] public AgentPriorityHistoryTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "AgentPriorityHistory"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("AgentID", "AgentID"); tableMapping.ColumnMappings.Add("ChangeDate", "ChangeDate"); tableMapping.ColumnMappings.Add("PriorityValue", "PriorityValue"); 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].[AgentPriorityHistory] WHERE (([ID] = @Original_ID) AND ([Agent" + "ID] = @Original_AgentID) AND ([ChangeDate] = @Original_ChangeDate) AND ([Priorit" + "yValue] = @Original_PriorityValue))"; 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_AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PriorityValue", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PriorityValue", 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].[AgentPriorityHistory] ([AgentID], [ChangeDate], [PriorityValue" + "]) VALUES (@AgentID, @ChangeDate, @PriorityValue);\r\nSELECT ID, AgentID, ChangeDa" + "te, PriorityValue FROM AgentPriorityHistory WHERE (ID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PriorityValue", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PriorityValue", 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].[AgentPriorityHistory] SET [AgentID] = @AgentID, [ChangeDate] = @ChangeDate, [PriorityValue] = @PriorityValue WHERE (([ID] = @Original_ID) AND ([AgentID] = @Original_AgentID) AND ([ChangeDate] = @Original_ChangeDate) AND ([PriorityValue] = @Original_PriorityValue)); SELECT ID, AgentID, ChangeDate, PriorityValue FROM AgentPriorityHistory WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PriorityValue", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PriorityValue", 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_AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PriorityValue", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PriorityValue", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, AgentID, ChangeDate, PriorityValue FROM dbo.AgentPriorityHistory"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.AgentPriorityHistoryDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.AgentPriorityHistoryDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.AgentPriorityHistoryDataTable dataTable = new TestWSR4DataSet.AgentPriorityHistoryDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.AgentPriorityHistoryDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "AgentPriorityHistory"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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_AgentID, System.DateTime Original_ChangeDate, int Original_PriorityValue) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_AgentID)); this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ChangeDate)); this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_PriorityValue)); 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", "16.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 AgentID, System.DateTime ChangeDate, int PriorityValue) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(AgentID)); this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(ChangeDate)); this.Adapter.InsertCommand.Parameters[2].Value = ((int)(PriorityValue)); 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", "16.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 AgentID, System.DateTime ChangeDate, int PriorityValue, int Original_ID, int Original_AgentID, System.DateTime Original_ChangeDate, int Original_PriorityValue, int ID) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(AgentID)); this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(ChangeDate)); this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(PriorityValue)); this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ID)); this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_AgentID)); this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ChangeDate)); this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_PriorityValue)); this.Adapter.UpdateCommand.Parameters[7].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", "16.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 AgentID, System.DateTime ChangeDate, int PriorityValue, int Original_ID, int Original_AgentID, System.DateTime Original_ChangeDate, int Original_PriorityValue) { return this.Update(AgentID, ChangeDate, PriorityValue, Original_ID, Original_AgentID, Original_ChangeDate, Original_PriorityValue, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 AgentTypeTableAdapter : 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", "16.0.0.0")] public AgentTypeTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "AgentType"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("Title", "Title"); tableMapping.ColumnMappings.Add("Image", "Image"); 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].[AgentType] WHERE (([ID] = @Original_ID) AND ([Title] = @Origin" + "al_Title) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_I" + "mage)))"; 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.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", 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].[AgentType] ([Title], [Image]) VALUES (@Title, @Image);\r\nSELECT" + " ID, Title, Image FROM AgentType WHERE (ID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 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.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", 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].[AgentType] SET [Title] = @Title, [Image] = @Image WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image))); SELECT ID, Title, Image FROM AgentType WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 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("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, Image FROM dbo.AgentType"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.AgentTypeDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.AgentTypeDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.AgentTypeDataTable dataTable = new TestWSR4DataSet.AgentTypeDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.AgentTypeDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "AgentType"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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, string Original_Image) { 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)); } if ((Original_Image == 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_Image)); } 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", "16.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 Title, string Image) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title)); } if ((Image == null)) { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Image)); } 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", "16.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, string Image, int Original_ID, string Original_Title, string Original_Image, int ID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title)); } if ((Image == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Image)); } 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)); } if ((Original_Image == null)) { this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_Image)); } this.Adapter.UpdateCommand.Parameters[6].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", "16.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, string Image, int Original_ID, string Original_Title, string Original_Image) { return this.Update(Title, Image, Original_ID, Original_Title, Original_Image, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 MaterialTableAdapter : 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", "16.0.0.0")] public MaterialTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "Material"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("Title", "Title"); tableMapping.ColumnMappings.Add("CountInPack", "CountInPack"); tableMapping.ColumnMappings.Add("Unit", "Unit"); tableMapping.ColumnMappings.Add("CountInStock", "CountInStock"); tableMapping.ColumnMappings.Add("MinCount", "MinCount"); tableMapping.ColumnMappings.Add("Description", "Description"); tableMapping.ColumnMappings.Add("Cost", "Cost"); tableMapping.ColumnMappings.Add("Image", "Image"); tableMapping.ColumnMappings.Add("MaterialTypeID", "MaterialTypeID"); 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].[Material] WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([CountInPack] = @Original_CountInPack) AND ([Unit] = @Original_Unit) AND ((@IsNull_CountInStock = 1 AND [CountInStock] IS NULL) OR ([CountInStock] = @Original_CountInStock)) AND ([MinCount] = @Original_MinCount) AND ([Cost] = @Original_Cost) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image)) AND ([MaterialTypeID] = @Original_MaterialTypeID))"; 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.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CountInPack", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInPack", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Unit", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Unit", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CountInStock", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInStock", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CountInStock", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInStock", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MinCount", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MinCount", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Cost", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "Cost", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaterialTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialTypeID", 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].[Material] ([Title], [CountInPack], [Unit], [CountInStock], [MinCount], [Description], [Cost], [Image], [MaterialTypeID]) VALUES (@Title, @CountInPack, @Unit, @CountInStock, @MinCount, @Description, @Cost, @Image, @MaterialTypeID); SELECT ID, Title, CountInPack, Unit, CountInStock, MinCount, Description, Cost, Image, MaterialTypeID FROM Material WHERE (ID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 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.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CountInPack", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInPack", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Unit", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Unit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CountInStock", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInStock", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MinCount", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MinCount", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cost", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "Cost", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaterialTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialTypeID", 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].[Material] SET [Title] = @Title, [CountInPack] = @CountInPack, [Unit] = @Unit, [CountInStock] = @CountInStock, [MinCount] = @MinCount, [Description] = @Description, [Cost] = @Cost, [Image] = @Image, [MaterialTypeID] = @MaterialTypeID WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([CountInPack] = @Original_CountInPack) AND ([Unit] = @Original_Unit) AND ((@IsNull_CountInStock = 1 AND [CountInStock] IS NULL) OR ([CountInStock] = @Original_CountInStock)) AND ([MinCount] = @Original_MinCount) AND ([Cost] = @Original_Cost) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image)) AND ([MaterialTypeID] = @Original_MaterialTypeID)); SELECT ID, Title, CountInPack, Unit, CountInStock, MinCount, Description, Cost, Image, MaterialTypeID FROM Material WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 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("@CountInPack", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInPack", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Unit", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Unit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CountInStock", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInStock", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MinCount", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MinCount", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cost", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "Cost", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaterialTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialTypeID", 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CountInPack", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInPack", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Unit", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Unit", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CountInStock", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInStock", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CountInStock", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountInStock", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MinCount", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MinCount", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Cost", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "Cost", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaterialTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialTypeID", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, CountInPack, Unit, CountInStock, MinCount, Description, Cost, I" + "mage, MaterialTypeID FROM dbo.Material"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.MaterialDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.MaterialDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.MaterialDataTable dataTable = new TestWSR4DataSet.MaterialDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.MaterialDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "Material"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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, int Original_CountInPack, string Original_Unit, global::System.Nullable Original_CountInStock, double Original_MinCount, decimal Original_Cost, string Original_Image, int Original_MaterialTypeID) { 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)); } this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_CountInPack)); if ((Original_Unit == null)) { throw new global::System.ArgumentNullException("Original_Unit"); } else { this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Unit)); } if ((Original_CountInStock.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[5].Value = ((double)(Original_CountInStock.Value)); } else { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; } this.Adapter.DeleteCommand.Parameters[6].Value = ((double)(Original_MinCount)); this.Adapter.DeleteCommand.Parameters[7].Value = ((decimal)(Original_Cost)); if ((Original_Image == null)) { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_Image)); } this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_MaterialTypeID)); 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", "16.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 Title, int CountInPack, string Unit, global::System.Nullable CountInStock, double MinCount, string Description, decimal Cost, string Image, int MaterialTypeID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title)); } this.Adapter.InsertCommand.Parameters[1].Value = ((int)(CountInPack)); if ((Unit == null)) { throw new global::System.ArgumentNullException("Unit"); } else { this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Unit)); } if ((CountInStock.HasValue == true)) { this.Adapter.InsertCommand.Parameters[3].Value = ((double)(CountInStock.Value)); } else { this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; } this.Adapter.InsertCommand.Parameters[4].Value = ((double)(MinCount)); if ((Description == null)) { this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Description)); } this.Adapter.InsertCommand.Parameters[6].Value = ((decimal)(Cost)); if ((Image == null)) { this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[7].Value = ((string)(Image)); } this.Adapter.InsertCommand.Parameters[8].Value = ((int)(MaterialTypeID)); 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", "16.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 CountInPack, string Unit, global::System.Nullable CountInStock, double MinCount, string Description, decimal Cost, string Image, int MaterialTypeID, int Original_ID, string Original_Title, int Original_CountInPack, string Original_Unit, global::System.Nullable Original_CountInStock, double Original_MinCount, decimal Original_Cost, string Original_Image, int Original_MaterialTypeID, int ID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title)); } this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(CountInPack)); if ((Unit == null)) { throw new global::System.ArgumentNullException("Unit"); } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Unit)); } if ((CountInStock.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((double)(CountInStock.Value)); } else { this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[4].Value = ((double)(MinCount)); if ((Description == null)) { this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Description)); } this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(Cost)); if ((Image == null)) { this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Image)); } this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(MaterialTypeID)); this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_ID)); if ((Original_Title == null)) { throw new global::System.ArgumentNullException("Original_Title"); } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Title)); } this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_CountInPack)); if ((Original_Unit == null)) { throw new global::System.ArgumentNullException("Original_Unit"); } else { this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_Unit)); } if ((Original_CountInStock.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[14].Value = ((double)(Original_CountInStock.Value)); } else { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[15].Value = ((double)(Original_MinCount)); this.Adapter.UpdateCommand.Parameters[16].Value = ((decimal)(Original_Cost)); if ((Original_Image == null)) { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_Image)); } this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Original_MaterialTypeID)); this.Adapter.UpdateCommand.Parameters[20].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", "16.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 CountInPack, string Unit, global::System.Nullable CountInStock, double MinCount, string Description, decimal Cost, string Image, int MaterialTypeID, int Original_ID, string Original_Title, int Original_CountInPack, string Original_Unit, global::System.Nullable Original_CountInStock, double Original_MinCount, decimal Original_Cost, string Original_Image, int Original_MaterialTypeID) { return this.Update(Title, CountInPack, Unit, CountInStock, MinCount, Description, Cost, Image, MaterialTypeID, Original_ID, Original_Title, Original_CountInPack, Original_Unit, Original_CountInStock, Original_MinCount, Original_Cost, Original_Image, Original_MaterialTypeID, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 MaterialCountHistoryTableAdapter : 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", "16.0.0.0")] public MaterialCountHistoryTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "MaterialCountHistory"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("MaterialID", "MaterialID"); tableMapping.ColumnMappings.Add("ChangeDate", "ChangeDate"); tableMapping.ColumnMappings.Add("CountValue", "CountValue"); 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].[MaterialCountHistory] WHERE (([ID] = @Original_ID) AND ([Mater" + "ialID] = @Original_MaterialID) AND ([ChangeDate] = @Original_ChangeDate) AND ([C" + "ountValue] = @Original_CountValue))"; 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_MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CountValue", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountValue", 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].[MaterialCountHistory] ([MaterialID], [ChangeDate], [CountValue" + "]) VALUES (@MaterialID, @ChangeDate, @CountValue);\r\nSELECT ID, MaterialID, Chang" + "eDate, CountValue FROM MaterialCountHistory WHERE (ID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CountValue", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountValue", 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].[MaterialCountHistory] SET [MaterialID] = @MaterialID, [ChangeDate] = @ChangeDate, [CountValue] = @CountValue WHERE (([ID] = @Original_ID) AND ([MaterialID] = @Original_MaterialID) AND ([ChangeDate] = @Original_ChangeDate) AND ([CountValue] = @Original_CountValue)); SELECT ID, MaterialID, ChangeDate, CountValue FROM MaterialCountHistory WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CountValue", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountValue", 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_MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CountValue", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountValue", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, MaterialID, ChangeDate, CountValue FROM dbo.MaterialCountHistory"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.MaterialCountHistoryDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.MaterialCountHistoryDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.MaterialCountHistoryDataTable dataTable = new TestWSR4DataSet.MaterialCountHistoryDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.MaterialCountHistoryDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "MaterialCountHistory"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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_MaterialID, System.DateTime Original_ChangeDate, double Original_CountValue) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_MaterialID)); this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ChangeDate)); this.Adapter.DeleteCommand.Parameters[3].Value = ((double)(Original_CountValue)); 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", "16.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 MaterialID, System.DateTime ChangeDate, double CountValue) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(MaterialID)); this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(ChangeDate)); this.Adapter.InsertCommand.Parameters[2].Value = ((double)(CountValue)); 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", "16.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 MaterialID, System.DateTime ChangeDate, double CountValue, int Original_ID, int Original_MaterialID, System.DateTime Original_ChangeDate, double Original_CountValue, int ID) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(MaterialID)); this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(ChangeDate)); this.Adapter.UpdateCommand.Parameters[2].Value = ((double)(CountValue)); this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ID)); this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_MaterialID)); this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ChangeDate)); this.Adapter.UpdateCommand.Parameters[6].Value = ((double)(Original_CountValue)); this.Adapter.UpdateCommand.Parameters[7].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", "16.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 MaterialID, System.DateTime ChangeDate, double CountValue, int Original_ID, int Original_MaterialID, System.DateTime Original_ChangeDate, double Original_CountValue) { return this.Update(MaterialID, ChangeDate, CountValue, Original_ID, Original_MaterialID, Original_ChangeDate, Original_CountValue, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 MaterialSupplierTableAdapter : 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", "16.0.0.0")] public MaterialSupplierTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "MaterialSupplier"; tableMapping.ColumnMappings.Add("MaterialID", "MaterialID"); tableMapping.ColumnMappings.Add("SupplierID", "SupplierID"); 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].[MaterialSupplier] WHERE (([MaterialID] = @Original_MaterialID)" + " AND ([SupplierID] = @Original_SupplierID))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SupplierID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierID", 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].[MaterialSupplier] ([MaterialID], [SupplierID]) VALUES (@Materi" + "alID, @SupplierID);\r\nSELECT MaterialID, SupplierID FROM MaterialSupplier WHERE (" + "MaterialID = @MaterialID) AND (SupplierID = @SupplierID)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SupplierID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierID", 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].[MaterialSupplier] SET [MaterialID] = @MaterialID, [SupplierID] = @SupplierID WHERE (([MaterialID] = @Original_MaterialID) AND ([SupplierID] = @Original_SupplierID)); SELECT MaterialID, SupplierID FROM MaterialSupplier WHERE (MaterialID = @MaterialID) AND (SupplierID = @SupplierID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SupplierID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SupplierID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 MaterialID, SupplierID FROM dbo.MaterialSupplier"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.MaterialSupplierDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.MaterialSupplierDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.MaterialSupplierDataTable dataTable = new TestWSR4DataSet.MaterialSupplierDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.MaterialSupplierDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "MaterialSupplier"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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_MaterialID, int Original_SupplierID) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_MaterialID)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_SupplierID)); 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", "16.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 MaterialID, int SupplierID) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(MaterialID)); this.Adapter.InsertCommand.Parameters[1].Value = ((int)(SupplierID)); 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", "16.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 MaterialID, int SupplierID, int Original_MaterialID, int Original_SupplierID) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(MaterialID)); this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(SupplierID)); this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_MaterialID)); this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_SupplierID)); 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", "16.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 Original_MaterialID, int Original_SupplierID) { return this.Update(Original_MaterialID, Original_SupplierID, Original_MaterialID, Original_SupplierID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 MaterialTypeTableAdapter : 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", "16.0.0.0")] public MaterialTypeTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "MaterialType"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("Title", "Title"); tableMapping.ColumnMappings.Add("DefectedPercent", "DefectedPercent"); 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].[MaterialType] WHERE (([ID] = @Original_ID) AND ([Title] = @Ori" + "ginal_Title) AND ((@IsNull_DefectedPercent = 1 AND [DefectedPercent] IS NULL) OR" + " ([DefectedPercent] = @Original_DefectedPercent)))"; 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.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DefectedPercent", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", 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].[MaterialType] ([Title], [DefectedPercent]) VALUES (@Title, @De" + "fectedPercent);\r\nSELECT ID, Title, DefectedPercent FROM MaterialType WHERE (ID =" + " SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 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.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", 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].[MaterialType] SET [Title] = @Title, [DefectedPercent] = @DefectedPercent WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ((@IsNull_DefectedPercent = 1 AND [DefectedPercent] IS NULL) OR ([DefectedPercent] = @Original_DefectedPercent))); SELECT ID, Title, DefectedPercent FROM MaterialType WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 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("@DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DefectedPercent", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, DefectedPercent FROM dbo.MaterialType"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.MaterialTypeDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.MaterialTypeDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.MaterialTypeDataTable dataTable = new TestWSR4DataSet.MaterialTypeDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.MaterialTypeDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "MaterialType"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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, global::System.Nullable Original_DefectedPercent) { 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)); } if ((Original_DefectedPercent.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((double)(Original_DefectedPercent.Value)); } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].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", "16.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 Title, global::System.Nullable DefectedPercent) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title)); } if ((DefectedPercent.HasValue == true)) { this.Adapter.InsertCommand.Parameters[1].Value = ((double)(DefectedPercent.Value)); } else { this.Adapter.InsertCommand.Parameters[1].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", "16.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, global::System.Nullable DefectedPercent, int Original_ID, string Original_Title, global::System.Nullable Original_DefectedPercent, int ID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title)); } if ((DefectedPercent.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[1].Value = ((double)(DefectedPercent.Value)); } else { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } 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)); } if ((Original_DefectedPercent.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[5].Value = ((double)(Original_DefectedPercent.Value)); } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[6].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", "16.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, global::System.Nullable DefectedPercent, int Original_ID, string Original_Title, global::System.Nullable Original_DefectedPercent) { return this.Update(Title, DefectedPercent, Original_ID, Original_Title, Original_DefectedPercent, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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", "16.0.0.0")] public ProductTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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("ID", "ID"); tableMapping.ColumnMappings.Add("Title", "Title"); tableMapping.ColumnMappings.Add("ProductTypeID", "ProductTypeID"); tableMapping.ColumnMappings.Add("ArticleNumber", "ArticleNumber"); tableMapping.ColumnMappings.Add("Description", "Description"); tableMapping.ColumnMappings.Add("Image", "Image"); tableMapping.ColumnMappings.Add("ProductionPersonCount", "ProductionPersonCount"); tableMapping.ColumnMappings.Add("ProductionWorkshopNumber", "ProductionWorkshopNumber"); tableMapping.ColumnMappings.Add("MinCostForAgent", "MinCostForAgent"); 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 (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ((@IsNull_ProductTypeID = 1 AND [ProductTypeID] IS NULL) OR ([ProductTypeID] = @Original_ProductTypeID)) AND ([ArticleNumber] = @Original_ArticleNumber) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image)) AND ((@IsNull_ProductionPersonCount = 1 AND [ProductionPersonCount] IS NULL) OR ([ProductionPersonCount] = @Original_ProductionPersonCount)) AND ((@IsNull_ProductionWorkshopNumber = 1 AND [ProductionWorkshopNumber] IS NULL) OR ([ProductionWorkshopNumber] = @Original_ProductionWorkshopNumber)) AND ([MinCostForAgent] = @Original_MinCostForAgent))"; 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.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ArticleNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ArticleNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MinCostForAgent", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "MinCostForAgent", 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] ([Title], [ProductTypeID], [ArticleNumber], [Description], [Image], [ProductionPersonCount], [ProductionWorkshopNumber], [MinCostForAgent]) VALUES (@Title, @ProductTypeID, @ArticleNumber, @Description, @Image, @ProductionPersonCount, @ProductionWorkshopNumber, @MinCostForAgent); SELECT ID, Title, ProductTypeID, ArticleNumber, Description, Image, ProductionPersonCount, ProductionWorkshopNumber, MinCostForAgent FROM Product WHERE (ID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 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.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ArticleNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ArticleNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MinCostForAgent", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "MinCostForAgent", 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 [Title] = @Title, [ProductTypeID] = @ProductTypeID, [ArticleNumber] = @ArticleNumber, [Description] = @Description, [Image] = @Image, [ProductionPersonCount] = @ProductionPersonCount, [ProductionWorkshopNumber] = @ProductionWorkshopNumber, [MinCostForAgent] = @MinCostForAgent WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ((@IsNull_ProductTypeID = 1 AND [ProductTypeID] IS NULL) OR ([ProductTypeID] = @Original_ProductTypeID)) AND ([ArticleNumber] = @Original_ArticleNumber) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image)) AND ((@IsNull_ProductionPersonCount = 1 AND [ProductionPersonCount] IS NULL) OR ([ProductionPersonCount] = @Original_ProductionPersonCount)) AND ((@IsNull_ProductionWorkshopNumber = 1 AND [ProductionWorkshopNumber] IS NULL) OR ([ProductionWorkshopNumber] = @Original_ProductionWorkshopNumber)) AND ([MinCostForAgent] = @Original_MinCostForAgent)); SELECT ID, Title, ProductTypeID, ArticleNumber, Description, Image, ProductionPersonCount, ProductionWorkshopNumber, MinCostForAgent FROM Product WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 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("@ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ArticleNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ArticleNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MinCostForAgent", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "MinCostForAgent", 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ArticleNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ArticleNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MinCostForAgent", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "MinCostForAgent", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, ProductTypeID, ArticleNumber, Description, Image, ProductionPer" + "sonCount, ProductionWorkshopNumber, MinCostForAgent 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", "16.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(TestWSR4DataSet.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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.ProductDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.ProductDataTable dataTable = new TestWSR4DataSet.ProductDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.ProductDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "Product"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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, global::System.Nullable Original_ProductTypeID, string Original_ArticleNumber, string Original_Image, global::System.Nullable Original_ProductionPersonCount, global::System.Nullable Original_ProductionWorkshopNumber, decimal Original_MinCostForAgent) { 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)); } if ((Original_ProductTypeID.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_ProductTypeID.Value)); } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value; } if ((Original_ArticleNumber == null)) { throw new global::System.ArgumentNullException("Original_ArticleNumber"); } else { this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_ArticleNumber)); } if ((Original_Image == null)) { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Image)); } if ((Original_ProductionPersonCount.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_ProductionPersonCount.Value)); } else { this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; } if ((Original_ProductionWorkshopNumber.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_ProductionWorkshopNumber.Value)); } else { this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; } this.Adapter.DeleteCommand.Parameters[11].Value = ((decimal)(Original_MinCostForAgent)); 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", "16.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 Title, global::System.Nullable ProductTypeID, string ArticleNumber, string Description, string Image, global::System.Nullable ProductionPersonCount, global::System.Nullable ProductionWorkshopNumber, decimal MinCostForAgent) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title)); } if ((ProductTypeID.HasValue == true)) { this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductTypeID.Value)); } else { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } if ((ArticleNumber == null)) { throw new global::System.ArgumentNullException("ArticleNumber"); } else { this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ArticleNumber)); } if ((Description == null)) { this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Description)); } if ((Image == null)) { this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Image)); } if ((ProductionPersonCount.HasValue == true)) { this.Adapter.InsertCommand.Parameters[5].Value = ((int)(ProductionPersonCount.Value)); } else { this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; } if ((ProductionWorkshopNumber.HasValue == true)) { this.Adapter.InsertCommand.Parameters[6].Value = ((int)(ProductionWorkshopNumber.Value)); } else { this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; } this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(MinCostForAgent)); 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", "16.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, global::System.Nullable ProductTypeID, string ArticleNumber, string Description, string Image, global::System.Nullable ProductionPersonCount, global::System.Nullable ProductionWorkshopNumber, decimal MinCostForAgent, int Original_ID, string Original_Title, global::System.Nullable Original_ProductTypeID, string Original_ArticleNumber, string Original_Image, global::System.Nullable Original_ProductionPersonCount, global::System.Nullable Original_ProductionWorkshopNumber, decimal Original_MinCostForAgent, int ID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title)); } if ((ProductTypeID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductTypeID.Value)); } else { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } if ((ArticleNumber == null)) { throw new global::System.ArgumentNullException("ArticleNumber"); } else { this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ArticleNumber)); } if ((Description == null)) { this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Description)); } if ((Image == null)) { this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Image)); } if ((ProductionPersonCount.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(ProductionPersonCount.Value)); } else { this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } if ((ProductionWorkshopNumber.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(ProductionWorkshopNumber.Value)); } else { this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(MinCostForAgent)); this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ID)); if ((Original_Title == null)) { throw new global::System.ArgumentNullException("Original_Title"); } else { this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Title)); } if ((Original_ProductTypeID.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_ProductTypeID.Value)); } else { this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; } if ((Original_ArticleNumber == null)) { throw new global::System.ArgumentNullException("Original_ArticleNumber"); } else { this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_ArticleNumber)); } if ((Original_Image == null)) { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Image)); } if ((Original_ProductionPersonCount.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(Original_ProductionPersonCount.Value)); } else { this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; } if ((Original_ProductionWorkshopNumber.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(Original_ProductionWorkshopNumber.Value)); } else { this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[19].Value = ((decimal)(Original_MinCostForAgent)); this.Adapter.UpdateCommand.Parameters[20].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", "16.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, global::System.Nullable ProductTypeID, string ArticleNumber, string Description, string Image, global::System.Nullable ProductionPersonCount, global::System.Nullable ProductionWorkshopNumber, decimal MinCostForAgent, int Original_ID, string Original_Title, global::System.Nullable Original_ProductTypeID, string Original_ArticleNumber, string Original_Image, global::System.Nullable Original_ProductionPersonCount, global::System.Nullable Original_ProductionWorkshopNumber, decimal Original_MinCostForAgent) { return this.Update(Title, ProductTypeID, ArticleNumber, Description, Image, ProductionPersonCount, ProductionWorkshopNumber, MinCostForAgent, Original_ID, Original_Title, Original_ProductTypeID, Original_ArticleNumber, Original_Image, Original_ProductionPersonCount, Original_ProductionWorkshopNumber, Original_MinCostForAgent, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 ProductCostHistoryTableAdapter : 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", "16.0.0.0")] public ProductCostHistoryTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "ProductCostHistory"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("ProductID", "ProductID"); tableMapping.ColumnMappings.Add("ChangeDate", "ChangeDate"); tableMapping.ColumnMappings.Add("CostValue", "CostValue"); 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].[ProductCostHistory] WHERE (([ID] = @Original_ID) AND ([Product" + "ID] = @Original_ProductID) AND ([ChangeDate] = @Original_ChangeDate) AND ([CostV" + "alue] = @Original_CostValue))"; 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_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CostValue", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "CostValue", 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].[ProductCostHistory] ([ProductID], [ChangeDate], [CostValue]) V" + "ALUES (@ProductID, @ChangeDate, @CostValue);\r\nSELECT ID, ProductID, ChangeDate, " + "CostValue FROM ProductCostHistory WHERE (ID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CostValue", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "CostValue", 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].[ProductCostHistory] SET [ProductID] = @ProductID, [ChangeDate] = @ChangeDate, [CostValue] = @CostValue WHERE (([ID] = @Original_ID) AND ([ProductID] = @Original_ProductID) AND ([ChangeDate] = @Original_ChangeDate) AND ([CostValue] = @Original_CostValue)); SELECT ID, ProductID, ChangeDate, CostValue FROM ProductCostHistory WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CostValue", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "CostValue", 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_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ChangeDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ChangeDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CostValue", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "CostValue", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, ProductID, ChangeDate, CostValue FROM dbo.ProductCostHistory"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.ProductCostHistoryDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.ProductCostHistoryDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.ProductCostHistoryDataTable dataTable = new TestWSR4DataSet.ProductCostHistoryDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.ProductCostHistoryDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "ProductCostHistory"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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_ProductID, System.DateTime Original_ChangeDate, decimal Original_CostValue) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProductID)); this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_ChangeDate)); this.Adapter.DeleteCommand.Parameters[3].Value = ((decimal)(Original_CostValue)); 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", "16.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 ProductID, System.DateTime ChangeDate, decimal CostValue) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID)); this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(ChangeDate)); this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(CostValue)); 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", "16.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 ProductID, System.DateTime ChangeDate, decimal CostValue, int Original_ID, int Original_ProductID, System.DateTime Original_ChangeDate, decimal Original_CostValue, int ID) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID)); this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(ChangeDate)); this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(CostValue)); this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ID)); this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_ProductID)); this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_ChangeDate)); this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(Original_CostValue)); this.Adapter.UpdateCommand.Parameters[7].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", "16.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 ProductID, System.DateTime ChangeDate, decimal CostValue, int Original_ID, int Original_ProductID, System.DateTime Original_ChangeDate, decimal Original_CostValue) { return this.Update(ProductID, ChangeDate, CostValue, Original_ID, Original_ProductID, Original_ChangeDate, Original_CostValue, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 ProductMaterialTableAdapter : 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", "16.0.0.0")] public ProductMaterialTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "ProductMaterial"; tableMapping.ColumnMappings.Add("ProductID", "ProductID"); tableMapping.ColumnMappings.Add("MaterialID", "MaterialID"); tableMapping.ColumnMappings.Add("Count", "Count"); 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].[ProductMaterial] WHERE (([ProductID] = @Original_ProductID) AN" + "D ([MaterialID] = @Original_MaterialID) AND ((@IsNull_Count = 1 AND [Count] IS N" + "ULL) OR ([Count] = @Original_Count)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Count", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Count", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Count", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Count", 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].[ProductMaterial] ([ProductID], [MaterialID], [Count]) VALUES (" + "@ProductID, @MaterialID, @Count);\r\nSELECT ProductID, MaterialID, Count FROM Prod" + "uctMaterial WHERE (MaterialID = @MaterialID) AND (ProductID = @ProductID)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Count", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Count", 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].[ProductMaterial] SET [ProductID] = @ProductID, [MaterialID] = @MaterialID, [Count] = @Count WHERE (([ProductID] = @Original_ProductID) AND ([MaterialID] = @Original_MaterialID) AND ((@IsNull_Count = 1 AND [Count] IS NULL) OR ([Count] = @Original_Count))); SELECT ProductID, MaterialID, Count FROM ProductMaterial WHERE (MaterialID = @MaterialID) AND (ProductID = @ProductID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Count", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Count", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MaterialID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MaterialID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Count", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Count", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Count", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Count", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 ProductID, MaterialID, Count FROM dbo.ProductMaterial"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.ProductMaterialDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.ProductMaterialDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.ProductMaterialDataTable dataTable = new TestWSR4DataSet.ProductMaterialDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.ProductMaterialDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "ProductMaterial"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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_ProductID, int Original_MaterialID, global::System.Nullable Original_Count) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductID)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_MaterialID)); if ((Original_Count.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((double)(Original_Count.Value)); } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].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", "16.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 ProductID, int MaterialID, global::System.Nullable Count) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProductID)); this.Adapter.InsertCommand.Parameters[1].Value = ((int)(MaterialID)); if ((Count.HasValue == true)) { this.Adapter.InsertCommand.Parameters[2].Value = ((double)(Count.Value)); } else { this.Adapter.InsertCommand.Parameters[2].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", "16.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 ProductID, int MaterialID, global::System.Nullable Count, int Original_ProductID, int Original_MaterialID, global::System.Nullable Original_Count) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProductID)); this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(MaterialID)); if ((Count.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[2].Value = ((double)(Count.Value)); } else { this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ProductID)); this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_MaterialID)); if ((Original_Count.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[6].Value = ((double)(Original_Count.Value)); } else { this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; } 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", "16.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(global::System.Nullable Count, int Original_ProductID, int Original_MaterialID, global::System.Nullable Original_Count) { return this.Update(Original_ProductID, Original_MaterialID, Count, Original_ProductID, Original_MaterialID, Original_Count); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 ProductSaleTableAdapter : 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", "16.0.0.0")] public ProductSaleTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "ProductSale"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("AgentID", "AgentID"); tableMapping.ColumnMappings.Add("ProductID", "ProductID"); tableMapping.ColumnMappings.Add("SaleDate", "SaleDate"); tableMapping.ColumnMappings.Add("ProductCount", "ProductCount"); 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].[ProductSale] WHERE (([ID] = @Original_ID) AND ([AgentID] = @Or" + "iginal_AgentID) AND ([ProductID] = @Original_ProductID) AND ([SaleDate] = @Origi" + "nal_SaleDate) AND ([ProductCount] = @Original_ProductCount))"; 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_AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SaleDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductCount", 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].[ProductSale] ([AgentID], [ProductID], [SaleDate], [ProductCoun" + "t]) VALUES (@AgentID, @ProductID, @SaleDate, @ProductCount);\r\nSELECT ID, AgentID" + ", ProductID, SaleDate, ProductCount FROM ProductSale WHERE (ID = SCOPE_IDENTITY(" + "))"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SaleDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductCount", 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].[ProductSale] SET [AgentID] = @AgentID, [ProductID] = @ProductID, [SaleDate] = @SaleDate, [ProductCount] = @ProductCount WHERE (([ID] = @Original_ID) AND ([AgentID] = @Original_AgentID) AND ([ProductID] = @Original_ProductID) AND ([SaleDate] = @Original_SaleDate) AND ([ProductCount] = @Original_ProductCount)); SELECT ID, AgentID, ProductID, SaleDate, ProductCount FROM ProductSale WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SaleDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductCount", 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_AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SaleDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductCount", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, AgentID, ProductID, SaleDate, ProductCount FROM dbo.ProductSale"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.ProductSaleDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.ProductSaleDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.ProductSaleDataTable dataTable = new TestWSR4DataSet.ProductSaleDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.ProductSaleDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "ProductSale"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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_AgentID, int Original_ProductID, System.DateTime Original_SaleDate, int Original_ProductCount) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID)); this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_AgentID)); this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ProductID)); this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_SaleDate)); this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_ProductCount)); 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", "16.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 AgentID, int ProductID, System.DateTime SaleDate, int ProductCount) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(AgentID)); this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductID)); this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(SaleDate)); this.Adapter.InsertCommand.Parameters[3].Value = ((int)(ProductCount)); 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", "16.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 AgentID, int ProductID, System.DateTime SaleDate, int ProductCount, int Original_ID, int Original_AgentID, int Original_ProductID, System.DateTime Original_SaleDate, int Original_ProductCount, int ID) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(AgentID)); this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductID)); this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(SaleDate)); this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ProductCount)); this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_ID)); this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_AgentID)); this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_ProductID)); this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_SaleDate)); this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ProductCount)); this.Adapter.UpdateCommand.Parameters[9].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", "16.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 AgentID, int ProductID, System.DateTime SaleDate, int ProductCount, int Original_ID, int Original_AgentID, int Original_ProductID, System.DateTime Original_SaleDate, int Original_ProductCount) { return this.Update(AgentID, ProductID, SaleDate, ProductCount, Original_ID, Original_AgentID, Original_ProductID, Original_SaleDate, Original_ProductCount, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 ProductTypeTableAdapter : 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", "16.0.0.0")] public ProductTypeTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "ProductType"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("Title", "Title"); tableMapping.ColumnMappings.Add("DefectedPercent", "DefectedPercent"); 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].[ProductType] WHERE (([ID] = @Original_ID) AND ([Title] = @Orig" + "inal_Title) AND ((@IsNull_DefectedPercent = 1 AND [DefectedPercent] IS NULL) OR " + "([DefectedPercent] = @Original_DefectedPercent)))"; 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.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DefectedPercent", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", 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].[ProductType] ([Title], [DefectedPercent]) VALUES (@Title, @Def" + "ectedPercent);\r\nSELECT ID, Title, DefectedPercent FROM ProductType WHERE (ID = S" + "COPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 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.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", 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].[ProductType] SET [Title] = @Title, [DefectedPercent] = @DefectedPercent WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ((@IsNull_DefectedPercent = 1 AND [DefectedPercent] IS NULL) OR ([DefectedPercent] = @Original_DefectedPercent))); SELECT ID, Title, DefectedPercent FROM ProductType WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 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("@DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DefectedPercent", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, DefectedPercent FROM dbo.ProductType"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.ProductTypeDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.ProductTypeDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.ProductTypeDataTable dataTable = new TestWSR4DataSet.ProductTypeDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.ProductTypeDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "ProductType"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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, global::System.Nullable Original_DefectedPercent) { 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)); } if ((Original_DefectedPercent.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((double)(Original_DefectedPercent.Value)); } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].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", "16.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 Title, global::System.Nullable DefectedPercent) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title)); } if ((DefectedPercent.HasValue == true)) { this.Adapter.InsertCommand.Parameters[1].Value = ((double)(DefectedPercent.Value)); } else { this.Adapter.InsertCommand.Parameters[1].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", "16.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, global::System.Nullable DefectedPercent, int Original_ID, string Original_Title, global::System.Nullable Original_DefectedPercent, int ID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title)); } if ((DefectedPercent.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[1].Value = ((double)(DefectedPercent.Value)); } else { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } 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)); } if ((Original_DefectedPercent.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[5].Value = ((double)(Original_DefectedPercent.Value)); } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } this.Adapter.UpdateCommand.Parameters[6].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", "16.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, global::System.Nullable DefectedPercent, int Original_ID, string Original_Title, global::System.Nullable Original_DefectedPercent) { return this.Update(Title, DefectedPercent, Original_ID, Original_Title, Original_DefectedPercent, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 ShopTableAdapter : 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", "16.0.0.0")] public ShopTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "Shop"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("Title", "Title"); tableMapping.ColumnMappings.Add("Address", "Address"); tableMapping.ColumnMappings.Add("AgentID", "AgentID"); 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].[Shop] WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Ti" + "tle) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_" + "Address)) AND ([AgentID] = @Original_AgentID))"; 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.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", 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].[Shop] ([Title], [Address], [AgentID]) VALUES (@Title, @Address" + ", @AgentID);\r\nSELECT ID, Title, Address, AgentID FROM Shop WHERE (ID = SCOPE_IDE" + "NTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 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.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", 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].[Shop] SET [Title] = @Title, [Address] = @Address, [AgentID] = @AgentID WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ([AgentID] = @Original_AgentID)); SELECT ID, Title, Address, AgentID FROM Shop WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 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("@Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, Address, AgentID FROM dbo.Shop"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.ShopDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.ShopDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.ShopDataTable dataTable = new TestWSR4DataSet.ShopDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.ShopDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "Shop"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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, string Original_Address, int Original_AgentID) { 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)); } if ((Original_Address == 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_Address)); } this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_AgentID)); 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", "16.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 Title, string Address, int AgentID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title)); } if ((Address == null)) { this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Address)); } this.Adapter.InsertCommand.Parameters[2].Value = ((int)(AgentID)); 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", "16.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, string Address, int AgentID, int Original_ID, string Original_Title, string Original_Address, int Original_AgentID, int ID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title)); } if ((Address == null)) { this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Address)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(AgentID)); this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ID)); if ((Original_Title == null)) { throw new global::System.ArgumentNullException("Original_Title"); } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Title)); } if ((Original_Address == null)) { this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Address)); } this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_AgentID)); this.Adapter.UpdateCommand.Parameters[8].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", "16.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, string Address, int AgentID, int Original_ID, string Original_Title, string Original_Address, int Original_AgentID) { return this.Update(Title, Address, AgentID, Original_ID, Original_Title, Original_Address, Original_AgentID, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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", "16.0.0.0")] public SupplierTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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"); tableMapping.ColumnMappings.Add("INN", "INN"); tableMapping.ColumnMappings.Add("StartDate", "StartDate"); tableMapping.ColumnMappings.Add("QualityRating", "QualityRating"); tableMapping.ColumnMappings.Add("SupplierType", "SupplierType"); 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 ([Title] = @Original_Title) AND ([INN] = @Original_INN) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_QualityRating = 1 AND [QualityRating] IS NULL) OR ([QualityRating] = @Original_QualityRating)) AND ((@IsNull_SupplierType = 1 AND [SupplierType] IS NULL) OR ([SupplierType] = @Original_SupplierType)))"; 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.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_StartDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "StartDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_QualityRating", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QualityRating", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QualityRating", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QualityRating", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SupplierType", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierType", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SupplierType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierType", 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] ([Title], [INN], [StartDate], [QualityRating], [SupplierType]) VALUES (@Title, @INN, @StartDate, @QualityRating, @SupplierType); SELECT ID, Title, INN, StartDate, QualityRating, SupplierType FROM Supplier WHERE (ID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 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.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StartDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "StartDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QualityRating", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QualityRating", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SupplierType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierType", 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 [Title] = @Title, [INN] = @INN, [StartDate] = @StartDate, [QualityRating] = @QualityRating, [SupplierType] = @SupplierType WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([INN] = @Original_INN) AND ([StartDate] = @Original_StartDate) AND ((@IsNull_QualityRating = 1 AND [QualityRating] IS NULL) OR ([QualityRating] = @Original_QualityRating)) AND ((@IsNull_SupplierType = 1 AND [SupplierType] IS NULL) OR ([SupplierType] = @Original_SupplierType))); SELECT ID, Title, INN, StartDate, QualityRating, SupplierType 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("@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("@INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StartDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "StartDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QualityRating", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QualityRating", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SupplierType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierType", 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_StartDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "StartDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_QualityRating", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QualityRating", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QualityRating", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "QualityRating", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SupplierType", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierType", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SupplierType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SupplierType", 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", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, INN, StartDate, QualityRating, SupplierType 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", "16.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(TestWSR4DataSet.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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.SupplierDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.SupplierDataTable dataTable = new TestWSR4DataSet.SupplierDataTable(); this.Adapter.Fill(dataTable); return dataTable; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet.SupplierDataTable dataTable) { return this.Adapter.Update(dataTable); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(TestWSR4DataSet dataSet) { return this.Adapter.Update(dataSet, "Supplier"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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, string Original_INN, System.DateTime Original_StartDate, global::System.Nullable Original_QualityRating, string Original_SupplierType) { 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)); } if ((Original_INN == null)) { throw new global::System.ArgumentNullException("Original_INN"); } else { this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_INN)); } this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_StartDate)); if ((Original_QualityRating.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_QualityRating.Value)); } else { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; } if ((Original_SupplierType == 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_SupplierType)); } 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", "16.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 Title, string INN, System.DateTime StartDate, global::System.Nullable QualityRating, string SupplierType) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title)); } if ((INN == null)) { throw new global::System.ArgumentNullException("INN"); } else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(INN)); } this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(StartDate)); if ((QualityRating.HasValue == true)) { this.Adapter.InsertCommand.Parameters[3].Value = ((int)(QualityRating.Value)); } else { this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; } if ((SupplierType == null)) { this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.InsertCommand.Parameters[4].Value = ((string)(SupplierType)); } 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", "16.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, string INN, System.DateTime StartDate, global::System.Nullable QualityRating, string SupplierType, int Original_ID, string Original_Title, string Original_INN, System.DateTime Original_StartDate, global::System.Nullable Original_QualityRating, string Original_SupplierType, int ID) { if ((Title == null)) { throw new global::System.ArgumentNullException("Title"); } else { this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title)); } if ((INN == null)) { throw new global::System.ArgumentNullException("INN"); } else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(INN)); } this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(StartDate)); if ((QualityRating.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(QualityRating.Value)); } else { this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; } if ((SupplierType == null)) { this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(SupplierType)); } this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ID)); if ((Original_Title == null)) { throw new global::System.ArgumentNullException("Original_Title"); } else { this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Title)); } if ((Original_INN == null)) { throw new global::System.ArgumentNullException("Original_INN"); } else { this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_INN)); } this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(Original_StartDate)); if ((Original_QualityRating.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_QualityRating.Value)); } else { this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; } if ((Original_SupplierType == null)) { this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_SupplierType)); } this.Adapter.UpdateCommand.Parameters[13].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", "16.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, string INN, System.DateTime StartDate, global::System.Nullable QualityRating, string SupplierType, int Original_ID, string Original_Title, string Original_INN, System.DateTime Original_StartDate, global::System.Nullable Original_QualityRating, string Original_SupplierType) { return this.Update(Title, INN, StartDate, QualityRating, SupplierType, Original_ID, Original_Title, Original_INN, Original_StartDate, Original_QualityRating, Original_SupplierType, Original_ID); } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 ItogSumProductTableAdapter : 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", "16.0.0.0")] public ItogSumProductTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "ItogSumProduct"; tableMapping.ColumnMappings.Add("Product", "Product"); tableMapping.ColumnMappings.Add("Cost", "Cost"); tableMapping.ColumnMappings.Add("ID", "ID"); this._adapter.TableMappings.Add(tableMapping); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 Product, Cost, ID FROM dbo.ItogSumProduct"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.ItogSumProductDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.ItogSumProductDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.ItogSumProductDataTable dataTable = new TestWSR4DataSet.ItogSumProductDataTable(); this.Adapter.Fill(dataTable); return dataTable; } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 ProductsPredTableAdapter : 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", "16.0.0.0")] public ProductsPredTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "ProductsPred"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("Title", "Title"); tableMapping.ColumnMappings.Add("Type", "Type"); tableMapping.ColumnMappings.Add("Cost", "Cost"); tableMapping.ColumnMappings.Add("ArticleNumber", "ArticleNumber"); tableMapping.ColumnMappings.Add("ProductionPersonCount", "ProductionPersonCount"); tableMapping.ColumnMappings.Add("ProductionWorkshopNumber", "ProductionWorkshopNumber"); tableMapping.ColumnMappings.Add("MinCostForAgent", "MinCostForAgent"); this._adapter.TableMappings.Add(tableMapping); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, Type, Cost, ArticleNumber, ProductionPersonCount, ProductionWor" + "kshopNumber, MinCostForAgent FROM dbo.ProductsPred"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.ProductsPredDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.ProductsPredDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.ProductsPredDataTable dataTable = new TestWSR4DataSet.ProductsPredDataTable(); this.Adapter.Fill(dataTable); return dataTable; } } /// ///Represents the connection and commands used to retrieve and save data. /// [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 ProizvProductTableAdapter : 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", "16.0.0.0")] public ProizvProductTableAdapter() { this.ClearBeforeFill = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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 = "ProizvProduct"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("Product", "Product"); tableMapping.ColumnMappings.Add("Material", "Material"); tableMapping.ColumnMappings.Add("Count", "Count"); tableMapping.ColumnMappings.Add("Cost", "Cost"); tableMapping.ColumnMappings.Add("Proizv", "Proizv"); this._adapter.TableMappings.Add(tableMapping); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitConnection() { this._connection = new global::System.Data.SqlClient.SqlConnection(); this._connection.ConnectionString = global::TestWSR4.Properties.Settings.Default.TestWSR4ConnectionString; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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, Product, Material, Count, Cost, Proizv FROM dbo.ProizvProduct"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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(TestWSR4DataSet.ProizvProductDataTable 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", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] public virtual TestWSR4DataSet.ProizvProductDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; TestWSR4DataSet.ProizvProductDataTable dataTable = new TestWSR4DataSet.ProizvProductDataTable(); this.Adapter.Fill(dataTable); return dataTable; } } /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// [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 AgentTableAdapter _agentTableAdapter; private AgentPriorityHistoryTableAdapter _agentPriorityHistoryTableAdapter; private AgentTypeTableAdapter _agentTypeTableAdapter; private MaterialTableAdapter _materialTableAdapter; private MaterialCountHistoryTableAdapter _materialCountHistoryTableAdapter; private MaterialSupplierTableAdapter _materialSupplierTableAdapter; private MaterialTypeTableAdapter _materialTypeTableAdapter; private ProductTableAdapter _productTableAdapter; private ProductCostHistoryTableAdapter _productCostHistoryTableAdapter; private ProductMaterialTableAdapter _productMaterialTableAdapter; private ProductSaleTableAdapter _productSaleTableAdapter; private ProductTypeTableAdapter _productTypeTableAdapter; private ShopTableAdapter _shopTableAdapter; private SupplierTableAdapter _supplierTableAdapter; private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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 AgentTableAdapter AgentTableAdapter { get { return this._agentTableAdapter; } set { this._agentTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 AgentPriorityHistoryTableAdapter AgentPriorityHistoryTableAdapter { get { return this._agentPriorityHistoryTableAdapter; } set { this._agentPriorityHistoryTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 AgentTypeTableAdapter AgentTypeTableAdapter { get { return this._agentTypeTableAdapter; } set { this._agentTypeTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 MaterialTableAdapter MaterialTableAdapter { get { return this._materialTableAdapter; } set { this._materialTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 MaterialCountHistoryTableAdapter MaterialCountHistoryTableAdapter { get { return this._materialCountHistoryTableAdapter; } set { this._materialCountHistoryTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 MaterialSupplierTableAdapter MaterialSupplierTableAdapter { get { return this._materialSupplierTableAdapter; } set { this._materialSupplierTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 MaterialTypeTableAdapter MaterialTypeTableAdapter { get { return this._materialTypeTableAdapter; } set { this._materialTypeTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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 ProductCostHistoryTableAdapter ProductCostHistoryTableAdapter { get { return this._productCostHistoryTableAdapter; } set { this._productCostHistoryTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 ProductMaterialTableAdapter ProductMaterialTableAdapter { get { return this._productMaterialTableAdapter; } set { this._productMaterialTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 ProductSaleTableAdapter ProductSaleTableAdapter { get { return this._productSaleTableAdapter; } set { this._productSaleTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 ProductTypeTableAdapter ProductTypeTableAdapter { get { return this._productTypeTableAdapter; } set { this._productTypeTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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 ShopTableAdapter ShopTableAdapter { get { return this._shopTableAdapter; } set { this._shopTableAdapter = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] public global::System.Data.IDbConnection Connection { get { if ((this._connection != null)) { return this._connection; } if (((this._agentTableAdapter != null) && (this._agentTableAdapter.Connection != null))) { return this._agentTableAdapter.Connection; } if (((this._agentPriorityHistoryTableAdapter != null) && (this._agentPriorityHistoryTableAdapter.Connection != null))) { return this._agentPriorityHistoryTableAdapter.Connection; } if (((this._agentTypeTableAdapter != null) && (this._agentTypeTableAdapter.Connection != null))) { return this._agentTypeTableAdapter.Connection; } if (((this._materialTableAdapter != null) && (this._materialTableAdapter.Connection != null))) { return this._materialTableAdapter.Connection; } if (((this._materialCountHistoryTableAdapter != null) && (this._materialCountHistoryTableAdapter.Connection != null))) { return this._materialCountHistoryTableAdapter.Connection; } if (((this._materialSupplierTableAdapter != null) && (this._materialSupplierTableAdapter.Connection != null))) { return this._materialSupplierTableAdapter.Connection; } if (((this._materialTypeTableAdapter != null) && (this._materialTypeTableAdapter.Connection != null))) { return this._materialTypeTableAdapter.Connection; } if (((this._productTableAdapter != null) && (this._productTableAdapter.Connection != null))) { return this._productTableAdapter.Connection; } if (((this._productCostHistoryTableAdapter != null) && (this._productCostHistoryTableAdapter.Connection != null))) { return this._productCostHistoryTableAdapter.Connection; } if (((this._productMaterialTableAdapter != null) && (this._productMaterialTableAdapter.Connection != null))) { return this._productMaterialTableAdapter.Connection; } if (((this._productSaleTableAdapter != null) && (this._productSaleTableAdapter.Connection != null))) { return this._productSaleTableAdapter.Connection; } if (((this._productTypeTableAdapter != null) && (this._productTypeTableAdapter.Connection != null))) { return this._productTypeTableAdapter.Connection; } if (((this._shopTableAdapter != null) && (this._shopTableAdapter.Connection != null))) { return this._shopTableAdapter.Connection; } if (((this._supplierTableAdapter != null) && (this._supplierTableAdapter.Connection != null))) { return this._supplierTableAdapter.Connection; } return null; } set { this._connection = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] public int TableAdapterInstanceCount { get { int count = 0; if ((this._agentTableAdapter != null)) { count = (count + 1); } if ((this._agentPriorityHistoryTableAdapter != null)) { count = (count + 1); } if ((this._agentTypeTableAdapter != null)) { count = (count + 1); } if ((this._materialTableAdapter != null)) { count = (count + 1); } if ((this._materialCountHistoryTableAdapter != null)) { count = (count + 1); } if ((this._materialSupplierTableAdapter != null)) { count = (count + 1); } if ((this._materialTypeTableAdapter != null)) { count = (count + 1); } if ((this._productTableAdapter != null)) { count = (count + 1); } if ((this._productCostHistoryTableAdapter != null)) { count = (count + 1); } if ((this._productMaterialTableAdapter != null)) { count = (count + 1); } if ((this._productSaleTableAdapter != null)) { count = (count + 1); } if ((this._productTypeTableAdapter != null)) { count = (count + 1); } if ((this._shopTableAdapter != null)) { count = (count + 1); } if ((this._supplierTableAdapter != null)) { count = (count + 1); } return count; } } /// ///Update rows in top-down order. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateUpdatedRows(TestWSR4DataSet dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { int result = 0; if ((this._agentTypeTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.AgentType.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._agentTypeTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._materialTypeTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.MaterialType.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._materialTypeTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._productTypeTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.ProductType.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._productTypeTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._agentTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Agent.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._agentTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._materialTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Material.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._materialTableAdapter.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._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); } } if ((this._shopTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Shop.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._shopTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._productSaleTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.ProductSale.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._productSaleTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._productCostHistoryTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.ProductCostHistory.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._productCostHistoryTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._materialSupplierTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.MaterialSupplier.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._materialSupplierTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._materialCountHistoryTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.MaterialCountHistory.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._materialCountHistoryTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._agentPriorityHistoryTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.AgentPriorityHistory.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._agentPriorityHistoryTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } if ((this._productMaterialTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.ProductMaterial.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { result = (result + this._productMaterialTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } return result; } /// ///Insert rows in top-down order. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateInsertedRows(TestWSR4DataSet dataSet, global::System.Collections.Generic.List allAddedRows) { int result = 0; if ((this._agentTypeTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.AgentType.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._agentTypeTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._materialTypeTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.MaterialType.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._materialTypeTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._productTypeTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.ProductType.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._productTypeTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._agentTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Agent.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._agentTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._materialTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Material.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._materialTableAdapter.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._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); } } if ((this._shopTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Shop.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._shopTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._productSaleTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.ProductSale.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._productSaleTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._productCostHistoryTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.ProductCostHistory.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._productCostHistoryTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._materialSupplierTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.MaterialSupplier.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._materialSupplierTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._materialCountHistoryTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.MaterialCountHistory.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._materialCountHistoryTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._agentPriorityHistoryTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.AgentPriorityHistory.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._agentPriorityHistoryTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } if ((this._productMaterialTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.ProductMaterial.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { result = (result + this._productMaterialTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } return result; } /// ///Delete rows in bottom-up order. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateDeletedRows(TestWSR4DataSet dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; if ((this._productMaterialTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.ProductMaterial.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._productMaterialTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._agentPriorityHistoryTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.AgentPriorityHistory.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._agentPriorityHistoryTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._materialCountHistoryTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.MaterialCountHistory.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._materialCountHistoryTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._materialSupplierTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.MaterialSupplier.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._materialSupplierTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._productCostHistoryTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.ProductCostHistory.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._productCostHistoryTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._productSaleTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.ProductSale.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._productSaleTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._shopTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Shop.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._shopTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } 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._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._materialTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Material.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._materialTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._agentTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Agent.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._agentTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._productTypeTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.ProductType.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._productTypeTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._materialTypeTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.MaterialType.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._materialTypeTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } if ((this._agentTypeTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.AgentType.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { result = (result + this._agentTypeTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } return result; } /// ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List allAddedRows) { if (((updatedRows == null) || (updatedRows.Length < 1))) { return updatedRows; } if (((allAddedRows == null) || (allAddedRows.Count < 1))) { return updatedRows; } global::System.Collections.Generic.List realUpdatedRows = new global::System.Collections.Generic.List(); 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(); } /// ///Update all changes to the dataset. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public virtual int UpdateAll(TestWSR4DataSet dataSet) { if ((dataSet == null)) { throw new global::System.ArgumentNullException("dataSet"); } if ((dataSet.HasChanges() == false)) { return 0; } if (((this._agentTableAdapter != null) && (this.MatchTableAdapterConnection(this._agentTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._agentPriorityHistoryTableAdapter != null) && (this.MatchTableAdapterConnection(this._agentPriorityHistoryTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._agentTypeTableAdapter != null) && (this.MatchTableAdapterConnection(this._agentTypeTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._materialTableAdapter != null) && (this.MatchTableAdapterConnection(this._materialTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._materialCountHistoryTableAdapter != null) && (this.MatchTableAdapterConnection(this._materialCountHistoryTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._materialSupplierTableAdapter != null) && (this.MatchTableAdapterConnection(this._materialSupplierTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._materialTypeTableAdapter != null) && (this.MatchTableAdapterConnection(this._materialTypeTableAdapter.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._productCostHistoryTableAdapter != null) && (this.MatchTableAdapterConnection(this._productCostHistoryTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._productMaterialTableAdapter != null) && (this.MatchTableAdapterConnection(this._productMaterialTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._productSaleTableAdapter != null) && (this.MatchTableAdapterConnection(this._productSaleTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._productTypeTableAdapter != null) && (this.MatchTableAdapterConnection(this._productTypeTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" + "r, должны использовать одинаковую строку подключения."); } if (((this._shopTableAdapter != null) && (this.MatchTableAdapterConnection(this._shopTableAdapter.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, должны использовать одинаковую строку подключения."); } 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 allChangedRows = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List allAddedRows = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List(); global::System.Collections.Generic.Dictionary revertConnections = new global::System.Collections.Generic.Dictionary(); 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._agentTableAdapter != null)) { revertConnections.Add(this._agentTableAdapter, this._agentTableAdapter.Connection); this._agentTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._agentTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._agentTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._agentTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._agentTableAdapter.Adapter); } } if ((this._agentPriorityHistoryTableAdapter != null)) { revertConnections.Add(this._agentPriorityHistoryTableAdapter, this._agentPriorityHistoryTableAdapter.Connection); this._agentPriorityHistoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._agentPriorityHistoryTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._agentPriorityHistoryTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._agentPriorityHistoryTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._agentPriorityHistoryTableAdapter.Adapter); } } if ((this._agentTypeTableAdapter != null)) { revertConnections.Add(this._agentTypeTableAdapter, this._agentTypeTableAdapter.Connection); this._agentTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._agentTypeTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._agentTypeTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._agentTypeTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._agentTypeTableAdapter.Adapter); } } if ((this._materialTableAdapter != null)) { revertConnections.Add(this._materialTableAdapter, this._materialTableAdapter.Connection); this._materialTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._materialTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._materialTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._materialTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._materialTableAdapter.Adapter); } } if ((this._materialCountHistoryTableAdapter != null)) { revertConnections.Add(this._materialCountHistoryTableAdapter, this._materialCountHistoryTableAdapter.Connection); this._materialCountHistoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._materialCountHistoryTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._materialCountHistoryTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._materialCountHistoryTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._materialCountHistoryTableAdapter.Adapter); } } if ((this._materialSupplierTableAdapter != null)) { revertConnections.Add(this._materialSupplierTableAdapter, this._materialSupplierTableAdapter.Connection); this._materialSupplierTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._materialSupplierTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._materialSupplierTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._materialSupplierTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._materialSupplierTableAdapter.Adapter); } } if ((this._materialTypeTableAdapter != null)) { revertConnections.Add(this._materialTypeTableAdapter, this._materialTypeTableAdapter.Connection); this._materialTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._materialTypeTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._materialTypeTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._materialTypeTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._materialTypeTableAdapter.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._productCostHistoryTableAdapter != null)) { revertConnections.Add(this._productCostHistoryTableAdapter, this._productCostHistoryTableAdapter.Connection); this._productCostHistoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._productCostHistoryTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._productCostHistoryTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._productCostHistoryTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._productCostHistoryTableAdapter.Adapter); } } if ((this._productMaterialTableAdapter != null)) { revertConnections.Add(this._productMaterialTableAdapter, this._productMaterialTableAdapter.Connection); this._productMaterialTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._productMaterialTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._productMaterialTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._productMaterialTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._productMaterialTableAdapter.Adapter); } } if ((this._productSaleTableAdapter != null)) { revertConnections.Add(this._productSaleTableAdapter, this._productSaleTableAdapter.Connection); this._productSaleTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._productSaleTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._productSaleTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._productSaleTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._productSaleTableAdapter.Adapter); } } if ((this._productTypeTableAdapter != null)) { revertConnections.Add(this._productTypeTableAdapter, this._productTypeTableAdapter.Connection); this._productTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._productTypeTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._productTypeTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._productTypeTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._productTypeTableAdapter.Adapter); } } if ((this._shopTableAdapter != null)) { revertConnections.Add(this._shopTableAdapter, this._shopTableAdapter.Connection); this._shopTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); this._shopTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); if (this._shopTableAdapter.Adapter.AcceptChangesDuringUpdate) { this._shopTableAdapter.Adapter.AcceptChangesDuringUpdate = false; adaptersWithAcceptChangesDuringUpdate.Add(this._shopTableAdapter.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); } } // //---- 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._agentTableAdapter != null)) { this._agentTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._agentTableAdapter])); this._agentTableAdapter.Transaction = null; } if ((this._agentPriorityHistoryTableAdapter != null)) { this._agentPriorityHistoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._agentPriorityHistoryTableAdapter])); this._agentPriorityHistoryTableAdapter.Transaction = null; } if ((this._agentTypeTableAdapter != null)) { this._agentTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._agentTypeTableAdapter])); this._agentTypeTableAdapter.Transaction = null; } if ((this._materialTableAdapter != null)) { this._materialTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._materialTableAdapter])); this._materialTableAdapter.Transaction = null; } if ((this._materialCountHistoryTableAdapter != null)) { this._materialCountHistoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._materialCountHistoryTableAdapter])); this._materialCountHistoryTableAdapter.Transaction = null; } if ((this._materialSupplierTableAdapter != null)) { this._materialSupplierTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._materialSupplierTableAdapter])); this._materialSupplierTableAdapter.Transaction = null; } if ((this._materialTypeTableAdapter != null)) { this._materialTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._materialTypeTableAdapter])); this._materialTypeTableAdapter.Transaction = null; } if ((this._productTableAdapter != null)) { this._productTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productTableAdapter])); this._productTableAdapter.Transaction = null; } if ((this._productCostHistoryTableAdapter != null)) { this._productCostHistoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productCostHistoryTableAdapter])); this._productCostHistoryTableAdapter.Transaction = null; } if ((this._productMaterialTableAdapter != null)) { this._productMaterialTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productMaterialTableAdapter])); this._productMaterialTableAdapter.Transaction = null; } if ((this._productSaleTableAdapter != null)) { this._productSaleTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productSaleTableAdapter])); this._productSaleTableAdapter.Transaction = null; } if ((this._productTypeTableAdapter != null)) { this._productTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productTypeTableAdapter])); this._productTypeTableAdapter.Transaction = null; } if ((this._shopTableAdapter != null)) { this._shopTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._shopTableAdapter])); this._shopTableAdapter.Transaction = null; } if ((this._supplierTableAdapter != null)) { this._supplierTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._supplierTableAdapter])); this._supplierTableAdapter.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", "16.0.0.0")] protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) { global::System.Array.Sort(rows, new SelfReferenceComparer(relation, childFirst)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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; } /// ///Update Order Option /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public enum UpdateOrderOption { InsertUpdateDelete = 0, UpdateInsertDelete = 1, } /// ///Used to sort self-referenced table's rows /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer { private global::System.Data.DataRelation _relation; private int _childFirst; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.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 traversedRows = new global::System.Collections.Generic.Dictionary(); 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", "16.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