Dodaj pliki projektów.
This commit is contained in:
1 parent
1d6a7b0924
commit
da030eff7c
298 files changed
+83623
No files matched your search
@@ -0,0 +1,711 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class MainFrm
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Formularz przesłania metodę dispose, aby wyczyścić listę składników.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wymagane przez Projektanta formularzy systemu Windows
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'UWAGA: następująca procedura jest wymagana przez Projektanta formularzy systemu Windows
|
||||
'Możesz to modyfikować, używając Projektanta formularzy systemu Windows.
|
||||
'Nie należy modyfikować za pomocą edytora kodu.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(MainFrm))
|
||||
Me.TlMainPanel = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.GbRadio = New System.Windows.Forms.GroupBox()
|
||||
Me.RbAll = New System.Windows.Forms.RadioButton()
|
||||
Me.RbBlack = New System.Windows.Forms.RadioButton()
|
||||
Me.RbRed = New System.Windows.Forms.RadioButton()
|
||||
Me.CbWewn = New System.Windows.Forms.CheckBox()
|
||||
Me.CbZakup = New System.Windows.Forms.CheckBox()
|
||||
Me.CbSprzedaz = New System.Windows.Forms.CheckBox()
|
||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||
Me.CbKonto = New System.Windows.Forms.ComboBox()
|
||||
Me.BsTbmyImpDMKonta = New System.Windows.Forms.BindingSource(Me.components)
|
||||
Me.DsMain = New ImportDokMag.DsMain()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.edRok = New System.Windows.Forms.NumericUpDown()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.CbMiesiac = New System.Windows.Forms.ComboBox()
|
||||
Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.BtImport = New System.Windows.Forms.Button()
|
||||
Me.lbUwaga = New System.Windows.Forms.Button()
|
||||
Me.BtKonfig = New System.Windows.Forms.Button()
|
||||
Me.BtUsunFlage = New System.Windows.Forms.Button()
|
||||
Me.BtKoniec = New System.Windows.Forms.Button()
|
||||
Me.BtOdswiez = New System.Windows.Forms.Button()
|
||||
Me.TcZakladki = New System.Windows.Forms.TabControl()
|
||||
Me.TpDocs = New System.Windows.Forms.TabPage()
|
||||
Me.DgvDokumenty = New System.Windows.Forms.DataGridView()
|
||||
Me.colLp = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colDokument = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colDokZr = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colDZKOpis = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colDataWyst = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colDataOper = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colSumaCT = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colSumaDT = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colDZKDziennik = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colDekret = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colRokMiesiac = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colDataImportu = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colMagazyn = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colKontrahent = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colOpisDok = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.colDokKoryg = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.BsTbmy_ImpDM_Src = New System.Windows.Forms.BindingSource(Me.components)
|
||||
Me.TpList = New System.Windows.Forms.TabPage()
|
||||
Me.LstWynik = New System.Windows.Forms.ListBox()
|
||||
Me.Timer = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.Tamy_ImpDM_Src = New ImportDokMag.DsMainTableAdapters.Tamy_ImpDM_Src()
|
||||
Me.TableAdapterManager = New ImportDokMag.DsMainTableAdapters.TableAdapterManager()
|
||||
Me.BsTbmy_ImpDM_Dekr = New System.Windows.Forms.BindingSource(Me.components)
|
||||
Me.Tamy_ImpDM_Dekr = New ImportDokMag.DsMainTableAdapters.Tamy_ImpDM_Dekr()
|
||||
Me.Tamy_ImpDM_Konta = New ImportDokMag.DsMainTableAdapters.Tamy_ImpDM_Konta()
|
||||
Me.TlMainPanel.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.GbRadio.SuspendLayout()
|
||||
Me.Panel2.SuspendLayout()
|
||||
CType(Me.BsTbmyImpDMKonta, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.DsMain, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.edRok, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.TableLayoutPanel1.SuspendLayout()
|
||||
Me.TcZakladki.SuspendLayout()
|
||||
Me.TpDocs.SuspendLayout()
|
||||
CType(Me.DgvDokumenty, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.BsTbmy_ImpDM_Src, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.TpList.SuspendLayout()
|
||||
CType(Me.BsTbmy_ImpDM_Dekr, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'TlMainPanel
|
||||
'
|
||||
Me.TlMainPanel.ColumnCount = 2
|
||||
Me.TlMainPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TlMainPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 150.0!))
|
||||
Me.TlMainPanel.Controls.Add(Me.Panel1, 0, 0)
|
||||
Me.TlMainPanel.Controls.Add(Me.Panel2, 0, 2)
|
||||
Me.TlMainPanel.Controls.Add(Me.TableLayoutPanel1, 1, 1)
|
||||
Me.TlMainPanel.Controls.Add(Me.BtKoniec, 1, 2)
|
||||
Me.TlMainPanel.Controls.Add(Me.BtOdswiez, 1, 0)
|
||||
Me.TlMainPanel.Controls.Add(Me.TcZakladki, 0, 1)
|
||||
Me.TlMainPanel.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TlMainPanel.Location = New System.Drawing.Point(3, 3)
|
||||
Me.TlMainPanel.Name = "TlMainPanel"
|
||||
Me.TlMainPanel.RowCount = 3
|
||||
Me.TlMainPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 7.102805!))
|
||||
Me.TlMainPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 92.89719!))
|
||||
Me.TlMainPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 65.0!))
|
||||
Me.TlMainPanel.Size = New System.Drawing.Size(774, 651)
|
||||
Me.TlMainPanel.TabIndex = 0
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Controls.Add(Me.GbRadio)
|
||||
Me.Panel1.Controls.Add(Me.CbWewn)
|
||||
Me.Panel1.Controls.Add(Me.CbZakup)
|
||||
Me.Panel1.Controls.Add(Me.CbSprzedaz)
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Panel1.Location = New System.Drawing.Point(3, 3)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(618, 35)
|
||||
Me.Panel1.TabIndex = 1
|
||||
'
|
||||
'GbRadio
|
||||
'
|
||||
Me.GbRadio.Controls.Add(Me.RbAll)
|
||||
Me.GbRadio.Controls.Add(Me.RbBlack)
|
||||
Me.GbRadio.Controls.Add(Me.RbRed)
|
||||
Me.GbRadio.Dock = System.Windows.Forms.DockStyle.Right
|
||||
Me.GbRadio.Location = New System.Drawing.Point(241, 0)
|
||||
Me.GbRadio.Name = "GbRadio"
|
||||
Me.GbRadio.Size = New System.Drawing.Size(377, 35)
|
||||
Me.GbRadio.TabIndex = 3
|
||||
Me.GbRadio.TabStop = False
|
||||
'
|
||||
'RbAll
|
||||
'
|
||||
Me.RbAll.AutoSize = True
|
||||
Me.RbAll.Location = New System.Drawing.Point(297, 9)
|
||||
Me.RbAll.Name = "RbAll"
|
||||
Me.RbAll.Size = New System.Drawing.Size(73, 17)
|
||||
Me.RbAll.TabIndex = 2
|
||||
Me.RbAll.TabStop = True
|
||||
Me.RbAll.Text = "Wszystkie"
|
||||
Me.RbAll.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RbBlack
|
||||
'
|
||||
Me.RbBlack.AutoSize = True
|
||||
Me.RbBlack.Location = New System.Drawing.Point(164, 9)
|
||||
Me.RbBlack.Name = "RbBlack"
|
||||
Me.RbBlack.Size = New System.Drawing.Size(101, 17)
|
||||
Me.RbBlack.TabIndex = 1
|
||||
Me.RbBlack.TabStop = True
|
||||
Me.RbBlack.Text = "Nieimportowane"
|
||||
Me.RbBlack.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RbRed
|
||||
'
|
||||
Me.RbRed.AutoSize = True
|
||||
Me.RbRed.Location = New System.Drawing.Point(34, 9)
|
||||
Me.RbRed.Name = "RbRed"
|
||||
Me.RbRed.Size = New System.Drawing.Size(98, 17)
|
||||
Me.RbRed.TabIndex = 0
|
||||
Me.RbRed.TabStop = True
|
||||
Me.RbRed.Text = "Zaimportowane"
|
||||
Me.RbRed.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CbWewn
|
||||
'
|
||||
Me.CbWewn.AutoSize = True
|
||||
Me.CbWewn.Location = New System.Drawing.Point(146, 9)
|
||||
Me.CbWewn.Name = "CbWewn"
|
||||
Me.CbWewn.Size = New System.Drawing.Size(86, 17)
|
||||
Me.CbWewn.TabIndex = 2
|
||||
Me.CbWewn.Text = "Wewnętrzne"
|
||||
Me.CbWewn.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CbZakup
|
||||
'
|
||||
Me.CbZakup.AutoSize = True
|
||||
Me.CbZakup.Location = New System.Drawing.Point(83, 9)
|
||||
Me.CbZakup.Name = "CbZakup"
|
||||
Me.CbZakup.Size = New System.Drawing.Size(57, 17)
|
||||
Me.CbZakup.TabIndex = 1
|
||||
Me.CbZakup.Text = "Zakup"
|
||||
Me.CbZakup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CbSprzedaz
|
||||
'
|
||||
Me.CbSprzedaz.AutoSize = True
|
||||
Me.CbSprzedaz.Location = New System.Drawing.Point(7, 9)
|
||||
Me.CbSprzedaz.Name = "CbSprzedaz"
|
||||
Me.CbSprzedaz.Size = New System.Drawing.Size(70, 17)
|
||||
Me.CbSprzedaz.TabIndex = 0
|
||||
Me.CbSprzedaz.Text = "Sprzedaż"
|
||||
Me.CbSprzedaz.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Panel2
|
||||
'
|
||||
Me.Panel2.Controls.Add(Me.CbKonto)
|
||||
Me.Panel2.Controls.Add(Me.Label3)
|
||||
Me.Panel2.Controls.Add(Me.edRok)
|
||||
Me.Panel2.Controls.Add(Me.Label2)
|
||||
Me.Panel2.Controls.Add(Me.Label1)
|
||||
Me.Panel2.Controls.Add(Me.CbMiesiac)
|
||||
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Panel2.Location = New System.Drawing.Point(3, 588)
|
||||
Me.Panel2.Name = "Panel2"
|
||||
Me.Panel2.Size = New System.Drawing.Size(618, 60)
|
||||
Me.Panel2.TabIndex = 2
|
||||
'
|
||||
'CbKonto
|
||||
'
|
||||
Me.CbKonto.DataSource = Me.BsTbmyImpDMKonta
|
||||
Me.CbKonto.DisplayMember = "Konto"
|
||||
Me.CbKonto.FormattingEnabled = True
|
||||
Me.CbKonto.Location = New System.Drawing.Point(415, 20)
|
||||
Me.CbKonto.Name = "CbKonto"
|
||||
Me.CbKonto.Size = New System.Drawing.Size(121, 21)
|
||||
Me.CbKonto.TabIndex = 5
|
||||
Me.CbKonto.ValueMember = "Konto"
|
||||
'
|
||||
'BsTbmyImpDMKonta
|
||||
'
|
||||
Me.BsTbmyImpDMKonta.DataMember = "Tbmy_ImpDM_Konta"
|
||||
Me.BsTbmyImpDMKonta.DataSource = Me.DsMain
|
||||
'
|
||||
'DsMain
|
||||
'
|
||||
Me.DsMain.DataSetName = "DsMain"
|
||||
Me.DsMain.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(366, 24)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(35, 13)
|
||||
Me.Label3.TabIndex = 4
|
||||
Me.Label3.Text = "Konto"
|
||||
'
|
||||
'edRok
|
||||
'
|
||||
Me.edRok.Location = New System.Drawing.Point(37, 22)
|
||||
Me.edRok.Maximum = New Decimal(New Integer() {3000, 0, 0, 0})
|
||||
Me.edRok.Minimum = New Decimal(New Integer() {2000, 0, 0, 0})
|
||||
Me.edRok.Name = "edRok"
|
||||
Me.edRok.Size = New System.Drawing.Size(120, 20)
|
||||
Me.edRok.TabIndex = 0
|
||||
Me.edRok.Value = New Decimal(New Integer() {2019, 0, 0, 0})
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(169, 24)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(43, 13)
|
||||
Me.Label2.TabIndex = 3
|
||||
Me.Label2.Text = "Miesiąc"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(4, 24)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(27, 13)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "Rok"
|
||||
'
|
||||
'CbMiesiac
|
||||
'
|
||||
Me.CbMiesiac.FormattingEnabled = True
|
||||
Me.CbMiesiac.Items.AddRange(New Object() {"styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"})
|
||||
Me.CbMiesiac.Location = New System.Drawing.Point(218, 21)
|
||||
Me.CbMiesiac.Name = "CbMiesiac"
|
||||
Me.CbMiesiac.Size = New System.Drawing.Size(121, 21)
|
||||
Me.CbMiesiac.TabIndex = 1
|
||||
Me.CbMiesiac.Text = "styczeń"
|
||||
'
|
||||
'TableLayoutPanel1
|
||||
'
|
||||
Me.TableLayoutPanel1.AutoScroll = True
|
||||
Me.TableLayoutPanel1.ColumnCount = 3
|
||||
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100.0!))
|
||||
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.BtImport, 1, 1)
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.lbUwaga, 1, 4)
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.BtKonfig, 1, 6)
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.BtUsunFlage, 1, 3)
|
||||
Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TableLayoutPanel1.Location = New System.Drawing.Point(627, 44)
|
||||
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
|
||||
Me.TableLayoutPanel1.RowCount = 8
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32.0!))
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22.0!))
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 42.0!))
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60.0!))
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 57.0!))
|
||||
Me.TableLayoutPanel1.Size = New System.Drawing.Size(144, 538)
|
||||
Me.TableLayoutPanel1.TabIndex = 3
|
||||
'
|
||||
'BtImport
|
||||
'
|
||||
Me.BtImport.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BtImport.Location = New System.Drawing.Point(25, 23)
|
||||
Me.BtImport.Name = "BtImport"
|
||||
Me.BtImport.Size = New System.Drawing.Size(94, 26)
|
||||
Me.BtImport.TabIndex = 4
|
||||
Me.BtImport.Text = "Importuj"
|
||||
Me.BtImport.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lbUwaga
|
||||
'
|
||||
Me.lbUwaga.BackColor = System.Drawing.Color.PaleGreen
|
||||
Me.lbUwaga.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.lbUwaga.Enabled = False
|
||||
Me.lbUwaga.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(238, Byte))
|
||||
Me.lbUwaga.ForeColor = System.Drawing.Color.Red
|
||||
Me.lbUwaga.Location = New System.Drawing.Point(25, 119)
|
||||
Me.lbUwaga.Name = "lbUwaga"
|
||||
Me.lbUwaga.Size = New System.Drawing.Size(94, 54)
|
||||
Me.lbUwaga.TabIndex = 5
|
||||
Me.lbUwaga.Text = "Czekaj: pobieranie danych"
|
||||
Me.lbUwaga.UseVisualStyleBackColor = False
|
||||
Me.lbUwaga.Visible = False
|
||||
'
|
||||
'BtKonfig
|
||||
'
|
||||
Me.BtKonfig.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BtKonfig.Location = New System.Drawing.Point(25, 456)
|
||||
Me.BtKonfig.Name = "BtKonfig"
|
||||
Me.BtKonfig.Size = New System.Drawing.Size(94, 22)
|
||||
Me.BtKonfig.TabIndex = 6
|
||||
Me.BtKonfig.Text = "Konfiguracja"
|
||||
Me.BtKonfig.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BtUsunFlage
|
||||
'
|
||||
Me.BtUsunFlage.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BtUsunFlage.Location = New System.Drawing.Point(25, 77)
|
||||
Me.BtUsunFlage.Name = "BtUsunFlage"
|
||||
Me.BtUsunFlage.Size = New System.Drawing.Size(94, 36)
|
||||
Me.BtUsunFlage.TabIndex = 7
|
||||
Me.BtUsunFlage.Text = "Skasuj flagę importu"
|
||||
Me.BtUsunFlage.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BtKoniec
|
||||
'
|
||||
Me.BtKoniec.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.BtKoniec.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.BtKoniec.Location = New System.Drawing.Point(627, 588)
|
||||
Me.BtKoniec.Name = "BtKoniec"
|
||||
Me.BtKoniec.Size = New System.Drawing.Size(144, 60)
|
||||
Me.BtKoniec.TabIndex = 4
|
||||
Me.BtKoniec.Text = "Koniec"
|
||||
Me.BtKoniec.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BtOdswiez
|
||||
'
|
||||
Me.BtOdswiez.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.BtOdswiez.Location = New System.Drawing.Point(627, 3)
|
||||
Me.BtOdswiez.Name = "BtOdswiez"
|
||||
Me.BtOdswiez.Size = New System.Drawing.Size(144, 35)
|
||||
Me.BtOdswiez.TabIndex = 5
|
||||
Me.BtOdswiez.Text = "Odśwież dane"
|
||||
Me.BtOdswiez.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TcZakladki
|
||||
'
|
||||
Me.TcZakladki.Controls.Add(Me.TpDocs)
|
||||
Me.TcZakladki.Controls.Add(Me.TpList)
|
||||
Me.TcZakladki.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TcZakladki.Location = New System.Drawing.Point(3, 44)
|
||||
Me.TcZakladki.Name = "TcZakladki"
|
||||
Me.TcZakladki.SelectedIndex = 0
|
||||
Me.TcZakladki.Size = New System.Drawing.Size(618, 538)
|
||||
Me.TcZakladki.TabIndex = 6
|
||||
'
|
||||
'TpDocs
|
||||
'
|
||||
Me.TpDocs.Controls.Add(Me.DgvDokumenty)
|
||||
Me.TpDocs.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TpDocs.Name = "TpDocs"
|
||||
Me.TpDocs.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TpDocs.Size = New System.Drawing.Size(610, 512)
|
||||
Me.TpDocs.TabIndex = 0
|
||||
Me.TpDocs.Text = "Dokumenty"
|
||||
Me.TpDocs.UseVisualStyleBackColor = True
|
||||
'
|
||||
'DgvDokumenty
|
||||
'
|
||||
Me.DgvDokumenty.AllowUserToAddRows = False
|
||||
Me.DgvDokumenty.AllowUserToDeleteRows = False
|
||||
Me.DgvDokumenty.AllowUserToOrderColumns = True
|
||||
Me.DgvDokumenty.AllowUserToResizeRows = False
|
||||
DataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke
|
||||
Me.DgvDokumenty.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
||||
Me.DgvDokumenty.AutoGenerateColumns = False
|
||||
Me.DgvDokumenty.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells
|
||||
Me.DgvDokumenty.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable
|
||||
Me.DgvDokumenty.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.DgvDokumenty.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.colLp, Me.colDokument, Me.colDokZr, Me.colDZKOpis, Me.colDataWyst, Me.colDataOper, Me.colSumaCT, Me.colSumaDT, Me.colDZKDziennik, Me.colDekret, Me.colRokMiesiac, Me.colDataImportu, Me.colMagazyn, Me.colKontrahent, Me.colOpisDok, Me.colDokKoryg})
|
||||
Me.DgvDokumenty.DataSource = Me.BsTbmy_ImpDM_Src
|
||||
Me.DgvDokumenty.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.DgvDokumenty.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically
|
||||
Me.DgvDokumenty.Location = New System.Drawing.Point(3, 3)
|
||||
Me.DgvDokumenty.Name = "DgvDokumenty"
|
||||
Me.DgvDokumenty.ReadOnly = True
|
||||
Me.DgvDokumenty.RowHeadersVisible = False
|
||||
Me.DgvDokumenty.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.[False]
|
||||
Me.DgvDokumenty.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.DgvDokumenty.ShowEditingIcon = False
|
||||
Me.DgvDokumenty.Size = New System.Drawing.Size(604, 506)
|
||||
Me.DgvDokumenty.TabIndex = 0
|
||||
'
|
||||
'colLp
|
||||
'
|
||||
Me.colLp.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colLp.DataPropertyName = "Lp"
|
||||
Me.colLp.HeaderText = "Lp"
|
||||
Me.colLp.Name = "colLp"
|
||||
Me.colLp.ReadOnly = True
|
||||
Me.colLp.Width = 44
|
||||
'
|
||||
'colDokument
|
||||
'
|
||||
Me.colDokument.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colDokument.DataPropertyName = "Dokument"
|
||||
Me.colDokument.HeaderText = "Dokument"
|
||||
Me.colDokument.Name = "colDokument"
|
||||
Me.colDokument.ReadOnly = True
|
||||
Me.colDokument.Width = 81
|
||||
'
|
||||
'colDokZr
|
||||
'
|
||||
Me.colDokZr.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colDokZr.DataPropertyName = "DokZr"
|
||||
Me.colDokZr.HeaderText = "Dok. żródłowy"
|
||||
Me.colDokZr.Name = "colDokZr"
|
||||
Me.colDokZr.ReadOnly = True
|
||||
Me.colDokZr.Width = 101
|
||||
'
|
||||
'colDZKOpis
|
||||
'
|
||||
Me.colDZKOpis.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colDZKOpis.DataPropertyName = "DZK_Opis"
|
||||
Me.colDZKOpis.HeaderText = "Opis dziennika"
|
||||
Me.colDZKOpis.Name = "colDZKOpis"
|
||||
Me.colDZKOpis.ReadOnly = True
|
||||
Me.colDZKOpis.Width = 53
|
||||
'
|
||||
'colDataWyst
|
||||
'
|
||||
Me.colDataWyst.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colDataWyst.DataPropertyName = "DataWyst"
|
||||
Me.colDataWyst.HeaderText = "Data"
|
||||
Me.colDataWyst.Name = "colDataWyst"
|
||||
Me.colDataWyst.ReadOnly = True
|
||||
Me.colDataWyst.Width = 55
|
||||
'
|
||||
'colDataOper
|
||||
'
|
||||
Me.colDataOper.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colDataOper.DataPropertyName = "DataOper"
|
||||
Me.colDataOper.HeaderText = "Data dokumentu"
|
||||
Me.colDataOper.Name = "colDataOper"
|
||||
Me.colDataOper.ReadOnly = True
|
||||
Me.colDataOper.Width = 102
|
||||
'
|
||||
'colSumaCT
|
||||
'
|
||||
Me.colSumaCT.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colSumaCT.DataPropertyName = "SumaCT"
|
||||
Me.colSumaCT.HeaderText = "Suma Ma"
|
||||
Me.colSumaCT.Name = "colSumaCT"
|
||||
Me.colSumaCT.ReadOnly = True
|
||||
Me.colSumaCT.Width = 71
|
||||
'
|
||||
'colSumaDT
|
||||
'
|
||||
Me.colSumaDT.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colSumaDT.DataPropertyName = "SumaDT"
|
||||
Me.colSumaDT.HeaderText = "Suma Winien"
|
||||
Me.colSumaDT.Name = "colSumaDT"
|
||||
Me.colSumaDT.ReadOnly = True
|
||||
Me.colSumaDT.Width = 87
|
||||
'
|
||||
'colDZKDziennik
|
||||
'
|
||||
Me.colDZKDziennik.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colDZKDziennik.DataPropertyName = "DZK_Dziennik"
|
||||
Me.colDZKDziennik.HeaderText = "Dziennik"
|
||||
Me.colDZKDziennik.Name = "colDZKDziennik"
|
||||
Me.colDZKDziennik.ReadOnly = True
|
||||
Me.colDZKDziennik.Visible = False
|
||||
Me.colDZKDziennik.Width = 73
|
||||
'
|
||||
'colDekret
|
||||
'
|
||||
Me.colDekret.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colDekret.DataPropertyName = "Dekret"
|
||||
Me.colDekret.HeaderText = "Dekret"
|
||||
Me.colDekret.Name = "colDekret"
|
||||
Me.colDekret.ReadOnly = True
|
||||
Me.colDekret.Visible = False
|
||||
Me.colDekret.Width = 64
|
||||
'
|
||||
'colRokMiesiac
|
||||
'
|
||||
Me.colRokMiesiac.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colRokMiesiac.DataPropertyName = "RokMiesiac"
|
||||
Me.colRokMiesiac.HeaderText = "RokMiesiac"
|
||||
Me.colRokMiesiac.Name = "colRokMiesiac"
|
||||
Me.colRokMiesiac.ReadOnly = True
|
||||
Me.colRokMiesiac.Visible = False
|
||||
Me.colRokMiesiac.Width = 88
|
||||
'
|
||||
'colDataImportu
|
||||
'
|
||||
Me.colDataImportu.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colDataImportu.DataPropertyName = "DataImportu"
|
||||
Me.colDataImportu.HeaderText = "Data importu"
|
||||
Me.colDataImportu.Name = "colDataImportu"
|
||||
Me.colDataImportu.ReadOnly = True
|
||||
Me.colDataImportu.Width = 85
|
||||
'
|
||||
'colMagazyn
|
||||
'
|
||||
Me.colMagazyn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colMagazyn.DataPropertyName = "Magazyn"
|
||||
Me.colMagazyn.HeaderText = "Magazyn"
|
||||
Me.colMagazyn.Name = "colMagazyn"
|
||||
Me.colMagazyn.ReadOnly = True
|
||||
'
|
||||
'colKontrahent
|
||||
'
|
||||
Me.colKontrahent.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colKontrahent.DataPropertyName = "Kontrahent"
|
||||
Me.colKontrahent.HeaderText = "Kontrahent"
|
||||
Me.colKontrahent.Name = "colKontrahent"
|
||||
Me.colKontrahent.ReadOnly = True
|
||||
'
|
||||
'colOpisDok
|
||||
'
|
||||
Me.colOpisDok.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colOpisDok.DataPropertyName = "Opis"
|
||||
Me.colOpisDok.HeaderText = "Opis dokumentu"
|
||||
Me.colOpisDok.Name = "colOpisDok"
|
||||
Me.colOpisDok.ReadOnly = True
|
||||
'
|
||||
'colDokKoryg
|
||||
'
|
||||
Me.colDokKoryg.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None
|
||||
Me.colDokKoryg.DataPropertyName = "DokKoryg"
|
||||
Me.colDokKoryg.HeaderText = "DokKoryg"
|
||||
Me.colDokKoryg.Name = "colDokKoryg"
|
||||
Me.colDokKoryg.ReadOnly = True
|
||||
'
|
||||
'BsTbmy_ImpDM_Src
|
||||
'
|
||||
Me.BsTbmy_ImpDM_Src.DataMember = "Tbmy_ImpDM_Src"
|
||||
Me.BsTbmy_ImpDM_Src.DataSource = Me.DsMain
|
||||
'
|
||||
'TpList
|
||||
'
|
||||
Me.TpList.Controls.Add(Me.LstWynik)
|
||||
Me.TpList.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TpList.Name = "TpList"
|
||||
Me.TpList.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TpList.Size = New System.Drawing.Size(610, 512)
|
||||
Me.TpList.TabIndex = 1
|
||||
Me.TpList.Text = "Przebieg pracy"
|
||||
Me.TpList.UseVisualStyleBackColor = True
|
||||
'
|
||||
'LstWynik
|
||||
'
|
||||
Me.LstWynik.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LstWynik.FormattingEnabled = True
|
||||
Me.LstWynik.Location = New System.Drawing.Point(3, 3)
|
||||
Me.LstWynik.Name = "LstWynik"
|
||||
Me.LstWynik.Size = New System.Drawing.Size(604, 506)
|
||||
Me.LstWynik.TabIndex = 0
|
||||
'
|
||||
'Timer
|
||||
'
|
||||
Me.Timer.Interval = 200
|
||||
'
|
||||
'Tamy_ImpDM_Src
|
||||
'
|
||||
Me.Tamy_ImpDM_Src.ClearBeforeFill = True
|
||||
'
|
||||
'TableAdapterManager
|
||||
'
|
||||
Me.TableAdapterManager.BackupDataSetBeforeUpdate = False
|
||||
Me.TableAdapterManager.Connection = Nothing
|
||||
Me.TableAdapterManager.UpdateOrder = ImportDokMag.DsMainTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete
|
||||
'
|
||||
'BsTbmy_ImpDM_Dekr
|
||||
'
|
||||
Me.BsTbmy_ImpDM_Dekr.DataMember = "Tbmy_ImpDM_Dekr"
|
||||
Me.BsTbmy_ImpDM_Dekr.DataSource = Me.DsMain
|
||||
'
|
||||
'Tamy_ImpDM_Dekr
|
||||
'
|
||||
Me.Tamy_ImpDM_Dekr.ClearBeforeFill = True
|
||||
'
|
||||
'Tamy_ImpDM_Konta
|
||||
'
|
||||
Me.Tamy_ImpDM_Konta.ClearBeforeFill = True
|
||||
'
|
||||
'MainFrm
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi
|
||||
Me.CancelButton = Me.BtKoniec
|
||||
Me.ClientSize = New System.Drawing.Size(780, 657)
|
||||
Me.Controls.Add(Me.TlMainPanel)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.MinimumSize = New System.Drawing.Size(796, 696)
|
||||
Me.Name = "MainFrm"
|
||||
Me.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Import dokumentów magazynowych 1.4.2 z 28.04.2023"
|
||||
Me.TlMainPanel.ResumeLayout(False)
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
Me.GbRadio.ResumeLayout(False)
|
||||
Me.GbRadio.PerformLayout()
|
||||
Me.Panel2.ResumeLayout(False)
|
||||
Me.Panel2.PerformLayout()
|
||||
CType(Me.BsTbmyImpDMKonta, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.DsMain, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.edRok, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.TableLayoutPanel1.ResumeLayout(False)
|
||||
Me.TcZakladki.ResumeLayout(False)
|
||||
Me.TpDocs.ResumeLayout(False)
|
||||
CType(Me.DgvDokumenty, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.BsTbmy_ImpDM_Src, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.TpList.ResumeLayout(False)
|
||||
CType(Me.BsTbmy_ImpDM_Dekr, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents TlMainPanel As TableLayoutPanel
|
||||
Friend WithEvents DgvDokumenty As DataGridView
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents CbWewn As CheckBox
|
||||
Friend WithEvents CbZakup As CheckBox
|
||||
Friend WithEvents CbSprzedaz As CheckBox
|
||||
Friend WithEvents Panel2 As Panel
|
||||
Friend WithEvents edRok As NumericUpDown
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents CbMiesiac As ComboBox
|
||||
Friend WithEvents TableLayoutPanel1 As TableLayoutPanel
|
||||
Friend WithEvents BtImport As Button
|
||||
Friend WithEvents BtKoniec As Button
|
||||
Friend WithEvents BtOdswiez As Button
|
||||
Friend WithEvents DsMain As DsMain
|
||||
Friend WithEvents BsTbmy_ImpDM_Src As BindingSource
|
||||
Friend WithEvents Tamy_ImpDM_Src As DsMainTableAdapters.Tamy_ImpDM_Src
|
||||
Friend WithEvents TableAdapterManager As DsMainTableAdapters.TableAdapterManager
|
||||
Friend WithEvents lbUwaga As Button
|
||||
Friend WithEvents TcZakladki As TabControl
|
||||
Friend WithEvents TpDocs As TabPage
|
||||
Friend WithEvents TpList As TabPage
|
||||
Friend WithEvents LstWynik As ListBox
|
||||
Friend WithEvents BtKonfig As Button
|
||||
Friend WithEvents Timer As Timer
|
||||
Friend WithEvents BsTbmy_ImpDM_Dekr As BindingSource
|
||||
Friend WithEvents Tamy_ImpDM_Dekr As DsMainTableAdapters.Tamy_ImpDM_Dekr
|
||||
Friend WithEvents BtUsunFlage As Button
|
||||
Friend WithEvents colLp As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colDokument As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colDokZr As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colDZKOpis As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colDataWyst As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colDataOper As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colSumaCT As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colSumaDT As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colDZKDziennik As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colDekret As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colRokMiesiac As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colDataImportu As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colMagazyn As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colKontrahent As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colOpisDok As DataGridViewTextBoxColumn
|
||||
Friend WithEvents colDokKoryg As DataGridViewTextBoxColumn
|
||||
Friend WithEvents GbRadio As GroupBox
|
||||
Friend WithEvents RbAll As RadioButton
|
||||
Friend WithEvents RbBlack As RadioButton
|
||||
Friend WithEvents RbRed As RadioButton
|
||||
Friend WithEvents CbKonto As ComboBox
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents BsTbmyImpDMKonta As BindingSource
|
||||
Friend WithEvents Tamy_ImpDM_Konta As DsMainTableAdapters.Tamy_ImpDM_Konta
|
||||
End Class
|
||||
@@ -0,0 +1,389 @@
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
|
||||
Public Class MainFrm
|
||||
Public Tylko_Listing As Boolean
|
||||
Public f_out As StreamWriter ' Plik wyjściowy
|
||||
|
||||
Private SpFlag, ZakFlag, WewFlag As Integer
|
||||
Private RM, Rok, Mies As Integer
|
||||
Private SrcConn_str, DstConn_str As String
|
||||
|
||||
'----------------------------------------------------------
|
||||
Private Const INT_lens As Integer = 1
|
||||
Private p() As Integer = {2, 4, 7, 9, 3, INT_lens}
|
||||
|
||||
Public Function Encrypt(ByVal inputstr As String) As String
|
||||
Dim str As StringBuilder
|
||||
Dim b As Integer = 6
|
||||
Dim i, j, k, c, cc, bb, lens As Integer
|
||||
|
||||
If inputstr > "" Then
|
||||
str = New StringBuilder(inputstr)
|
||||
lens = str.Length
|
||||
While (lens < b) OrElse (lens Mod b)
|
||||
str.Append(” “)
|
||||
lens += INT_lens
|
||||
End While
|
||||
cc = (lens / b) - INT_lens
|
||||
For i = 0 To cc
|
||||
bb = b - INT_lens
|
||||
For j = 0 To bb
|
||||
k = p(j) + 100
|
||||
c = (6 * i + j)
|
||||
str.Replace(str.Chars(c), Chr(Asc(str.Chars(c)) + k), c, INT_lens)
|
||||
Next
|
||||
Next
|
||||
Return str.ToString
|
||||
Else
|
||||
Return ""
|
||||
End If
|
||||
str = Nothing
|
||||
End Function
|
||||
|
||||
Public Function Decrypt(ByVal inputstr As String) As String
|
||||
Dim str As StringBuilder
|
||||
Dim b As Integer = 6
|
||||
Dim i, j, k, c, c1, cc, bb, lens As Integer
|
||||
|
||||
If inputstr > "" Then
|
||||
|
||||
str = New StringBuilder(inputstr)
|
||||
lens = str.Length
|
||||
While (lens < b) OrElse (lens Mod b)
|
||||
str.Append(” “)
|
||||
lens += INT_lens
|
||||
End While
|
||||
|
||||
cc = (lens / b) - INT_lens
|
||||
For i = 0 To cc
|
||||
bb = b - INT_lens
|
||||
For j = 0 To bb
|
||||
k = p(j) + 100
|
||||
c = (6 * i + j)
|
||||
c1 = Asc(str.Chars(c))
|
||||
c1 -= k
|
||||
str.Replace(str.Chars(c), Chr(c1), c, INT_lens)
|
||||
Next j
|
||||
Next i
|
||||
Return str.ToString
|
||||
Else
|
||||
Return ""
|
||||
End If
|
||||
str = Nothing
|
||||
End Function
|
||||
|
||||
Private Function zrob_polaczenie(srv As String, baza As String, user As String, pass As String)
|
||||
Dim cnstr As String
|
||||
|
||||
cnstr = "Data Source=" + srv + ";Initial Catalog=" + baza
|
||||
cnstr += ";Persist Security Info=false;User ID=" + Decrypt(user).Trim + ";Password=" + Decrypt(pass).Trim
|
||||
Return (cnstr)
|
||||
End Function
|
||||
|
||||
Private Function PolaczBaze() As Boolean
|
||||
Dim B1, conn, pp, K1 As String
|
||||
Dim ret As Boolean = False
|
||||
|
||||
lbUwaga.Text = "Czekaj: Logowanie do ERPXL"
|
||||
lbUwaga.Visible = True
|
||||
lbUwaga.BringToFront()
|
||||
lbUwaga.Refresh()
|
||||
|
||||
If Strings.Left(UCase(My.Settings.BazaDst), 6) = "CDNXL_" Or Strings.Left(UCase(My.Settings.BazaDst), 6) = "ERPXL_" Then
|
||||
B1 = Mid(My.Settings.BazaDst, 7)
|
||||
Else
|
||||
B1 = My.Settings.BazaDst
|
||||
End If
|
||||
K1 = My.Settings.SerwerKlucza
|
||||
If Not Zalogowany Then listuj(" Logowanie do ERP XL - proszę czekać...")
|
||||
ret = Zaloguj(B1, "", "", K1)
|
||||
If ret Then
|
||||
listuj(" sprawdzanie dostępności licencji...")
|
||||
ret = XLSprawdzLicencje()
|
||||
If ret Then
|
||||
listuj(" Zalogowano pomyslnie do ERP XL")
|
||||
conn = FunkcjeXL.Polaczenie(My.Settings.BazaDst, My.Settings.SerwerDst) 'string połączenia wyznaczony przez API
|
||||
pp = InStr(conn, "SERVER=")
|
||||
conn = Mid(conn, pp)
|
||||
DstConn_str = conn
|
||||
ret = True
|
||||
Else
|
||||
listuj("!! Nie udało się pobrać licencji stanowiskowej ERP XL.")
|
||||
Wyloguj()
|
||||
End If
|
||||
Else
|
||||
listuj("!! Nie udało się zalogować. Proszę uruchomić aplikację ERP XL !!")
|
||||
End If
|
||||
If Not ret Then
|
||||
TcZakladki.SelectedTab = TpList
|
||||
TpList.Select()
|
||||
End If
|
||||
lbUwaga.Text = "Czekaj: pobieranie danych"
|
||||
lbUwaga.Visible = False
|
||||
lbUwaga.Invalidate()
|
||||
Return ret
|
||||
End Function
|
||||
|
||||
'----------------------------------------------------------
|
||||
|
||||
Private Sub CbWewn_CheckedChanged(sender As Object, e As EventArgs) Handles CbWewn.CheckedChanged
|
||||
If CbWewn.Checked Then
|
||||
WewFlag = 1
|
||||
Else
|
||||
WewFlag = 0
|
||||
End If
|
||||
OdswiezDane()
|
||||
End Sub
|
||||
|
||||
Private Sub BtOdswiez_Click(sender As Object, e As EventArgs) Handles BtOdswiez.Click
|
||||
OdswiezDane()
|
||||
End Sub
|
||||
|
||||
Private Sub CbZakup_CheckedChanged(sender As Object, e As EventArgs) Handles CbZakup.CheckedChanged
|
||||
If CbZakup.Checked Then
|
||||
ZakFlag = 1
|
||||
Else
|
||||
ZakFlag = 0
|
||||
End If
|
||||
OdswiezDane()
|
||||
End Sub
|
||||
|
||||
Private Sub edRok_ValueChanged(sender As Object, e As EventArgs) Handles edRok.ValueChanged
|
||||
If IsNumeric(edRok.Value) Then
|
||||
Rok = edRok.Value
|
||||
OdswiezDane()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CbMiesiac_TextChanged(sender As Object, e As EventArgs) Handles CbMiesiac.TextChanged
|
||||
Mies = CbMiesiac.Items.IndexOf(CbMiesiac.Text) + 1
|
||||
OdswiezDane()
|
||||
End Sub
|
||||
|
||||
Private Sub DgvDokumenty_KeyPress(sender As Object, e As KeyPressEventArgs) 'Handles DgvDokumenty.KeyPress
|
||||
Dim wiersz As DataGridViewRow
|
||||
Dim check As Boolean
|
||||
Dim colWybrany, colData, kk As Integer
|
||||
|
||||
Select Case e.KeyChar
|
||||
Case " "
|
||||
kk = 0
|
||||
colWybrany = DgvDokumenty.CurrentRow.Cells("Wybrany").ColumnIndex
|
||||
colData = DgvDokumenty.CurrentRow.Cells("colDataImportu").ColumnIndex
|
||||
For Each wiersz In DgvDokumenty.SelectedRows
|
||||
If wiersz.Cells(colData).Value <= "1990-01-01 00:00:00" Then
|
||||
check = wiersz.Cells(colWybrany).Value
|
||||
wiersz.Cells(colWybrany).Value = Not check
|
||||
If (kk Mod 10) = 0 Then Application.DoEvents()
|
||||
End If
|
||||
kk += 1
|
||||
Next
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub CbSprzedaz_CheckedChanged(sender As Object, e As EventArgs) Handles CbSprzedaz.CheckedChanged
|
||||
If CbSprzedaz.Checked Then
|
||||
SpFlag = 1
|
||||
Else
|
||||
SpFlag = 0
|
||||
End If
|
||||
OdswiezDane()
|
||||
End Sub
|
||||
|
||||
Private Sub DgvDokumenty_RowPostPaint(sender As Object, e As DataGridViewRowPostPaintEventArgs) Handles DgvDokumenty.RowPostPaint
|
||||
If Not DgvDokumenty.Rows(e.RowIndex).Cells("colDataImportu").Value Is DBNull.Value Then
|
||||
If CStr(DgvDokumenty.Rows(e.RowIndex).Cells("colDataImportu").Value) > "1990-01-01" Then DgvDokumenty.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.Red
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtImport_Click(sender As Object, e As EventArgs) Handles BtImport.Click
|
||||
Dim DoImportu As New List(Of DataGridViewRow) 'kopia zaznaczonych do importu dokumentów
|
||||
Dim Aktwiersz As DataGridViewRow
|
||||
Dim AktualnyDokument As String = ""
|
||||
Dim ret, Nr_ZapisuSrc As Integer
|
||||
Dim sql As String
|
||||
|
||||
If DgvDokumenty.Rows.Count > 0 Then
|
||||
If System.Windows.Forms.MessageBox.Show("Czy zaimportować zaznaczone dokumenty ?", "", MessageBoxButtons.YesNo) = DialogResult.No Then
|
||||
Return
|
||||
End If
|
||||
|
||||
DoImportu.Clear()
|
||||
For Each wiersz In DgvDokumenty.SelectedRows 'zrób kopię zaznaczonych na niebiesko dokumentów
|
||||
Dim targetRow = CType(wiersz.Clone(), DataGridViewRow)
|
||||
For Each cell As DataGridViewCell In wiersz.Cells
|
||||
targetRow.Cells(cell.ColumnIndex).Value = cell.Value
|
||||
Next
|
||||
DoImportu.Add(targetRow)
|
||||
Next
|
||||
'zaloguj do XL
|
||||
listuj("Start importu: " + Now)
|
||||
ret = PolaczBaze()
|
||||
If ret Then
|
||||
DgvDokumenty.CurrentCell = DgvDokumenty(0, 0)
|
||||
Aktwiersz = DgvDokumenty.CurrentRow
|
||||
For Each wiersz In DoImportu
|
||||
Aktwiersz = wiersz
|
||||
DgvDokumenty.CurrentCell = DgvDokumenty(0, wiersz.Cells.Item(0).Value - 1) 'pokaż aktualnie przetwarzany wiersz
|
||||
If wiersz.Cells.Item(11).Value <= "1990-01-01 00:00:00" Then 'dekret nie zaimportowany
|
||||
AktualnyDokument = wiersz.Cells.Item(1).Value 'Nowy dekret zbiorczy
|
||||
Nr_ZapisuSrc = wiersz.Cells.Item(9).Value 'Dekret (DZK_GIDNumer) źródłowy
|
||||
If UtworzDekretZbiorczy(AktualnyDokument, wiersz.Cells.Item(4).Value, '"Data Wystawienia"
|
||||
wiersz.Cells.Item(5).Value, '"Data operacji"
|
||||
wiersz.Cells.Item(2).Value, '"Dokument źródłowy"
|
||||
wiersz.Cells.Item(3).Value, '"Opis dekretu"
|
||||
wiersz.Cells.Item(6).Value, '"Suma Ma"
|
||||
wiersz.Cells.Item(7).Value) Then '"Suma Winien"
|
||||
If DodajSkladowy(Nr_ZapisuSrc) Then 'dodaj dekrety składowe
|
||||
ZamknijDekret(True) 'zamknij dekret zbiorczy
|
||||
'oznacz dokument jako zaimportowany
|
||||
sql = "update CDN.Dekrety set DT_DataCentrali = datediff(s,'19900101', GetDate()) where DT_GIDNUmer = " & Str(GIDNumer)
|
||||
SqlCmd(sql, SrcConn_str)
|
||||
AktualnyDokument = ""
|
||||
Else
|
||||
ZamknijDekret(False) 'usuń utworzony dekret zbiorczy
|
||||
AktualnyDokument = ""
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
listuj(CStr(Now) & "-> Dokument: " & wiersz.Cells.Item(2).Value & " już jest zaimportowany !!")
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Tylko_Listing = False
|
||||
OdswiezDane()
|
||||
TcZakladki.SelectedTab = TpList
|
||||
TpList.Select()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtKonfig_Click(sender As Object, e As EventArgs) Handles BtKonfig.Click
|
||||
dlgKonfig.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub Timer_Tick(sender As Object, e As EventArgs) Handles Timer.Tick
|
||||
Dim plik As String
|
||||
|
||||
Timer.Stop()
|
||||
Try
|
||||
plik = My.Settings.FolderR_Roboczy + "\ImportDM-" + Replace(Replace(Replace(Now, ":", "."), "/", "."), " ", "_") + ".LOG"
|
||||
f_out = System.IO.File.CreateText(plik)
|
||||
Tylko_Listing = False
|
||||
Catch
|
||||
Tylko_Listing = True
|
||||
End Try
|
||||
Timer.Enabled = False
|
||||
Application.DoEvents()
|
||||
If My.Settings.SerwerDst > "" And My.Settings.BazaDst > "" Then PolaczBaze()
|
||||
If Zalogowany Then OdswiezDane()
|
||||
End Sub
|
||||
|
||||
Private Sub BtUsunFlage_Click(sender As Object, e As EventArgs) Handles BtUsunFlage.Click
|
||||
If DgvDokumenty.Rows.Count > 0 Then
|
||||
If System.Windows.Forms.MessageBox.Show("Czy usunąć flagę z zaznaczonych dokumentów ?", "", MessageBoxButtons.YesNo) = DialogResult.Yes Then
|
||||
Dim sql As String
|
||||
Dim col As Integer
|
||||
|
||||
col = DgvDokumenty.Columns("colDekret").Index
|
||||
For Each wiersz In DgvDokumenty.SelectedRows
|
||||
sql = "update CDN.Dekrety set DT_DataCentrali = 0 where DT_GIDNUmer = " & Str(wiersz.Cells(col).Value)
|
||||
SqlCmd(sql, SrcConn_str)
|
||||
Next
|
||||
OdswiezDane()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtKoniec_Click(sender As Object, e As EventArgs) Handles BtKoniec.Click
|
||||
Wyloguj()
|
||||
If Not IsNothing(f_out) Then
|
||||
f_out.Flush()
|
||||
f_out.Close()
|
||||
End If
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub OdswiezDane()
|
||||
RM = CInt(CStr(Rok) & IIf(Mies < 10, "0", "") & CStr(Mies))
|
||||
SrcConn_str = zrob_polaczenie(My.Settings.SerwerSrc, My.Settings.BazaSrc, My.Settings.MCsrc, My.Settings.Comsrc)
|
||||
Me.Tamy_ImpDM_Src.Connection.ConnectionString = SrcConn_str
|
||||
Tamy_ImpDM_Dekr.Connection.ConnectionString = SrcConn_str
|
||||
Try
|
||||
lbUwaga.Visible = True
|
||||
lbUwaga.BringToFront()
|
||||
lbUwaga.Refresh()
|
||||
Me.Tamy_ImpDM_Src.Fill(Me.DsMain.Tbmy_ImpDM_Src, SpFlag, ZakFlag, WewFlag, RM, Rok, Mies)
|
||||
lbUwaga.Visible = False
|
||||
lbUwaga.Invalidate()
|
||||
Catch ex As System.Exception
|
||||
lbUwaga.Visible = False
|
||||
lbUwaga.Refresh()
|
||||
System.Windows.Forms.MessageBox.Show(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub MainFrm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Dim spr As String
|
||||
|
||||
SpFlag = 0
|
||||
ZakFlag = 0
|
||||
WewFlag = 0
|
||||
Rok = Year(Now)
|
||||
Mies = Month(Now)
|
||||
spr = Encrypt(Environment.MachineName.ToUpper + Environment.UserName.ToUpper)
|
||||
DecimalSep = NumberFormatInfo.CurrentInfo.NumberDecimalSeparator.ToString
|
||||
DecimalGroupSep = NumberFormatInfo.CurrentInfo.NumberGroupSeparator.ToString
|
||||
If spr <> My.Settings.check Then
|
||||
MsgBox("Niezgodna konfiguracja. Ustaw od nowa")
|
||||
My.Settings.SerwerSrc = ""
|
||||
My.Settings.SerwerDst = ""
|
||||
My.Settings.SerwerKlucza = ""
|
||||
My.Settings.BazaSrc = ""
|
||||
My.Settings.BazaDst = ""
|
||||
My.Settings.FolderR_Roboczy = ""
|
||||
My.Settings.MCsrc = ""
|
||||
My.Settings.MCdst = ""
|
||||
My.Settings.Comsrc = ""
|
||||
My.Settings.Comdst = ""
|
||||
My.Settings.check = spr
|
||||
My.Settings.Save()
|
||||
End If
|
||||
Timer.Start()
|
||||
End Sub
|
||||
|
||||
Public Sub listuj(ByVal linia As String)
|
||||
If linia > "" Then
|
||||
LstWynik.Items.Add(linia)
|
||||
|
||||
If Not Tylko_Listing Then
|
||||
f_out.WriteLine(linia)
|
||||
End If
|
||||
If (LstWynik.Items.Count - 1) > 0 Then
|
||||
LstWynik.TopIndex = Me.LstWynik.Items.Count - 1
|
||||
Else
|
||||
LstWynik.TopIndex = 0
|
||||
End If
|
||||
Application.DoEvents()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function SqlCmd(ByVal sql As String, conn_str As String) As Boolean
|
||||
Dim wynik As Boolean
|
||||
|
||||
wynik = False
|
||||
Try
|
||||
Using connection As New SqlClient.SqlConnection(conn_str)
|
||||
Dim command As New SqlClient.SqlCommand(sql, connection)
|
||||
connection.Open()
|
||||
command.ExecuteNonQuery()
|
||||
wynik = True
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
My.Forms.MainFrm.listuj(ex.Message)
|
||||
End Try
|
||||
Return (wynik)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Reference in new issue
Block a user