SQL Update und Kopie nach Suben für Bestellungen
This commit is contained in:
@@ -120,5 +120,11 @@
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Gastro\Gastro.vbproj">
|
||||
<Project>{16c34998-6fc9-42af-a84e-febe93cce003}</Project>
|
||||
<Name>Gastro</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
12
FTPUpload/Form1.Designer.vb
generated
12
FTPUpload/Form1.Designer.vb
generated
@@ -24,6 +24,7 @@ Partial Class Form1
|
||||
Private Sub InitializeComponent()
|
||||
Me.btnUpload = New System.Windows.Forms.Button()
|
||||
Me.bntUploadAndClose = New System.Windows.Forms.Button()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'btnUpload
|
||||
@@ -44,11 +45,21 @@ Partial Class Form1
|
||||
Me.bntUploadAndClose.Text = "Do it and Close !"
|
||||
Me.bntUploadAndClose.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Location = New System.Drawing.Point(363, 214)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(75, 23)
|
||||
Me.Button1.TabIndex = 2
|
||||
Me.Button1.Text = "Do SQL!"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.bntUploadAndClose)
|
||||
Me.Controls.Add(Me.btnUpload)
|
||||
Me.Name = "Form1"
|
||||
@@ -59,4 +70,5 @@ Partial Class Form1
|
||||
|
||||
Friend WithEvents btnUpload As Button
|
||||
Friend WithEvents bntUploadAndClose As Button
|
||||
Friend WithEvents Button1 As Button
|
||||
End Class
|
||||
|
||||
@@ -121,12 +121,32 @@ Public Class Form1
|
||||
' MsgBox("p")
|
||||
Silent = True
|
||||
bntUploadAndClose.PerformClick()
|
||||
Case "/sql"
|
||||
Silent = True
|
||||
sqlsendinator()
|
||||
End Select
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function sqlsendinator()
|
||||
Gastro.cListe.selectDBConnection("SQLGuide01")
|
||||
Dim sql As New Gastro.cSQL
|
||||
|
||||
Dim Upload2SQLGuide As String = "INSERT INTO [SQLGUIDE01.verag.ost.dmn].[AVISO].dbo.[tblEBMenu]
|
||||
Select * from [192.168.2.17].[Gastro].dbo.[GMenu] as table1
|
||||
WHERE NOT EXISTS (
|
||||
select * from [SQLGUIDE01.verag.ost.dmn].[AVISO].dbo.[tblEBMenu] as table2 WHERE table1.MenuTitel = table2.MenuTitel AND table1.[MenuDateVon] = table2.[MenuDateVon]
|
||||
)
|
||||
"
|
||||
|
||||
sql.SqlQuery(Upload2SQLGuide)
|
||||
|
||||
Close()
|
||||
|
||||
End Function
|
||||
|
||||
Public Function sendMail(subject As String, body As String)
|
||||
Try
|
||||
Dim Smtp_Server As New SmtpClient
|
||||
@@ -152,4 +172,9 @@ Public Class Form1
|
||||
MsgBox(error_t.ToString)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
sqlsendinator()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user