diff --git a/App_Code/WebService.vb b/App_Code/WebService.vb new file mode 100644 index 0000000..ea66b4d --- /dev/null +++ b/App_Code/WebService.vb @@ -0,0 +1,42 @@ +Imports System.Data.SqlClient +Imports System.Web +Imports System.Web.Services +Imports System.Web.Services.Protocols + +' Wenn der Aufruf dieses Webdiensts aus einem Skript zulässig sein soll, heben Sie mithilfe von ASP.NET AJAX die Kommentarmarkierung für die folgende Zeile auf. +' _ + _ + _ + _ +Public Class WebService + Inherits System.Web.Services.WebService + + + Public Function Show(ByVal sLookUP As String) As List(Of String) + Dim lstCountries As New List(Of String)() + Dim Connectionstring As String = String.Empty + + If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then + 'ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=sa;Pwd=BmWr501956" + Connectionstring = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;" + Else + Connectionstring = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;" + 'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;" + End If + + Dim myConn As New SqlConnection(Connectionstring) + Dim objComm As New SqlCommand("SELECT LKW Kennzeichen FROM FROM [VERAG_HOMEPAGE].[dbo].[Rechnungsausgang] " & + "WHERE Kennzeichen LIKE '%'+@LookUP+'%' ORDER BY Kennzeichen", myConn) + myConn.Open() + + objComm.Parameters.AddWithValue("@LookUP", sLookUP) + Dim reader As SqlDataReader = objComm.ExecuteReader() + + While reader.Read() + lstCountries.Add(reader("Kennzeichen").ToString()) + End While + + myConn.Close() : Return lstCountries + End Function + +End Class \ No newline at end of file diff --git a/Customers/CustomsAviso.aspx b/Customers/CustomsAviso.aspx index a335889..8de2010 100644 --- a/Customers/CustomsAviso.aspx +++ b/Customers/CustomsAviso.aspx @@ -117,7 +117,7 @@ <%Dim erster = New Date(Now().Year, Now().Month, 1) %> - + @@ -125,7 +125,7 @@ <%Dim jetzt = DateTime.Now.Date %> - +

@@ -150,19 +150,43 @@
- - + + + + - +
- + - +
@@ -173,22 +197,22 @@
- +
- +
- +
- +
diff --git a/Customers/CustomsAviso.aspx.vb b/Customers/CustomsAviso.aspx.vb index a35b85f..b12e96c 100644 --- a/Customers/CustomsAviso.aspx.vb +++ b/Customers/CustomsAviso.aspx.vb @@ -908,4 +908,7 @@ Partial Class CustomsAviso Protected Sub txt_KdNrAuftrag_M_TextChanged(sender As Object, e As EventArgs) regval_txt_KdNrAuftrag_M.Validate() End Sub + + + End Class \ No newline at end of file diff --git a/Customers/Invoices.aspx b/Customers/Invoices.aspx index d3ce656..0ae1a1d 100644 --- a/Customers/Invoices.aspx +++ b/Customers/Invoices.aspx @@ -33,7 +33,6 @@ -
@@ -212,6 +211,6 @@
- + diff --git a/WebService.asmx b/WebService.asmx new file mode 100644 index 0000000..5b49085 --- /dev/null +++ b/WebService.asmx @@ -0,0 +1 @@ +<%@ WebService Language="VB" CodeBehind="~/App_Code/WebService.vb" Class="WebService" %>