//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50215.44
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Northwind {
    using System;
    
    
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
    [System.Xml.Serialization.XmlRootAttribute("NorthwindDataSet")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Usage", "CA2240:ImplementISerializableCorrectly")]
    public partial class NorthwindDataSet : System.Data.DataSet {
        
        private DostawcyDataTable tableDostawcy;
        
        private ProduktyDataTable tableProdukty;
        
        private KategorieDataTable tableKategorie;
        
        private System.Data.DataRelation relationDostawcyProdukty;
        
        private System.Data.DataRelation relationKategorieProdukty;
        
        private System.Data.SchemaSerializationMode _schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
        
        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public NorthwindDataSet() {
            this.BeginInit();
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            base.Tables.CollectionChanged += schemaChangedHandler;
            base.Relations.CollectionChanged += schemaChangedHandler;
            this.EndInit();
        }
        
        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        protected NorthwindDataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                base(info, context) {
            if ((this.IsBinarySerialized(info, context) == true)) {
                this.InitVars(false);
                System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
                this.Tables.CollectionChanged += schemaChangedHandler1;
                this.Relations.CollectionChanged += schemaChangedHandler1;
                return;
            }
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((this.DetermineSchemaSerializationMode(info, context) == System.Data.SchemaSerializationMode.IncludeSchema)) {
                System.Data.DataSet ds = new System.Data.DataSet();
                ds.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
                if ((ds.Tables["Dostawcy"] != null)) {
                    base.Tables.Add(new DostawcyDataTable(ds.Tables["Dostawcy"]));
                }
                if ((ds.Tables["Produkty"] != null)) {
                    base.Tables.Add(new ProduktyDataTable(ds.Tables["Produkty"]));
                }
                if ((ds.Tables["Kategorie"] != null)) {
                    base.Tables.Add(new KategorieDataTable(ds.Tables["Kategorie"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
            }
            this.GetSerializationData(info, context);
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            base.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public DostawcyDataTable Dostawcy {
            get {
                return this.tableDostawcy;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProduktyDataTable Produkty {
            get {
                return this.tableProdukty;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public KategorieDataTable Kategorie {
            get {
                return this.tableKategorie;
            }
        }
        
        public override System.Data.SchemaSerializationMode SchemaSerializationMode {
            get {
                return this._schemaSerializationMode;
            }
            set {
                this._schemaSerializationMode = value;
            }
        }
        
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new System.Data.DataTableCollection Tables {
            get {
                return base.Tables;
            }
        }
        
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
        public new System.Data.DataRelationCollection Relations {
            get {
                return base.Relations;
            }
        }
        
        [System.ComponentModel.DefaultValueAttribute(true)]
        public new bool EnforceConstraints {
            get {
                return base.EnforceConstraints;
            }
            set {
                base.EnforceConstraints = value;
            }
        }
        
        protected override void InitializeDerivedDataSet() {
            this.BeginInit();
            this.InitClass();
            this.EndInit();
        }
        
        public override System.Data.DataSet Clone() {
            NorthwindDataSet cln = ((NorthwindDataSet)(base.Clone()));
            cln.InitVars();
            return cln;
        }
        
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        protected override void ReadXmlSerializable(System.Xml.XmlReader reader) {
            if ((this.DetermineSchemaSerializationMode(reader) == System.Data.SchemaSerializationMode.IncludeSchema)) {
                this.Reset();
                System.Data.DataSet ds = new System.Data.DataSet();
                ds.ReadXml(reader);
                if ((ds.Tables["Dostawcy"] != null)) {
                    base.Tables.Add(new DostawcyDataTable(ds.Tables["Dostawcy"]));
                }
                if ((ds.Tables["Produkty"] != null)) {
                    base.Tables.Add(new ProduktyDataTable(ds.Tables["Produkty"]));
                }
                if ((ds.Tables["Kategorie"] != null)) {
                    base.Tables.Add(new KategorieDataTable(ds.Tables["Kategorie"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.ReadXml(reader);
                this.InitVars();
            }
        }
        
        protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            this.WriteXmlSchema(new System.Xml.XmlTextWriter(stream, null));
            stream.Position = 0;
            return System.Xml.Schema.XmlSchema.Read(new System.Xml.XmlTextReader(stream), null);
        }
        
        internal void InitVars() {
            this.InitVars(true);
        }
        
        internal void InitVars(bool initTable) {
            this.tableDostawcy = ((DostawcyDataTable)(base.Tables["Dostawcy"]));
            if ((initTable == true)) {
                if ((this.tableDostawcy != null)) {
                    this.tableDostawcy.InitVars();
                }
            }
            this.tableProdukty = ((ProduktyDataTable)(base.Tables["Produkty"]));
            if ((initTable == true)) {
                if ((this.tableProdukty != null)) {
                    this.tableProdukty.InitVars();
                }
            }
            this.tableKategorie = ((KategorieDataTable)(base.Tables["Kategorie"]));
            if ((initTable == true)) {
                if ((this.tableKategorie != null)) {
                    this.tableKategorie.InitVars();
                }
            }
            this.relationDostawcyProdukty = this.Relations["DostawcyProdukty"];
            this.relationKategorieProdukty = this.Relations["KategorieProdukty"];
        }
        
        private void InitClass() {
            this.DataSetName = "NorthwindDataSet";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/NorthwindDataSet.xsd";
            this.EnforceConstraints = true;
            this.tableDostawcy = new DostawcyDataTable();
            base.Tables.Add(this.tableDostawcy);
            this.tableProdukty = new ProduktyDataTable();
            base.Tables.Add(this.tableProdukty);
            this.tableKategorie = new KategorieDataTable();
            base.Tables.Add(this.tableKategorie);
            this.relationDostawcyProdukty = new System.Data.DataRelation("DostawcyProdukty", new System.Data.DataColumn[] {
                        this.tableDostawcy.IDdostawcyColumn}, new System.Data.DataColumn[] {
                        this.tableProdukty.IDdostawcyColumn}, false);
            this.Relations.Add(this.relationDostawcyProdukty);
            this.relationKategorieProdukty = new System.Data.DataRelation("KategorieProdukty", new System.Data.DataColumn[] {
                        this.tableKategorie.IDkategoriiColumn}, new System.Data.DataColumn[] {
                        this.tableProdukty.IDkategoriiColumn}, false);
            this.Relations.Add(this.relationKategorieProdukty);
        }
        
        private bool ShouldSerializeDostawcy() {
            return false;
        }
        
        private bool ShouldSerializeProdukty() {
            return false;
        }
        
        private bool ShouldSerializeKategorie() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) {
            NorthwindDataSet ds = new NorthwindDataSet();
            System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
            System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
            xs.Add(ds.GetSchemaSerializable());
            System.Xml.Schema.XmlSchemaAny any = new System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            return type;
        }
        
        public delegate void DostawcyRowChangeEventHandler(object sender, DostawcyRowChangeEvent e);
        
        public delegate void ProduktyRowChangeEventHandler(object sender, ProduktyRowChangeEvent e);
        
        public delegate void KategorieRowChangeEventHandler(object sender, KategorieRowChangeEvent e);
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class DostawcyDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnIDdostawcy;
            
            private System.Data.DataColumn columnNazwaFirmy;
            
            private System.Data.DataColumn columnPrzedstawiciel;
            
            private System.Data.DataColumn columnStanowiskoPrzedstawiciela;
            
            private System.Data.DataColumn columnAdres;
            
            private System.Data.DataColumn columnMiasto;
            
            private System.Data.DataColumn columnRegion;
            
            private System.Data.DataColumn columnKodPocztowy;
            
            private System.Data.DataColumn columnKraj;
            
            private System.Data.DataColumn columnTelefon;
            
            private System.Data.DataColumn columnFaks;
            
            private System.Data.DataColumn columnStronaMacierzysta;
            
            public DostawcyDataTable() {
                this.TableName = "Dostawcy";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal DostawcyDataTable(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;
            }
            
            protected DostawcyDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn IDdostawcyColumn {
                get {
                    return this.columnIDdostawcy;
                }
            }
            
            public System.Data.DataColumn NazwaFirmyColumn {
                get {
                    return this.columnNazwaFirmy;
                }
            }
            
            public System.Data.DataColumn PrzedstawicielColumn {
                get {
                    return this.columnPrzedstawiciel;
                }
            }
            
            public System.Data.DataColumn StanowiskoPrzedstawicielaColumn {
                get {
                    return this.columnStanowiskoPrzedstawiciela;
                }
            }
            
            public System.Data.DataColumn AdresColumn {
                get {
                    return this.columnAdres;
                }
            }
            
            public System.Data.DataColumn MiastoColumn {
                get {
                    return this.columnMiasto;
                }
            }
            
            public System.Data.DataColumn RegionColumn {
                get {
                    return this.columnRegion;
                }
            }
            
            public System.Data.DataColumn KodPocztowyColumn {
                get {
                    return this.columnKodPocztowy;
                }
            }
            
            public System.Data.DataColumn KrajColumn {
                get {
                    return this.columnKraj;
                }
            }
            
            public System.Data.DataColumn TelefonColumn {
                get {
                    return this.columnTelefon;
                }
            }
            
            public System.Data.DataColumn FaksColumn {
                get {
                    return this.columnFaks;
                }
            }
            
            public System.Data.DataColumn StronaMacierzystaColumn {
                get {
                    return this.columnStronaMacierzysta;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public DostawcyRow this[int index] {
                get {
                    return ((DostawcyRow)(this.Rows[index]));
                }
            }
            
            public event DostawcyRowChangeEventHandler DostawcyRowChanged;
            
            public event DostawcyRowChangeEventHandler DostawcyRowChanging;
            
            public event DostawcyRowChangeEventHandler DostawcyRowDeleted;
            
            public event DostawcyRowChangeEventHandler DostawcyRowDeleting;
            
            public void AddDostawcyRow(DostawcyRow row) {
                this.Rows.Add(row);
            }
            
            public DostawcyRow AddDostawcyRow(string NazwaFirmy, string Przedstawiciel, string StanowiskoPrzedstawiciela, string Adres, string Miasto, string Region, string KodPocztowy, string Kraj, string Telefon, string Faks, string StronaMacierzysta) {
                DostawcyRow rowDostawcyRow = ((DostawcyRow)(this.NewRow()));
                rowDostawcyRow.ItemArray = new object[] {
                        null,
                        NazwaFirmy,
                        Przedstawiciel,
                        StanowiskoPrzedstawiciela,
                        Adres,
                        Miasto,
                        Region,
                        KodPocztowy,
                        Kraj,
                        Telefon,
                        Faks,
                        StronaMacierzysta};
                this.Rows.Add(rowDostawcyRow);
                return rowDostawcyRow;
            }
            
            public DostawcyRow FindByIDdostawcy(int IDdostawcy) {
                return ((DostawcyRow)(this.Rows.Find(new object[] {
                            IDdostawcy})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                DostawcyDataTable cln = ((DostawcyDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new DostawcyDataTable();
            }
            
            internal void InitVars() {
                this.columnIDdostawcy = base.Columns["IDdostawcy"];
                this.columnNazwaFirmy = base.Columns["NazwaFirmy"];
                this.columnPrzedstawiciel = base.Columns["Przedstawiciel"];
                this.columnStanowiskoPrzedstawiciela = base.Columns["StanowiskoPrzedstawiciela"];
                this.columnAdres = base.Columns["Adres"];
                this.columnMiasto = base.Columns["Miasto"];
                this.columnRegion = base.Columns["Region"];
                this.columnKodPocztowy = base.Columns["KodPocztowy"];
                this.columnKraj = base.Columns["Kraj"];
                this.columnTelefon = base.Columns["Telefon"];
                this.columnFaks = base.Columns["Faks"];
                this.columnStronaMacierzysta = base.Columns["StronaMacierzysta"];
            }
            
            private void InitClass() {
                this.columnIDdostawcy = new System.Data.DataColumn("IDdostawcy", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIDdostawcy);
                this.columnNazwaFirmy = new System.Data.DataColumn("NazwaFirmy", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNazwaFirmy);
                this.columnPrzedstawiciel = new System.Data.DataColumn("Przedstawiciel", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnPrzedstawiciel);
                this.columnStanowiskoPrzedstawiciela = new System.Data.DataColumn("StanowiskoPrzedstawiciela", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStanowiskoPrzedstawiciela);
                this.columnAdres = new System.Data.DataColumn("Adres", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnAdres);
                this.columnMiasto = new System.Data.DataColumn("Miasto", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnMiasto);
                this.columnRegion = new System.Data.DataColumn("Region", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRegion);
                this.columnKodPocztowy = new System.Data.DataColumn("KodPocztowy", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnKodPocztowy);
                this.columnKraj = new System.Data.DataColumn("Kraj", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnKraj);
                this.columnTelefon = new System.Data.DataColumn("Telefon", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnTelefon);
                this.columnFaks = new System.Data.DataColumn("Faks", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnFaks);
                this.columnStronaMacierzysta = new System.Data.DataColumn("StronaMacierzysta", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStronaMacierzysta);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnIDdostawcy}, true));
                this.columnIDdostawcy.AutoIncrement = true;
                this.columnIDdostawcy.AllowDBNull = false;
                this.columnIDdostawcy.Unique = true;
                this.columnNazwaFirmy.MaxLength = 40;
                this.columnPrzedstawiciel.MaxLength = 30;
                this.columnStanowiskoPrzedstawiciela.MaxLength = 30;
                this.columnAdres.MaxLength = 60;
                this.columnMiasto.MaxLength = 15;
                this.columnRegion.MaxLength = 15;
                this.columnKodPocztowy.MaxLength = 10;
                this.columnKraj.MaxLength = 15;
                this.columnTelefon.MaxLength = 24;
                this.columnFaks.MaxLength = 24;
                this.columnStronaMacierzysta.MaxLength = 536870910;
            }
            
            public DostawcyRow NewDostawcyRow() {
                return ((DostawcyRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new DostawcyRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(DostawcyRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.DostawcyRowChanged != null)) {
                    this.DostawcyRowChanged(this, new DostawcyRowChangeEvent(((DostawcyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.DostawcyRowChanging != null)) {
                    this.DostawcyRowChanging(this, new DostawcyRowChangeEvent(((DostawcyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.DostawcyRowDeleted != null)) {
                    this.DostawcyRowDeleted(this, new DostawcyRowChangeEvent(((DostawcyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.DostawcyRowDeleting != null)) {
                    this.DostawcyRowDeleting(this, new DostawcyRowChangeEvent(((DostawcyRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveDostawcyRow(DostawcyRow row) {
                this.Rows.Remove(row);
            }
            
            public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) {
                System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
                System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
                NorthwindDataSet ds = new NorthwindDataSet();
                xs.Add(ds.GetSchemaSerializable());
                System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny();
                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs = new decimal(0);
                any1.MaxOccurs = decimal.MaxValue;
                any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny();
                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs = new decimal(1);
                any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name = "tableTypeName";
                attribute2.FixedValue = "DostawcyDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class ProduktyDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnIDproduktu;
            
            private System.Data.DataColumn columnNazwaProduktu;
            
            private System.Data.DataColumn columnIDdostawcy;
            
            private System.Data.DataColumn columnIDkategorii;
            
            private System.Data.DataColumn columnIlośćJednostkowa;
            
            private System.Data.DataColumn columnCenaJednostkowa;
            
            private System.Data.DataColumn columnStanMagazynu;
            
            private System.Data.DataColumn columnIlośćZamówiona;
            
            private System.Data.DataColumn columnStanMinimum;
            
            private System.Data.DataColumn columnWycofany;
            
            public ProduktyDataTable() {
                this.TableName = "Produkty";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal ProduktyDataTable(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;
            }
            
            protected ProduktyDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn IDproduktuColumn {
                get {
                    return this.columnIDproduktu;
                }
            }
            
            public System.Data.DataColumn NazwaProduktuColumn {
                get {
                    return this.columnNazwaProduktu;
                }
            }
            
            public System.Data.DataColumn IDdostawcyColumn {
                get {
                    return this.columnIDdostawcy;
                }
            }
            
            public System.Data.DataColumn IDkategoriiColumn {
                get {
                    return this.columnIDkategorii;
                }
            }
            
            public System.Data.DataColumn IlośćJednostkowaColumn {
                get {
                    return this.columnIlośćJednostkowa;
                }
            }
            
            public System.Data.DataColumn CenaJednostkowaColumn {
                get {
                    return this.columnCenaJednostkowa;
                }
            }
            
            public System.Data.DataColumn StanMagazynuColumn {
                get {
                    return this.columnStanMagazynu;
                }
            }
            
            public System.Data.DataColumn IlośćZamówionaColumn {
                get {
                    return this.columnIlośćZamówiona;
                }
            }
            
            public System.Data.DataColumn StanMinimumColumn {
                get {
                    return this.columnStanMinimum;
                }
            }
            
            public System.Data.DataColumn WycofanyColumn {
                get {
                    return this.columnWycofany;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public ProduktyRow this[int index] {
                get {
                    return ((ProduktyRow)(this.Rows[index]));
                }
            }
            
            public event ProduktyRowChangeEventHandler ProduktyRowChanged;
            
            public event ProduktyRowChangeEventHandler ProduktyRowChanging;
            
            public event ProduktyRowChangeEventHandler ProduktyRowDeleted;
            
            public event ProduktyRowChangeEventHandler ProduktyRowDeleting;
            
            public void AddProduktyRow(ProduktyRow row) {
                this.Rows.Add(row);
            }
            
            public ProduktyRow AddProduktyRow(string NazwaProduktu, DostawcyRow parentDostawcyRowByDostawcyProdukty, KategorieRow parentKategorieRowByKategorieProdukty, string IlośćJednostkowa, decimal CenaJednostkowa, short StanMagazynu, short IlośćZamówiona, short StanMinimum, bool Wycofany) {
                ProduktyRow rowProduktyRow = ((ProduktyRow)(this.NewRow()));
                rowProduktyRow.ItemArray = new object[] {
                        null,
                        NazwaProduktu,
                        parentDostawcyRowByDostawcyProdukty[0],
                        parentKategorieRowByKategorieProdukty[0],
                        IlośćJednostkowa,
                        CenaJednostkowa,
                        StanMagazynu,
                        IlośćZamówiona,
                        StanMinimum,
                        Wycofany};
                this.Rows.Add(rowProduktyRow);
                return rowProduktyRow;
            }
            
            public ProduktyRow FindByIDproduktu(int IDproduktu) {
                return ((ProduktyRow)(this.Rows.Find(new object[] {
                            IDproduktu})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                ProduktyDataTable cln = ((ProduktyDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new ProduktyDataTable();
            }
            
            internal void InitVars() {
                this.columnIDproduktu = base.Columns["IDproduktu"];
                this.columnNazwaProduktu = base.Columns["NazwaProduktu"];
                this.columnIDdostawcy = base.Columns["IDdostawcy"];
                this.columnIDkategorii = base.Columns["IDkategorii"];
                this.columnIlośćJednostkowa = base.Columns["IlośćJednostkowa"];
                this.columnCenaJednostkowa = base.Columns["CenaJednostkowa"];
                this.columnStanMagazynu = base.Columns["StanMagazynu"];
                this.columnIlośćZamówiona = base.Columns["IlośćZamówiona"];
                this.columnStanMinimum = base.Columns["StanMinimum"];
                this.columnWycofany = base.Columns["Wycofany"];
            }
            
            private void InitClass() {
                this.columnIDproduktu = new System.Data.DataColumn("IDproduktu", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIDproduktu);
                this.columnNazwaProduktu = new System.Data.DataColumn("NazwaProduktu", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNazwaProduktu);
                this.columnIDdostawcy = new System.Data.DataColumn("IDdostawcy", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIDdostawcy);
                this.columnIDkategorii = new System.Data.DataColumn("IDkategorii", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIDkategorii);
                this.columnIlośćJednostkowa = new System.Data.DataColumn("IlośćJednostkowa", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIlośćJednostkowa);
                this.columnCenaJednostkowa = new System.Data.DataColumn("CenaJednostkowa", typeof(decimal), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnCenaJednostkowa);
                this.columnStanMagazynu = new System.Data.DataColumn("StanMagazynu", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStanMagazynu);
                this.columnIlośćZamówiona = new System.Data.DataColumn("IlośćZamówiona", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIlośćZamówiona);
                this.columnStanMinimum = new System.Data.DataColumn("StanMinimum", typeof(short), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnStanMinimum);
                this.columnWycofany = new System.Data.DataColumn("Wycofany", typeof(bool), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnWycofany);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnIDproduktu}, true));
                this.columnIDproduktu.AutoIncrement = true;
                this.columnIDproduktu.AllowDBNull = false;
                this.columnIDproduktu.Unique = true;
                this.columnNazwaProduktu.MaxLength = 40;
                this.columnIlośćJednostkowa.MaxLength = 255;
            }
            
            public ProduktyRow NewProduktyRow() {
                return ((ProduktyRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new ProduktyRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProduktyRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProduktyRowChanged != null)) {
                    this.ProduktyRowChanged(this, new ProduktyRowChangeEvent(((ProduktyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProduktyRowChanging != null)) {
                    this.ProduktyRowChanging(this, new ProduktyRowChangeEvent(((ProduktyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProduktyRowDeleted != null)) {
                    this.ProduktyRowDeleted(this, new ProduktyRowChangeEvent(((ProduktyRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProduktyRowDeleting != null)) {
                    this.ProduktyRowDeleting(this, new ProduktyRowChangeEvent(((ProduktyRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProduktyRow(ProduktyRow row) {
                this.Rows.Remove(row);
            }
            
            public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) {
                System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
                System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
                NorthwindDataSet ds = new NorthwindDataSet();
                xs.Add(ds.GetSchemaSerializable());
                System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny();
                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs = new decimal(0);
                any1.MaxOccurs = decimal.MaxValue;
                any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny();
                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs = new decimal(1);
                any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name = "tableTypeName";
                attribute2.FixedValue = "ProduktyDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        [System.Serializable()]
        [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
        public partial class KategorieDataTable : System.Data.DataTable, System.Collections.IEnumerable {
            
            private System.Data.DataColumn columnIDkategorii;
            
            private System.Data.DataColumn columnNazwaKategorii;
            
            private System.Data.DataColumn columnOpis;
            
            private System.Data.DataColumn columnRysunek;
            
            public KategorieDataTable() {
                this.TableName = "Kategorie";
                this.BeginInit();
                this.InitClass();
                this.EndInit();
            }
            
            internal KategorieDataTable(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;
            }
            
            protected KategorieDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : 
                    base(info, context) {
                this.InitVars();
            }
            
            public System.Data.DataColumn IDkategoriiColumn {
                get {
                    return this.columnIDkategorii;
                }
            }
            
            public System.Data.DataColumn NazwaKategoriiColumn {
                get {
                    return this.columnNazwaKategorii;
                }
            }
            
            public System.Data.DataColumn OpisColumn {
                get {
                    return this.columnOpis;
                }
            }
            
            public System.Data.DataColumn RysunekColumn {
                get {
                    return this.columnRysunek;
                }
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            public KategorieRow this[int index] {
                get {
                    return ((KategorieRow)(this.Rows[index]));
                }
            }
            
            public event KategorieRowChangeEventHandler KategorieRowChanged;
            
            public event KategorieRowChangeEventHandler KategorieRowChanging;
            
            public event KategorieRowChangeEventHandler KategorieRowDeleted;
            
            public event KategorieRowChangeEventHandler KategorieRowDeleting;
            
            public void AddKategorieRow(KategorieRow row) {
                this.Rows.Add(row);
            }
            
            public KategorieRow AddKategorieRow(string NazwaKategorii, string Opis, byte[] Rysunek) {
                KategorieRow rowKategorieRow = ((KategorieRow)(this.NewRow()));
                rowKategorieRow.ItemArray = new object[] {
                        null,
                        NazwaKategorii,
                        Opis,
                        Rysunek};
                this.Rows.Add(rowKategorieRow);
                return rowKategorieRow;
            }
            
            public KategorieRow FindByIDkategorii(int IDkategorii) {
                return ((KategorieRow)(this.Rows.Find(new object[] {
                            IDkategorii})));
            }
            
            public virtual System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override System.Data.DataTable Clone() {
                KategorieDataTable cln = ((KategorieDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override System.Data.DataTable CreateInstance() {
                return new KategorieDataTable();
            }
            
            internal void InitVars() {
                this.columnIDkategorii = base.Columns["IDkategorii"];
                this.columnNazwaKategorii = base.Columns["NazwaKategorii"];
                this.columnOpis = base.Columns["Opis"];
                this.columnRysunek = base.Columns["Rysunek"];
            }
            
            private void InitClass() {
                this.columnIDkategorii = new System.Data.DataColumn("IDkategorii", typeof(int), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnIDkategorii);
                this.columnNazwaKategorii = new System.Data.DataColumn("NazwaKategorii", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnNazwaKategorii);
                this.columnOpis = new System.Data.DataColumn("Opis", typeof(string), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnOpis);
                this.columnRysunek = new System.Data.DataColumn("Rysunek", typeof(byte[]), null, System.Data.MappingType.Element);
                base.Columns.Add(this.columnRysunek);
                this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
                                this.columnIDkategorii}, true));
                this.columnIDkategorii.AutoIncrement = true;
                this.columnIDkategorii.AllowDBNull = false;
                this.columnIDkategorii.Unique = true;
                this.columnNazwaKategorii.MaxLength = 20;
                this.columnOpis.MaxLength = 536870910;
            }
            
            public KategorieRow NewKategorieRow() {
                return ((KategorieRow)(this.NewRow()));
            }
            
            protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
                return new KategorieRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(KategorieRow);
            }
            
            protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.KategorieRowChanged != null)) {
                    this.KategorieRowChanged(this, new KategorieRowChangeEvent(((KategorieRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.KategorieRowChanging != null)) {
                    this.KategorieRowChanging(this, new KategorieRowChangeEvent(((KategorieRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.KategorieRowDeleted != null)) {
                    this.KategorieRowDeleted(this, new KategorieRowChangeEvent(((KategorieRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.KategorieRowDeleting != null)) {
                    this.KategorieRowDeleting(this, new KategorieRowChangeEvent(((KategorieRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveKategorieRow(KategorieRow row) {
                this.Rows.Remove(row);
            }
            
            public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) {
                System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
                System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
                NorthwindDataSet ds = new NorthwindDataSet();
                xs.Add(ds.GetSchemaSerializable());
                System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny();
                any1.Namespace = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs = new decimal(0);
                any1.MaxOccurs = decimal.MaxValue;
                any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny();
                any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs = new decimal(1);
                any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name = "tableTypeName";
                attribute2.FixedValue = "KategorieDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return type;
            }
        }
        
        public partial class DostawcyRow : System.Data.DataRow {
            
            private DostawcyDataTable tableDostawcy;
            
            internal DostawcyRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableDostawcy = ((DostawcyDataTable)(this.Table));
            }
            
            public int IDdostawcy {
                get {
                    return ((int)(this[this.tableDostawcy.IDdostawcyColumn]));
                }
                set {
                    this[this.tableDostawcy.IDdostawcyColumn] = value;
                }
            }
            
            public string NazwaFirmy {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.NazwaFirmyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'NazwaFirmy\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.NazwaFirmyColumn] = value;
                }
            }
            
            public string Przedstawiciel {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.PrzedstawicielColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Przedstawiciel\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.PrzedstawicielColumn] = value;
                }
            }
            
            public string StanowiskoPrzedstawiciela {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.StanowiskoPrzedstawicielaColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'StanowiskoPrzedstawiciela\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.StanowiskoPrzedstawicielaColumn] = value;
                }
            }
            
            public string Adres {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.AdresColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Adres\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.AdresColumn] = value;
                }
            }
            
            public string Miasto {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.MiastoColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Miasto\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.MiastoColumn] = value;
                }
            }
            
            public string Region {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.RegionColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Region\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.RegionColumn] = value;
                }
            }
            
            public string KodPocztowy {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.KodPocztowyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'KodPocztowy\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.KodPocztowyColumn] = value;
                }
            }
            
            public string Kraj {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.KrajColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Kraj\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.KrajColumn] = value;
                }
            }
            
            public string Telefon {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.TelefonColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Telefon\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.TelefonColumn] = value;
                }
            }
            
            public string Faks {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.FaksColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Faks\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.FaksColumn] = value;
                }
            }
            
            public string StronaMacierzysta {
                get {
                    try {
                        return ((string)(this[this.tableDostawcy.StronaMacierzystaColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'StronaMacierzysta\' in table \'Dostawcy\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableDostawcy.StronaMacierzystaColumn] = value;
                }
            }
            
            public bool IsNazwaFirmyNull() {
                return this.IsNull(this.tableDostawcy.NazwaFirmyColumn);
            }
            
            public void SetNazwaFirmyNull() {
                this[this.tableDostawcy.NazwaFirmyColumn] = System.Convert.DBNull;
            }
            
            public bool IsPrzedstawicielNull() {
                return this.IsNull(this.tableDostawcy.PrzedstawicielColumn);
            }
            
            public void SetPrzedstawicielNull() {
                this[this.tableDostawcy.PrzedstawicielColumn] = System.Convert.DBNull;
            }
            
            public bool IsStanowiskoPrzedstawicielaNull() {
                return this.IsNull(this.tableDostawcy.StanowiskoPrzedstawicielaColumn);
            }
            
            public void SetStanowiskoPrzedstawicielaNull() {
                this[this.tableDostawcy.StanowiskoPrzedstawicielaColumn] = System.Convert.DBNull;
            }
            
            public bool IsAdresNull() {
                return this.IsNull(this.tableDostawcy.AdresColumn);
            }
            
            public void SetAdresNull() {
                this[this.tableDostawcy.AdresColumn] = System.Convert.DBNull;
            }
            
            public bool IsMiastoNull() {
                return this.IsNull(this.tableDostawcy.MiastoColumn);
            }
            
            public void SetMiastoNull() {
                this[this.tableDostawcy.MiastoColumn] = System.Convert.DBNull;
            }
            
            public bool IsRegionNull() {
                return this.IsNull(this.tableDostawcy.RegionColumn);
            }
            
            public void SetRegionNull() {
                this[this.tableDostawcy.RegionColumn] = System.Convert.DBNull;
            }
            
            public bool IsKodPocztowyNull() {
                return this.IsNull(this.tableDostawcy.KodPocztowyColumn);
            }
            
            public void SetKodPocztowyNull() {
                this[this.tableDostawcy.KodPocztowyColumn] = System.Convert.DBNull;
            }
            
            public bool IsKrajNull() {
                return this.IsNull(this.tableDostawcy.KrajColumn);
            }
            
            public void SetKrajNull() {
                this[this.tableDostawcy.KrajColumn] = System.Convert.DBNull;
            }
            
            public bool IsTelefonNull() {
                return this.IsNull(this.tableDostawcy.TelefonColumn);
            }
            
            public void SetTelefonNull() {
                this[this.tableDostawcy.TelefonColumn] = System.Convert.DBNull;
            }
            
            public bool IsFaksNull() {
                return this.IsNull(this.tableDostawcy.FaksColumn);
            }
            
            public void SetFaksNull() {
                this[this.tableDostawcy.FaksColumn] = System.Convert.DBNull;
            }
            
            public bool IsStronaMacierzystaNull() {
                return this.IsNull(this.tableDostawcy.StronaMacierzystaColumn);
            }
            
            public void SetStronaMacierzystaNull() {
                this[this.tableDostawcy.StronaMacierzystaColumn] = System.Convert.DBNull;
            }
            
            public ProduktyRow[] GetProduktyRows() {
                return ((ProduktyRow[])(base.GetChildRows(this.Table.ChildRelations["DostawcyProdukty"])));
            }
        }
        
        public partial class ProduktyRow : System.Data.DataRow {
            
            private ProduktyDataTable tableProdukty;
            
            internal ProduktyRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableProdukty = ((ProduktyDataTable)(this.Table));
            }
            
            public int IDproduktu {
                get {
                    return ((int)(this[this.tableProdukty.IDproduktuColumn]));
                }
                set {
                    this[this.tableProdukty.IDproduktuColumn] = value;
                }
            }
            
            public string NazwaProduktu {
                get {
                    try {
                        return ((string)(this[this.tableProdukty.NazwaProduktuColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'NazwaProduktu\' in table \'Produkty\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProdukty.NazwaProduktuColumn] = value;
                }
            }
            
            public int IDdostawcy {
                get {
                    try {
                        return ((int)(this[this.tableProdukty.IDdostawcyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'IDdostawcy\' in table \'Produkty\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProdukty.IDdostawcyColumn] = value;
                }
            }
            
            public int IDkategorii {
                get {
                    try {
                        return ((int)(this[this.tableProdukty.IDkategoriiColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'IDkategorii\' in table \'Produkty\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProdukty.IDkategoriiColumn] = value;
                }
            }
            
            public string IlośćJednostkowa {
                get {
                    try {
                        return ((string)(this[this.tableProdukty.IlośćJednostkowaColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'IlośćJednostkowa\' in table \'Produkty\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProdukty.IlośćJednostkowaColumn] = value;
                }
            }
            
            public decimal CenaJednostkowa {
                get {
                    try {
                        return ((decimal)(this[this.tableProdukty.CenaJednostkowaColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'CenaJednostkowa\' in table \'Produkty\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProdukty.CenaJednostkowaColumn] = value;
                }
            }
            
            public short StanMagazynu {
                get {
                    try {
                        return ((short)(this[this.tableProdukty.StanMagazynuColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'StanMagazynu\' in table \'Produkty\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProdukty.StanMagazynuColumn] = value;
                }
            }
            
            public short IlośćZamówiona {
                get {
                    try {
                        return ((short)(this[this.tableProdukty.IlośćZamówionaColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'IlośćZamówiona\' in table \'Produkty\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProdukty.IlośćZamówionaColumn] = value;
                }
            }
            
            public short StanMinimum {
                get {
                    try {
                        return ((short)(this[this.tableProdukty.StanMinimumColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'StanMinimum\' in table \'Produkty\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProdukty.StanMinimumColumn] = value;
                }
            }
            
            public bool Wycofany {
                get {
                    try {
                        return ((bool)(this[this.tableProdukty.WycofanyColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Wycofany\' in table \'Produkty\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProdukty.WycofanyColumn] = value;
                }
            }
            
            public DostawcyRow DostawcyRow {
                get {
                    return ((DostawcyRow)(this.GetParentRow(this.Table.ParentRelations["DostawcyProdukty"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["DostawcyProdukty"]);
                }
            }
            
            public KategorieRow KategorieRow {
                get {
                    return ((KategorieRow)(this.GetParentRow(this.Table.ParentRelations["KategorieProdukty"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["KategorieProdukty"]);
                }
            }
            
            public bool IsNazwaProduktuNull() {
                return this.IsNull(this.tableProdukty.NazwaProduktuColumn);
            }
            
            public void SetNazwaProduktuNull() {
                this[this.tableProdukty.NazwaProduktuColumn] = System.Convert.DBNull;
            }
            
            public bool IsIDdostawcyNull() {
                return this.IsNull(this.tableProdukty.IDdostawcyColumn);
            }
            
            public void SetIDdostawcyNull() {
                this[this.tableProdukty.IDdostawcyColumn] = System.Convert.DBNull;
            }
            
            public bool IsIDkategoriiNull() {
                return this.IsNull(this.tableProdukty.IDkategoriiColumn);
            }
            
            public void SetIDkategoriiNull() {
                this[this.tableProdukty.IDkategoriiColumn] = System.Convert.DBNull;
            }
            
            public bool IsIlośćJednostkowaNull() {
                return this.IsNull(this.tableProdukty.IlośćJednostkowaColumn);
            }
            
            public void SetIlośćJednostkowaNull() {
                this[this.tableProdukty.IlośćJednostkowaColumn] = System.Convert.DBNull;
            }
            
            public bool IsCenaJednostkowaNull() {
                return this.IsNull(this.tableProdukty.CenaJednostkowaColumn);
            }
            
            public void SetCenaJednostkowaNull() {
                this[this.tableProdukty.CenaJednostkowaColumn] = System.Convert.DBNull;
            }
            
            public bool IsStanMagazynuNull() {
                return this.IsNull(this.tableProdukty.StanMagazynuColumn);
            }
            
            public void SetStanMagazynuNull() {
                this[this.tableProdukty.StanMagazynuColumn] = System.Convert.DBNull;
            }
            
            public bool IsIlośćZamówionaNull() {
                return this.IsNull(this.tableProdukty.IlośćZamówionaColumn);
            }
            
            public void SetIlośćZamówionaNull() {
                this[this.tableProdukty.IlośćZamówionaColumn] = System.Convert.DBNull;
            }
            
            public bool IsStanMinimumNull() {
                return this.IsNull(this.tableProdukty.StanMinimumColumn);
            }
            
            public void SetStanMinimumNull() {
                this[this.tableProdukty.StanMinimumColumn] = System.Convert.DBNull;
            }
            
            public bool IsWycofanyNull() {
                return this.IsNull(this.tableProdukty.WycofanyColumn);
            }
            
            public void SetWycofanyNull() {
                this[this.tableProdukty.WycofanyColumn] = System.Convert.DBNull;
            }
        }
        
        public partial class KategorieRow : System.Data.DataRow {
            
            private KategorieDataTable tableKategorie;
            
            internal KategorieRow(System.Data.DataRowBuilder rb) : 
                    base(rb) {
                this.tableKategorie = ((KategorieDataTable)(this.Table));
            }
            
            public int IDkategorii {
                get {
                    return ((int)(this[this.tableKategorie.IDkategoriiColumn]));
                }
                set {
                    this[this.tableKategorie.IDkategoriiColumn] = value;
                }
            }
            
            public string NazwaKategorii {
                get {
                    try {
                        return ((string)(this[this.tableKategorie.NazwaKategoriiColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'NazwaKategorii\' in table \'Kategorie\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableKategorie.NazwaKategoriiColumn] = value;
                }
            }
            
            public string Opis {
                get {
                    try {
                        return ((string)(this[this.tableKategorie.OpisColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Opis\' in table \'Kategorie\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableKategorie.OpisColumn] = value;
                }
            }
            
            public byte[] Rysunek {
                get {
                    try {
                        return ((byte[])(this[this.tableKategorie.RysunekColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("The value for column \'Rysunek\' in table \'Kategorie\' is DBNull.", e);
                    }
                }
                set {
                    this[this.tableKategorie.RysunekColumn] = value;
                }
            }
            
            public bool IsNazwaKategoriiNull() {
                return this.IsNull(this.tableKategorie.NazwaKategoriiColumn);
            }
            
            public void SetNazwaKategoriiNull() {
                this[this.tableKategorie.NazwaKategoriiColumn] = System.Convert.DBNull;
            }
            
            public bool IsOpisNull() {
                return this.IsNull(this.tableKategorie.OpisColumn);
            }
            
            public void SetOpisNull() {
                this[this.tableKategorie.OpisColumn] = System.Convert.DBNull;
            }
            
            public bool IsRysunekNull() {
                return this.IsNull(this.tableKategorie.RysunekColumn);
            }
            
            public void SetRysunekNull() {
                this[this.tableKategorie.RysunekColumn] = System.Convert.DBNull;
            }
            
            public ProduktyRow[] GetProduktyRows() {
                return ((ProduktyRow[])(base.GetChildRows(this.Table.ChildRelations["KategorieProdukty"])));
            }
        }
        
        public class DostawcyRowChangeEvent : System.EventArgs {
            
            private DostawcyRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public DostawcyRowChangeEvent(DostawcyRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public DostawcyRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class ProduktyRowChangeEvent : System.EventArgs {
            
            private ProduktyRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public ProduktyRowChangeEvent(ProduktyRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProduktyRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        public class KategorieRowChangeEvent : System.EventArgs {
            
            private KategorieRow eventRow;
            
            private System.Data.DataRowAction eventAction;
            
            public KategorieRowChangeEvent(KategorieRow row, System.Data.DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public KategorieRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public System.Data.DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
namespace Northwind.NorthwindDataSetTableAdapters {
    
    
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.ComponentModel.DataObjectAttribute(true)]
    [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
    public partial class DostawcyTableAdapter : System.ComponentModel.Component {
        
        private System.Data.OleDb.OleDbDataAdapter m_adapter;
        
        private System.Data.OleDb.OleDbConnection m_connection;
        
        private System.Data.OleDb.OleDbCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public DostawcyTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.OleDb.OleDbDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.OleDb.OleDbConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_connection = value;
                if ((this.Adapter.InsertCommand != null)) {
                    this.Adapter.InsertCommand.Connection = value;
                }
                if ((this.Adapter.DeleteCommand != null)) {
                    this.Adapter.DeleteCommand.Connection = value;
                }
                if ((this.Adapter.UpdateCommand != null)) {
                    this.Adapter.UpdateCommand.Connection = value;
                }
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    if ((this.CommandCollection[i] != null)) {
                        ((System.Data.OleDb.OleDbCommand)(this.CommandCollection[i])).Connection = value;
                    }
                }
            }
        }
        
        protected System.Data.OleDb.OleDbCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.OleDb.OleDbDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Dostawcy";
            tableMapping.ColumnMappings.Add("IDdostawcy", "IDdostawcy");
            tableMapping.ColumnMappings.Add("NazwaFirmy", "NazwaFirmy");
            tableMapping.ColumnMappings.Add("Przedstawiciel", "Przedstawiciel");
            tableMapping.ColumnMappings.Add("StanowiskoPrzedstawiciela", "StanowiskoPrzedstawiciela");
            tableMapping.ColumnMappings.Add("Adres", "Adres");
            tableMapping.ColumnMappings.Add("Miasto", "Miasto");
            tableMapping.ColumnMappings.Add("Region", "Region");
            tableMapping.ColumnMappings.Add("KodPocztowy", "KodPocztowy");
            tableMapping.ColumnMappings.Add("Kraj", "Kraj");
            tableMapping.ColumnMappings.Add("Telefon", "Telefon");
            tableMapping.ColumnMappings.Add("Faks", "Faks");
            tableMapping.ColumnMappings.Add("StronaMacierzysta", "StronaMacierzysta");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.OleDb.OleDbCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM `Dostawcy` WHERE ((`IDdostawcy` = ?) AND ((? = 1 AND `NazwaFirmy` IS NULL) OR (`NazwaFirmy` = ?)) AND ((? = 1 AND `Przedstawiciel` IS NULL) OR (`Przedstawiciel` = ?)) AND ((? = 1 AND `StanowiskoPrzedstawiciela` IS NULL) OR (`StanowiskoPrzedstawiciela` = ?)) AND ((? = 1 AND `Adres` IS NULL) OR (`Adres` = ?)) AND ((? = 1 AND `Miasto` IS NULL) OR (`Miasto` = ?)) AND ((? = 1 AND `Region` IS NULL) OR (`Region` = ?)) AND ((? = 1 AND `KodPocztowy` IS NULL) OR (`KodPocztowy` = ?)) AND ((? = 1 AND `Kraj` IS NULL) OR (`Kraj` = ?)) AND ((? = 1 AND `Telefon` IS NULL) OR (`Telefon` = ?)) AND ((? = 1 AND `Faks` IS NULL) OR (`Faks` = ?)))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDdostawcy", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p2", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaFirmy", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p3", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaFirmy", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p4", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Przedstawiciel", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p5", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Przedstawiciel", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p6", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanowiskoPrzedstawiciela", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p7", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanowiskoPrzedstawiciela", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p8", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Adres", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p9", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Adres", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p10", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Miasto", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p11", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Miasto", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p12", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Region", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p13", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Region", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p14", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "KodPocztowy", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p15", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "KodPocztowy", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p16", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Kraj", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p17", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Kraj", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p18", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Telefon", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p19", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Telefon", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p20", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Faks", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p21", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Faks", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.InsertCommand = new System.Data.OleDb.OleDbCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO `Dostawcy` (`NazwaFirmy`, `Przedstawiciel`, `StanowiskoPrzedstawiciel" +
                "a`, `Adres`, `Miasto`, `Region`, `KodPocztowy`, `Kraj`, `Telefon`, `Faks`, `Stro" +
                "naMacierzysta`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaFirmy", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p2", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Przedstawiciel", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p3", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanowiskoPrzedstawiciela", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p4", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Adres", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p5", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Miasto", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p6", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Region", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p7", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "KodPocztowy", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p8", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Kraj", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p9", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Telefon", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p10", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Faks", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p11", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StronaMacierzysta", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand = new System.Data.OleDb.OleDbCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE `Dostawcy` SET `NazwaFirmy` = ?, `Przedstawiciel` = ?, `StanowiskoPrzedstawiciela` = ?, `Adres` = ?, `Miasto` = ?, `Region` = ?, `KodPocztowy` = ?, `Kraj` = ?, `Telefon` = ?, `Faks` = ?, `StronaMacierzysta` = ? WHERE ((`IDdostawcy` = ?) AND ((? = 1 AND `NazwaFirmy` IS NULL) OR (`NazwaFirmy` = ?)) AND ((? = 1 AND `Przedstawiciel` IS NULL) OR (`Przedstawiciel` = ?)) AND ((? = 1 AND `StanowiskoPrzedstawiciela` IS NULL) OR (`StanowiskoPrzedstawiciela` = ?)) AND ((? = 1 AND `Adres` IS NULL) OR (`Adres` = ?)) AND ((? = 1 AND `Miasto` IS NULL) OR (`Miasto` = ?)) AND ((? = 1 AND `Region` IS NULL) OR (`Region` = ?)) AND ((? = 1 AND `KodPocztowy` IS NULL) OR (`KodPocztowy` = ?)) AND ((? = 1 AND `Kraj` IS NULL) OR (`Kraj` = ?)) AND ((? = 1 AND `Telefon` IS NULL) OR (`Telefon` = ?)) AND ((? = 1 AND `Faks` IS NULL) OR (`Faks` = ?)))";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaFirmy", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p2", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Przedstawiciel", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p3", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanowiskoPrzedstawiciela", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p4", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Adres", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p5", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Miasto", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p6", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Region", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p7", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "KodPocztowy", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p8", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Kraj", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p9", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Telefon", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p10", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Faks", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p11", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StronaMacierzysta", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p12", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDdostawcy", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p13", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaFirmy", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p14", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaFirmy", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p15", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Przedstawiciel", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p16", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Przedstawiciel", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p17", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanowiskoPrzedstawiciela", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p18", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanowiskoPrzedstawiciela", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p19", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Adres", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p20", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Adres", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p21", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Miasto", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p22", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Miasto", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p23", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Region", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p24", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Region", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p25", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "KodPocztowy", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p26", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "KodPocztowy", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p27", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Kraj", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p28", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Kraj", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p29", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Telefon", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p30", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Telefon", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p31", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Faks", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p32", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Faks", System.Data.DataRowVersion.Original, false, null));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.OleDb.OleDbConnection();
            this.m_connection.ConnectionString = Northwind.Properties.Settings.Default.NorthwindConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.OleDb.OleDbCommand[1];
            this.m_commandCollection[0] = new System.Data.OleDb.OleDbCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT IDdostawcy, NazwaFirmy, Przedstawiciel, StanowiskoPrzedstawiciela, Adres, " +
                "Miasto, Region, KodPocztowy, Kraj, Telefon, Faks, StronaMacierzysta FROM Dostawc" +
                "y";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(NorthwindDataSet.DostawcyDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual NorthwindDataSet.DostawcyDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            NorthwindDataSet.DostawcyDataTable dataTable = new NorthwindDataSet.DostawcyDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(NorthwindDataSet.DostawcyDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(NorthwindDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Dostawcy");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int p1, string p3, string p5, string p7, string p9, string p11, string p13, string p15, string p17, string p19, string p21) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(p1));
            if ((p3 == null)) {
                throw new System.ArgumentNullException("p3");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(p3));
            }
            if ((p5 == null)) {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(p5));
            }
            if ((p7 == null)) {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(p7));
            }
            if ((p9 == null)) {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(p9));
            }
            if ((p11 == null)) {
                this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[10].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(p11));
            }
            if ((p13 == null)) {
                this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[12].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(p13));
            }
            if ((p15 == null)) {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(p15));
            }
            if ((p17 == null)) {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[16].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(p17));
            }
            if ((p19 == null)) {
                this.Adapter.DeleteCommand.Parameters[17].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[18].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[17].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[18].Value = ((string)(p19));
            }
            if ((p21 == null)) {
                this.Adapter.DeleteCommand.Parameters[19].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[20].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[19].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[20].Value = ((string)(p21));
            }
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string p1, string p2, string p3, string p4, string p5, string p6, string p7, string p8, string p9, string p10, string p11) {
            if ((p1 == null)) {
                throw new System.ArgumentNullException("p1");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(p1));
            }
            if ((p2 == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(p2));
            }
            if ((p3 == null)) {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(p3));
            }
            if ((p4 == null)) {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(p4));
            }
            if ((p5 == null)) {
                this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(p5));
            }
            if ((p6 == null)) {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = ((string)(p6));
            }
            if ((p7 == null)) {
                this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = ((string)(p7));
            }
            if ((p8 == null)) {
                this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = ((string)(p8));
            }
            if ((p9 == null)) {
                this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[8].Value = ((string)(p9));
            }
            if ((p10 == null)) {
                this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[9].Value = ((string)(p10));
            }
            if ((p11 == null)) {
                this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[10].Value = ((string)(p11));
            }
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string p1, 
                    string p2, 
                    string p3, 
                    string p4, 
                    string p5, 
                    string p6, 
                    string p7, 
                    string p8, 
                    string p9, 
                    string p10, 
                    string p11, 
                    int p12, 
                    string p14, 
                    string p16, 
                    string p18, 
                    string p20, 
                    string p22, 
                    string p24, 
                    string p26, 
                    string p28, 
                    string p30, 
                    string p32) {
            if ((p1 == null)) {
                throw new System.ArgumentNullException("p1");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(p1));
            }
            if ((p2 == null)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(p2));
            }
            if ((p3 == null)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(p3));
            }
            if ((p4 == null)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(p4));
            }
            if ((p5 == null)) {
                this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(p5));
            }
            if ((p6 == null)) {
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(p6));
            }
            if ((p7 == null)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(p7));
            }
            if ((p8 == null)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(p8));
            }
            if ((p9 == null)) {
                this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(p9));
            }
            if ((p10 == null)) {
                this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(p10));
            }
            if ((p11 == null)) {
                this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(p11));
            }
            this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(p12));
            if ((p14 == null)) {
                throw new System.ArgumentNullException("p14");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(p14));
            }
            if ((p16 == null)) {
                this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[15].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(p16));
            }
            if ((p18 == null)) {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[17].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(p18));
            }
            if ((p20 == null)) {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[19].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(p20));
            }
            if ((p22 == null)) {
                this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[21].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(p22));
            }
            if ((p24 == null)) {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[23].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(p24));
            }
            if ((p26 == null)) {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[25].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[25].Value = ((string)(p26));
            }
            if ((p28 == null)) {
                this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[27].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[27].Value = ((string)(p28));
            }
            if ((p30 == null)) {
                this.Adapter.UpdateCommand.Parameters[28].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[29].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[28].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[29].Value = ((string)(p30));
            }
            if ((p32 == null)) {
                this.Adapter.UpdateCommand.Parameters[30].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[31].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[30].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[31].Value = ((string)(p32));
            }
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.ComponentModel.DataObjectAttribute(true)]
    [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
    public partial class ProduktyTableAdapter : System.ComponentModel.Component {
        
        private System.Data.OleDb.OleDbDataAdapter m_adapter;
        
        private System.Data.OleDb.OleDbConnection m_connection;
        
        private System.Data.OleDb.OleDbCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public ProduktyTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.OleDb.OleDbDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.OleDb.OleDbConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_connection = value;
                if ((this.Adapter.InsertCommand != null)) {
                    this.Adapter.InsertCommand.Connection = value;
                }
                if ((this.Adapter.DeleteCommand != null)) {
                    this.Adapter.DeleteCommand.Connection = value;
                }
                if ((this.Adapter.UpdateCommand != null)) {
                    this.Adapter.UpdateCommand.Connection = value;
                }
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    if ((this.CommandCollection[i] != null)) {
                        ((System.Data.OleDb.OleDbCommand)(this.CommandCollection[i])).Connection = value;
                    }
                }
            }
        }
        
        protected System.Data.OleDb.OleDbCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.OleDb.OleDbDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Produkty";
            tableMapping.ColumnMappings.Add("IDproduktu", "IDproduktu");
            tableMapping.ColumnMappings.Add("NazwaProduktu", "NazwaProduktu");
            tableMapping.ColumnMappings.Add("IDdostawcy", "IDdostawcy");
            tableMapping.ColumnMappings.Add("IDkategorii", "IDkategorii");
            tableMapping.ColumnMappings.Add("IlośćJednostkowa", "IlośćJednostkowa");
            tableMapping.ColumnMappings.Add("CenaJednostkowa", "CenaJednostkowa");
            tableMapping.ColumnMappings.Add("StanMagazynu", "StanMagazynu");
            tableMapping.ColumnMappings.Add("IlośćZamówiona", "IlośćZamówiona");
            tableMapping.ColumnMappings.Add("StanMinimum", "StanMinimum");
            tableMapping.ColumnMappings.Add("Wycofany", "Wycofany");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.OleDb.OleDbCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM `Produkty` WHERE ((`IDproduktu` = ?) AND ((? = 1 AND `NazwaProduktu` IS NULL) OR (`NazwaProduktu` = ?)) AND ((? = 1 AND `IDdostawcy` IS NULL) OR (`IDdostawcy` = ?)) AND ((? = 1 AND `IDkategorii` IS NULL) OR (`IDkategorii` = ?)) AND ((? = 1 AND `IlośćJednostkowa` IS NULL) OR (`IlośćJednostkowa` = ?)) AND ((? = 1 AND `CenaJednostkowa` IS NULL) OR (`CenaJednostkowa` = ?)) AND ((? = 1 AND `StanMagazynu` IS NULL) OR (`StanMagazynu` = ?)) AND ((? = 1 AND `IlośćZamówiona` IS NULL) OR (`IlośćZamówiona` = ?)) AND ((? = 1 AND `StanMinimum` IS NULL) OR (`StanMinimum` = ?)) AND ((? = 1 AND `Wycofany` IS NULL) OR (`Wycofany` = ?)))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDproduktu", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p2", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaProduktu", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p3", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaProduktu", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p4", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDdostawcy", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p5", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDdostawcy", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p6", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDkategorii", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p7", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDkategorii", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p8", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćJednostkowa", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p9", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćJednostkowa", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p10", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "CenaJednostkowa", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p11", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "CenaJednostkowa", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p12", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMagazynu", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p13", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMagazynu", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p14", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćZamówiona", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p15", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćZamówiona", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p16", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMinimum", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p17", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMinimum", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p18", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wycofany", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p19", System.Data.OleDb.OleDbType.Boolean, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wycofany", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.InsertCommand = new System.Data.OleDb.OleDbCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO `Produkty` (`NazwaProduktu`, `IDdostawcy`, `IDkategorii`, `IlośćJedno" +
                "stkowa`, `CenaJednostkowa`, `StanMagazynu`, `IlośćZamówiona`, `StanMinimum`, `Wy" +
                "cofany`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaProduktu", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p2", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDdostawcy", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p3", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDkategorii", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p4", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćJednostkowa", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p5", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "CenaJednostkowa", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p6", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMagazynu", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p7", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćZamówiona", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p8", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMinimum", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p9", System.Data.OleDb.OleDbType.Boolean, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wycofany", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand = new System.Data.OleDb.OleDbCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = @"UPDATE `Produkty` SET `NazwaProduktu` = ?, `IDdostawcy` = ?, `IDkategorii` = ?, `IlośćJednostkowa` = ?, `CenaJednostkowa` = ?, `StanMagazynu` = ?, `IlośćZamówiona` = ?, `StanMinimum` = ?, `Wycofany` = ? WHERE ((`IDproduktu` = ?) AND ((? = 1 AND `NazwaProduktu` IS NULL) OR (`NazwaProduktu` = ?)) AND ((? = 1 AND `IDdostawcy` IS NULL) OR (`IDdostawcy` = ?)) AND ((? = 1 AND `IDkategorii` IS NULL) OR (`IDkategorii` = ?)) AND ((? = 1 AND `IlośćJednostkowa` IS NULL) OR (`IlośćJednostkowa` = ?)) AND ((? = 1 AND `CenaJednostkowa` IS NULL) OR (`CenaJednostkowa` = ?)) AND ((? = 1 AND `StanMagazynu` IS NULL) OR (`StanMagazynu` = ?)) AND ((? = 1 AND `IlośćZamówiona` IS NULL) OR (`IlośćZamówiona` = ?)) AND ((? = 1 AND `StanMinimum` IS NULL) OR (`StanMinimum` = ?)) AND ((? = 1 AND `Wycofany` IS NULL) OR (`Wycofany` = ?)))";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaProduktu", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p2", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDdostawcy", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p3", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDkategorii", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p4", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćJednostkowa", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p5", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "CenaJednostkowa", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p6", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMagazynu", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p7", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćZamówiona", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p8", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMinimum", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p9", System.Data.OleDb.OleDbType.Boolean, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wycofany", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p10", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDproduktu", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p11", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaProduktu", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p12", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaProduktu", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p13", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDdostawcy", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p14", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDdostawcy", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p15", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDkategorii", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p16", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDkategorii", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p17", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćJednostkowa", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p18", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćJednostkowa", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p19", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "CenaJednostkowa", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p20", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "CenaJednostkowa", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p21", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMagazynu", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p22", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMagazynu", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p23", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćZamówiona", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p24", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IlośćZamówiona", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p25", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMinimum", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p26", System.Data.OleDb.OleDbType.SmallInt, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "StanMinimum", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p27", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wycofany", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p28", System.Data.OleDb.OleDbType.Boolean, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wycofany", System.Data.DataRowVersion.Original, false, null));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.OleDb.OleDbConnection();
            this.m_connection.ConnectionString = Northwind.Properties.Settings.Default.NorthwindConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.OleDb.OleDbCommand[1];
            this.m_commandCollection[0] = new System.Data.OleDb.OleDbCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT IDproduktu, NazwaProduktu, IDdostawcy, IDkategorii, IlośćJednostkowa, Cena" +
                "Jednostkowa, StanMagazynu, IlośćZamówiona, StanMinimum, Wycofany FROM Produkty";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(NorthwindDataSet.ProduktyDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual NorthwindDataSet.ProduktyDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            NorthwindDataSet.ProduktyDataTable dataTable = new NorthwindDataSet.ProduktyDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(NorthwindDataSet.ProduktyDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(NorthwindDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Produkty");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int p1, string p3, System.Nullable<int> p5, System.Nullable<int> p7, string p9, System.Nullable<decimal> p11, System.Nullable<short> p13, System.Nullable<short> p15, System.Nullable<short> p17, bool p19) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(p1));
            if ((p3 == null)) {
                throw new System.ArgumentNullException("p3");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(p3));
            }
            if ((p5.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(p5.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
            }
            if ((p7.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(p7.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
            }
            if ((p9 == null)) {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[8].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(p9));
            }
            if ((p11.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[10].Value = ((decimal)(p11.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[10].Value = System.DBNull.Value;
            }
            if ((p13.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[12].Value = ((short)(p13.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[12].Value = System.DBNull.Value;
            }
            if ((p15.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[14].Value = ((short)(p15.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value;
            }
            if ((p17.HasValue == true)) {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[16].Value = ((short)(p17.Value));
            }
            else {
                this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(1));
                this.Adapter.DeleteCommand.Parameters[16].Value = System.DBNull.Value;
            }
            this.Adapter.DeleteCommand.Parameters[17].Value = ((int)(0));
            this.Adapter.DeleteCommand.Parameters[18].Value = ((bool)(p19));
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string p1, System.Nullable<int> p2, System.Nullable<int> p3, string p4, System.Nullable<decimal> p5, System.Nullable<short> p6, System.Nullable<short> p7, System.Nullable<short> p8, bool p9) {
            if ((p1 == null)) {
                throw new System.ArgumentNullException("p1");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(p1));
            }
            if ((p2.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[1].Value = ((int)(p2.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((p3.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[2].Value = ((int)(p3.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            if ((p4 == null)) {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(p4));
            }
            if ((p5.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(p5.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
            }
            if ((p6.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[5].Value = ((short)(p6.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            if ((p7.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[6].Value = ((short)(p7.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
            }
            if ((p8.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[7].Value = ((short)(p8.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.InsertCommand.Parameters[8].Value = ((bool)(p9));
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(
                    string p1, 
                    System.Nullable<int> p2, 
                    System.Nullable<int> p3, 
                    string p4, 
                    System.Nullable<decimal> p5, 
                    System.Nullable<short> p6, 
                    System.Nullable<short> p7, 
                    System.Nullable<short> p8, 
                    bool p9, 
                    int p10, 
                    string p12, 
                    System.Nullable<int> p14, 
                    System.Nullable<int> p16, 
                    string p18, 
                    System.Nullable<decimal> p20, 
                    System.Nullable<short> p22, 
                    System.Nullable<short> p24, 
                    System.Nullable<short> p26, 
                    bool p28) {
            if ((p1 == null)) {
                throw new System.ArgumentNullException("p1");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(p1));
            }
            if ((p2.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(p2.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            if ((p3.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(p3.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            if ((p4 == null)) {
                this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(p4));
            }
            if ((p5.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(p5.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
            }
            if ((p6.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[5].Value = ((short)(p6.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
            }
            if ((p7.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[6].Value = ((short)(p7.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
            }
            if ((p8.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((short)(p8.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[8].Value = ((bool)(p9));
            this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(p10));
            if ((p12 == null)) {
                throw new System.ArgumentNullException("p12");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(p12));
            }
            if ((p14.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(p14.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[13].Value = System.DBNull.Value;
            }
            if ((p16.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(p16.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[15].Value = System.DBNull.Value;
            }
            if ((p18 == null)) {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[17].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(p18));
            }
            if ((p20.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[19].Value = ((decimal)(p20.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[19].Value = System.DBNull.Value;
            }
            if ((p22.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[21].Value = ((short)(p22.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[21].Value = System.DBNull.Value;
            }
            if ((p24.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[23].Value = ((short)(p24.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[23].Value = System.DBNull.Value;
            }
            if ((p26.HasValue == true)) {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[25].Value = ((short)(p26.Value));
            }
            else {
                this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(1));
                this.Adapter.UpdateCommand.Parameters[25].Value = System.DBNull.Value;
            }
            this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(0));
            this.Adapter.UpdateCommand.Parameters[27].Value = ((bool)(p28));
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
    
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.ComponentModel.ToolboxItem(true)]
    [System.ComponentModel.DataObjectAttribute(true)]
    [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
        ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
    public partial class KategorieTableAdapter : System.ComponentModel.Component {
        
        private System.Data.OleDb.OleDbDataAdapter m_adapter;
        
        private System.Data.OleDb.OleDbConnection m_connection;
        
        private System.Data.OleDb.OleDbCommand[] m_commandCollection;
        
        private bool m_clearBeforeFill;
        
        public KategorieTableAdapter() {
            this.m_clearBeforeFill = true;
        }
        
        private System.Data.OleDb.OleDbDataAdapter Adapter {
            get {
                if ((this.m_adapter == null)) {
                    this.InitAdapter();
                }
                return this.m_adapter;
            }
        }
        
        internal System.Data.OleDb.OleDbConnection Connection {
            get {
                if ((this.m_connection == null)) {
                    this.InitConnection();
                }
                return this.m_connection;
            }
            set {
                this.m_connection = value;
                if ((this.Adapter.InsertCommand != null)) {
                    this.Adapter.InsertCommand.Connection = value;
                }
                if ((this.Adapter.DeleteCommand != null)) {
                    this.Adapter.DeleteCommand.Connection = value;
                }
                if ((this.Adapter.UpdateCommand != null)) {
                    this.Adapter.UpdateCommand.Connection = value;
                }
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
                    if ((this.CommandCollection[i] != null)) {
                        ((System.Data.OleDb.OleDbCommand)(this.CommandCollection[i])).Connection = value;
                    }
                }
            }
        }
        
        protected System.Data.OleDb.OleDbCommand[] CommandCollection {
            get {
                if ((this.m_commandCollection == null)) {
                    this.InitCommandCollection();
                }
                return this.m_commandCollection;
            }
        }
        
        public bool ClearBeforeFill {
            get {
                return this.m_clearBeforeFill;
            }
            set {
                this.m_clearBeforeFill = value;
            }
        }
        
        private void InitAdapter() {
            this.m_adapter = new System.Data.OleDb.OleDbDataAdapter();
            System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
            tableMapping.SourceTable = "Table";
            tableMapping.DataSetTable = "Kategorie";
            tableMapping.ColumnMappings.Add("IDkategorii", "IDkategorii");
            tableMapping.ColumnMappings.Add("NazwaKategorii", "NazwaKategorii");
            tableMapping.ColumnMappings.Add("Opis", "Opis");
            tableMapping.ColumnMappings.Add("Rysunek", "Rysunek");
            this.m_adapter.TableMappings.Add(tableMapping);
            this.m_adapter.DeleteCommand = new System.Data.OleDb.OleDbCommand();
            this.m_adapter.DeleteCommand.Connection = this.Connection;
            this.m_adapter.DeleteCommand.CommandText = "DELETE FROM `Kategorie` WHERE ((`IDkategorii` = ?) AND ((? = 1 AND `NazwaKategori" +
                "i` IS NULL) OR (`NazwaKategorii` = ?)))";
            this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDkategorii", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p2", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaKategorii", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p3", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaKategorii", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.InsertCommand = new System.Data.OleDb.OleDbCommand();
            this.m_adapter.InsertCommand.Connection = this.Connection;
            this.m_adapter.InsertCommand.CommandText = "INSERT INTO `Kategorie` (`NazwaKategorii`, `Opis`, `Rysunek`) VALUES (?, ?, ?)";
            this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaKategorii", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p2", System.Data.OleDb.OleDbType.LongVarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Opis", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p3", System.Data.OleDb.OleDbType.LongVarBinary, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Rysunek", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand = new System.Data.OleDb.OleDbCommand();
            this.m_adapter.UpdateCommand.Connection = this.Connection;
            this.m_adapter.UpdateCommand.CommandText = "UPDATE `Kategorie` SET `NazwaKategorii` = ?, `Opis` = ?, `Rysunek` = ? WHERE ((`I" +
                "Dkategorii` = ?) AND ((? = 1 AND `NazwaKategorii` IS NULL) OR (`NazwaKategorii` " +
                "= ?)))";
            this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p1", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaKategorii", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p2", System.Data.OleDb.OleDbType.LongVarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Opis", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p3", System.Data.OleDb.OleDbType.LongVarBinary, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Rysunek", System.Data.DataRowVersion.Current, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p4", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "IDkategorii", System.Data.DataRowVersion.Original, false, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p5", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaKategorii", System.Data.DataRowVersion.Original, true, null));
            this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("p6", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazwaKategorii", System.Data.DataRowVersion.Original, false, null));
        }
        
        private void InitConnection() {
            this.m_connection = new System.Data.OleDb.OleDbConnection();
            this.m_connection.ConnectionString = Northwind.Properties.Settings.Default.NorthwindConnectionString;
        }
        
        private void InitCommandCollection() {
            this.m_commandCollection = new System.Data.OleDb.OleDbCommand[1];
            this.m_commandCollection[0] = new System.Data.OleDb.OleDbCommand();
            this.m_commandCollection[0].Connection = this.Connection;
            this.m_commandCollection[0].CommandText = "SELECT Kategorie.*\r\nFROM  Kategorie";
            this.m_commandCollection[0].CommandType = System.Data.CommandType.Text;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
        public virtual int Fill(NorthwindDataSet.KategorieDataTable dataTable) {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            if ((this.m_clearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);
            return returnValue;
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public virtual NorthwindDataSet.KategorieDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            NorthwindDataSet.KategorieDataTable dataTable = new NorthwindDataSet.KategorieDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        public virtual int Update(NorthwindDataSet.KategorieDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        public virtual int Update(NorthwindDataSet dataSet) {
            return this.Adapter.Update(dataSet, "Kategorie");
        }
        
        public virtual int Update(System.Data.DataRow dataRow) {
            return this.Adapter.Update(new System.Data.DataRow[] {
                        dataRow});
        }
        
        public virtual int Update(System.Data.DataRow[] dataRows) {
            return this.Adapter.Update(dataRows);
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
        public virtual int Delete(int p1, string p3) {
            this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(p1));
            if ((p3 == null)) {
                throw new System.ArgumentNullException("p3");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(0));
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(p3));
            }
            System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
            this.Adapter.DeleteCommand.Connection.Open();
            try {
                return this.Adapter.DeleteCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.DeleteCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public virtual int Insert(string p1, string p2, byte[] p3) {
            if ((p1 == null)) {
                throw new System.ArgumentNullException("p1");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(p1));
            }
            if ((p2 == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(p2));
            }
            if ((p3 == null)) {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((byte[])(p3));
            }
            System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
            this.Adapter.InsertCommand.Connection.Open();
            try {
                return this.Adapter.InsertCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.InsertCommand.Connection.Close();
                }
            }
        }
        
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public virtual int Update(string p1, string p2, byte[] p3, int p4, string p6) {
            if ((p1 == null)) {
                throw new System.ArgumentNullException("p1");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(p1));
            }
            if ((p2 == null)) {
                this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(p2));
            }
            if ((p3 == null)) {
                this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((byte[])(p3));
            }
            this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(p4));
            if ((p6 == null)) {
                throw new System.ArgumentNullException("p6");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(0));
                this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(p6));
            }
            System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
            this.Adapter.UpdateCommand.Connection.Open();
            try {
                return this.Adapter.UpdateCommand.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
                    this.Adapter.UpdateCommand.Connection.Close();
                }
            }
        }
    }
}
