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

Option Strict Off
Option Explicit On

Imports System
Imports System.Data
Imports System.Runtime.Serialization
Imports System.Xml


<Serializable(),  _
 System.ComponentModel.DesignerCategoryAttribute("code"),  _
 System.Diagnostics.DebuggerStepThrough(),  _
 System.ComponentModel.ToolboxItem(true)>  _
Public Class DataSet1
    Inherits DataSet
    
    Private tabletblKlienci As tblKlienciDataTable
    
    Public Sub New()
        MyBase.New
        Me.InitClass
        Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
        AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
        AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
    End Sub
    
    Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
        MyBase.New
        Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(System.String)),String)
        If (Not (strSchema) Is Nothing) Then
            Dim ds As DataSet = New DataSet
            ds.ReadXmlSchema(New XmlTextReader(New System.IO.StringReader(strSchema)))
            If (Not (ds.Tables("tblKlienci")) Is Nothing) Then
                Me.Tables.Add(New tblKlienciDataTable(ds.Tables("tblKlienci")))
            End If
            Me.DataSetName = ds.DataSetName
            Me.Prefix = ds.Prefix
            Me.Namespace = ds.Namespace
            Me.Locale = ds.Locale
            Me.CaseSensitive = ds.CaseSensitive
            Me.EnforceConstraints = ds.EnforceConstraints
            Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
            Me.InitVars
        Else
            Me.InitClass
        End If
        Me.GetSerializationData(info, context)
        Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
        AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
        AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
    End Sub
    
    <System.ComponentModel.Browsable(false),  _
     System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)>  _
    Public ReadOnly Property tblKlienci As tblKlienciDataTable
        Get
            Return Me.tabletblKlienci
        End Get
    End Property
    
    Public Overrides Function Clone() As DataSet
        Dim cln As DataSet1 = CType(MyBase.Clone,DataSet1)
        cln.InitVars
        Return cln
    End Function
    
    Protected Overrides Function ShouldSerializeTables() As Boolean
        Return false
    End Function
    
    Protected Overrides Function ShouldSerializeRelations() As Boolean
        Return false
    End Function
    
    Protected Overrides Sub ReadXmlSerializable(ByVal reader As XmlReader)
        Me.Reset
        Dim ds As DataSet = New DataSet
        ds.ReadXml(reader)
        If (Not (ds.Tables("tblKlienci")) Is Nothing) Then
            Me.Tables.Add(New tblKlienciDataTable(ds.Tables("tblKlienci")))
        End If
        Me.DataSetName = ds.DataSetName
        Me.Prefix = ds.Prefix
        Me.Namespace = ds.Namespace
        Me.Locale = ds.Locale
        Me.CaseSensitive = ds.CaseSensitive
        Me.EnforceConstraints = ds.EnforceConstraints
        Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
        Me.InitVars
    End Sub
    
    Protected Overrides Function GetSchemaSerializable() As System.Xml.Schema.XmlSchema
        Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream
        Me.WriteXmlSchema(New XmlTextWriter(stream, Nothing))
        stream.Position = 0
        Return System.Xml.Schema.XmlSchema.Read(New XmlTextReader(stream), Nothing)
    End Function
    
    Friend Sub InitVars()
        Me.tabletblKlienci = CType(Me.Tables("tblKlienci"),tblKlienciDataTable)
        If (Not (Me.tabletblKlienci) Is Nothing) Then
            Me.tabletblKlienci.InitVars
        End If
    End Sub
    
    Private Sub InitClass()
        Me.DataSetName = "DataSet1"
        Me.Prefix = ""
        Me.Namespace = "http://www.tempuri.org/DataSet1.xsd"
        Me.Locale = New System.Globalization.CultureInfo("pl-PL")
        Me.CaseSensitive = false
        Me.EnforceConstraints = true
        Me.tabletblKlienci = New tblKlienciDataTable
        Me.Tables.Add(Me.tabletblKlienci)
    End Sub
    
    Private Function ShouldSerializetblKlienci() As Boolean
        Return false
    End Function
    
    Private Sub SchemaChanged(ByVal sender As Object, ByVal e As System.ComponentModel.CollectionChangeEventArgs)
        If (e.Action = System.ComponentModel.CollectionChangeAction.Remove) Then
            Me.InitVars
        End If
    End Sub
    
    Public Delegate Sub tblKlienciRowChangeEventHandler(ByVal sender As Object, ByVal e As tblKlienciRowChangeEvent)
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class tblKlienciDataTable
        Inherits DataTable
        Implements System.Collections.IEnumerable
        
        Private columnID As DataColumn
        
        Private columnImie As DataColumn
        
        Private columnNazwisko As DataColumn
        
        Private columnFirma As DataColumn
        
        Private columnAdres As DataColumn
        
        Private columnMiasto As DataColumn
        
        Private columnWojewodztwo As DataColumn
        
        Private columnKodPocztowy As DataColumn
        
        Private columnTelefon As DataColumn
        
        Private columnFaks As DataColumn
        
        Private columnEmail As DataColumn
        
        Friend Sub New()
            MyBase.New("tblKlienci")
            Me.InitClass
        End Sub
        
        Friend Sub New(ByVal table As DataTable)
            MyBase.New(table.TableName)
            If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
                Me.CaseSensitive = table.CaseSensitive
            End If
            If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
                Me.Locale = table.Locale
            End If
            If (table.Namespace <> table.DataSet.Namespace) Then
                Me.Namespace = table.Namespace
            End If
            Me.Prefix = table.Prefix
            Me.MinimumCapacity = table.MinimumCapacity
            Me.DisplayExpression = table.DisplayExpression
        End Sub
        
        <System.ComponentModel.Browsable(false)>  _
        Public ReadOnly Property Count As Integer
            Get
                Return Me.Rows.Count
            End Get
        End Property
        
        Friend ReadOnly Property IDColumn As DataColumn
            Get
                Return Me.columnID
            End Get
        End Property
        
        Friend ReadOnly Property ImieColumn As DataColumn
            Get
                Return Me.columnImie
            End Get
        End Property
        
        Friend ReadOnly Property NazwiskoColumn As DataColumn
            Get
                Return Me.columnNazwisko
            End Get
        End Property
        
        Friend ReadOnly Property FirmaColumn As DataColumn
            Get
                Return Me.columnFirma
            End Get
        End Property
        
        Friend ReadOnly Property AdresColumn As DataColumn
            Get
                Return Me.columnAdres
            End Get
        End Property
        
        Friend ReadOnly Property MiastoColumn As DataColumn
            Get
                Return Me.columnMiasto
            End Get
        End Property
        
        Friend ReadOnly Property WojewodztwoColumn As DataColumn
            Get
                Return Me.columnWojewodztwo
            End Get
        End Property
        
        Friend ReadOnly Property KodPocztowyColumn As DataColumn
            Get
                Return Me.columnKodPocztowy
            End Get
        End Property
        
        Friend ReadOnly Property TelefonColumn As DataColumn
            Get
                Return Me.columnTelefon
            End Get
        End Property
        
        Friend ReadOnly Property FaksColumn As DataColumn
            Get
                Return Me.columnFaks
            End Get
        End Property
        
        Friend ReadOnly Property EmailColumn As DataColumn
            Get
                Return Me.columnEmail
            End Get
        End Property
        
        Public Default ReadOnly Property Item(ByVal index As Integer) As tblKlienciRow
            Get
                Return CType(Me.Rows(index),tblKlienciRow)
            End Get
        End Property
        
        Public Event tblKlienciRowChanged As tblKlienciRowChangeEventHandler
        
        Public Event tblKlienciRowChanging As tblKlienciRowChangeEventHandler
        
        Public Event tblKlienciRowDeleted As tblKlienciRowChangeEventHandler
        
        Public Event tblKlienciRowDeleting As tblKlienciRowChangeEventHandler
        
        Public Overloads Sub AddtblKlienciRow(ByVal row As tblKlienciRow)
            Me.Rows.Add(row)
        End Sub
        
        Public Overloads Function AddtblKlienciRow(ByVal Imie As String, ByVal Nazwisko As String, ByVal Firma As String, ByVal Adres As String, ByVal Miasto As String, ByVal Wojewodztwo As String, ByVal KodPocztowy As String, ByVal Telefon As String, ByVal Faks As String, ByVal Email As String) As tblKlienciRow
            Dim rowtblKlienciRow As tblKlienciRow = CType(Me.NewRow,tblKlienciRow)
            rowtblKlienciRow.ItemArray = New Object() {Nothing, Imie, Nazwisko, Firma, Adres, Miasto, Wojewodztwo, KodPocztowy, Telefon, Faks, Email}
            Me.Rows.Add(rowtblKlienciRow)
            Return rowtblKlienciRow
        End Function
        
        Public Function FindByID(ByVal ID As Integer) As tblKlienciRow
            Return CType(Me.Rows.Find(New Object() {ID}),tblKlienciRow)
        End Function
        
        Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
            Return Me.Rows.GetEnumerator
        End Function
        
        Public Overrides Function Clone() As DataTable
            Dim cln As tblKlienciDataTable = CType(MyBase.Clone,tblKlienciDataTable)
            cln.InitVars
            Return cln
        End Function
        
        Protected Overrides Function CreateInstance() As DataTable
            Return New tblKlienciDataTable
        End Function
        
        Friend Sub InitVars()
            Me.columnID = Me.Columns("ID")
            Me.columnImie = Me.Columns("Imie")
            Me.columnNazwisko = Me.Columns("Nazwisko")
            Me.columnFirma = Me.Columns("Firma")
            Me.columnAdres = Me.Columns("Adres")
            Me.columnMiasto = Me.Columns("Miasto")
            Me.columnWojewodztwo = Me.Columns("Wojewodztwo")
            Me.columnKodPocztowy = Me.Columns("KodPocztowy")
            Me.columnTelefon = Me.Columns("Telefon")
            Me.columnFaks = Me.Columns("Faks")
            Me.columnEmail = Me.Columns("Email")
        End Sub
        
        Private Sub InitClass()
            Me.columnID = New DataColumn("ID", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnID)
            Me.columnImie = New DataColumn("Imie", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnImie)
            Me.columnNazwisko = New DataColumn("Nazwisko", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnNazwisko)
            Me.columnFirma = New DataColumn("Firma", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnFirma)
            Me.columnAdres = New DataColumn("Adres", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnAdres)
            Me.columnMiasto = New DataColumn("Miasto", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnMiasto)
            Me.columnWojewodztwo = New DataColumn("Wojewodztwo", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnWojewodztwo)
            Me.columnKodPocztowy = New DataColumn("KodPocztowy", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnKodPocztowy)
            Me.columnTelefon = New DataColumn("Telefon", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnTelefon)
            Me.columnFaks = New DataColumn("Faks", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnFaks)
            Me.columnEmail = New DataColumn("Email", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnEmail)
            Me.Constraints.Add(New UniqueConstraint("Constraint1", New DataColumn() {Me.columnID}, true))
            Me.columnID.AutoIncrement = true
            Me.columnID.AllowDBNull = false
            Me.columnID.ReadOnly = true
            Me.columnID.Unique = true
        End Sub
        
        Public Function NewtblKlienciRow() As tblKlienciRow
            Return CType(Me.NewRow,tblKlienciRow)
        End Function
        
        Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
            Return New tblKlienciRow(builder)
        End Function
        
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(tblKlienciRow)
        End Function
        
        Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.tblKlienciRowChangedEvent) Is Nothing) Then
                RaiseEvent tblKlienciRowChanged(Me, New tblKlienciRowChangeEvent(CType(e.Row,tblKlienciRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanging(e)
            If (Not (Me.tblKlienciRowChangingEvent) Is Nothing) Then
                RaiseEvent tblKlienciRowChanging(Me, New tblKlienciRowChangeEvent(CType(e.Row,tblKlienciRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleted(e)
            If (Not (Me.tblKlienciRowDeletedEvent) Is Nothing) Then
                RaiseEvent tblKlienciRowDeleted(Me, New tblKlienciRowChangeEvent(CType(e.Row,tblKlienciRow), e.Action))
            End If
        End Sub
        
        Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleting(e)
            If (Not (Me.tblKlienciRowDeletingEvent) Is Nothing) Then
                RaiseEvent tblKlienciRowDeleting(Me, New tblKlienciRowChangeEvent(CType(e.Row,tblKlienciRow), e.Action))
            End If
        End Sub
        
        Public Sub RemovetblKlienciRow(ByVal row As tblKlienciRow)
            Me.Rows.Remove(row)
        End Sub
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class tblKlienciRow
        Inherits DataRow
        
        Private tabletblKlienci As tblKlienciDataTable
        
        Friend Sub New(ByVal rb As DataRowBuilder)
            MyBase.New(rb)
            Me.tabletblKlienci = CType(Me.Table,tblKlienciDataTable)
        End Sub
        
        Public Property ID As Integer
            Get
                Return CType(Me(Me.tabletblKlienci.IDColumn),Integer)
            End Get
            Set
                Me(Me.tabletblKlienci.IDColumn) = value
            End Set
        End Property
        
        Public Property Imie As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.ImieColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.ImieColumn) = value
            End Set
        End Property
        
        Public Property Nazwisko As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.NazwiskoColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.NazwiskoColumn) = value
            End Set
        End Property
        
        Public Property Firma As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.FirmaColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.FirmaColumn) = value
            End Set
        End Property
        
        Public Property Adres As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.AdresColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.AdresColumn) = value
            End Set
        End Property
        
        Public Property Miasto As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.MiastoColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.MiastoColumn) = value
            End Set
        End Property
        
        Public Property Wojewodztwo As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.WojewodztwoColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.WojewodztwoColumn) = value
            End Set
        End Property
        
        Public Property KodPocztowy As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.KodPocztowyColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.KodPocztowyColumn) = value
            End Set
        End Property
        
        Public Property Telefon As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.TelefonColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.TelefonColumn) = value
            End Set
        End Property
        
        Public Property Faks As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.FaksColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.FaksColumn) = value
            End Set
        End Property
        
        Public Property Email As String
            Get
                Try 
                    Return CType(Me(Me.tabletblKlienci.EmailColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tabletblKlienci.EmailColumn) = value
            End Set
        End Property
        
        Public Function IsImieNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.ImieColumn)
        End Function
        
        Public Sub SetImieNull()
            Me(Me.tabletblKlienci.ImieColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsNazwiskoNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.NazwiskoColumn)
        End Function
        
        Public Sub SetNazwiskoNull()
            Me(Me.tabletblKlienci.NazwiskoColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsFirmaNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.FirmaColumn)
        End Function
        
        Public Sub SetFirmaNull()
            Me(Me.tabletblKlienci.FirmaColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsAdresNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.AdresColumn)
        End Function
        
        Public Sub SetAdresNull()
            Me(Me.tabletblKlienci.AdresColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsMiastoNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.MiastoColumn)
        End Function
        
        Public Sub SetMiastoNull()
            Me(Me.tabletblKlienci.MiastoColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsWojewodztwoNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.WojewodztwoColumn)
        End Function
        
        Public Sub SetWojewodztwoNull()
            Me(Me.tabletblKlienci.WojewodztwoColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsKodPocztowyNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.KodPocztowyColumn)
        End Function
        
        Public Sub SetKodPocztowyNull()
            Me(Me.tabletblKlienci.KodPocztowyColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsTelefonNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.TelefonColumn)
        End Function
        
        Public Sub SetTelefonNull()
            Me(Me.tabletblKlienci.TelefonColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsFaksNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.FaksColumn)
        End Function
        
        Public Sub SetFaksNull()
            Me(Me.tabletblKlienci.FaksColumn) = System.Convert.DBNull
        End Sub
        
        Public Function IsEmailNull() As Boolean
            Return Me.IsNull(Me.tabletblKlienci.EmailColumn)
        End Function
        
        Public Sub SetEmailNull()
            Me(Me.tabletblKlienci.EmailColumn) = System.Convert.DBNull
        End Sub
    End Class
    
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class tblKlienciRowChangeEvent
        Inherits EventArgs
        
        Private eventRow As tblKlienciRow
        
        Private eventAction As DataRowAction
        
        Public Sub New(ByVal row As tblKlienciRow, ByVal action As DataRowAction)
            MyBase.New
            Me.eventRow = row
            Me.eventAction = action
        End Sub
        
        Public ReadOnly Property Row As tblKlienciRow
            Get
                Return Me.eventRow
            End Get
        End Property
        
        Public ReadOnly Property Action As DataRowAction
            Get
                Return Me.eventAction
            End Get
        End Property
    End Class
End Class
