Testcommit

This commit is contained in:
ja
2021-11-10 08:29:21 +01:00
parent 301cb1e0f4
commit fd32664516
3 changed files with 256 additions and 20 deletions

View File

@@ -18,22 +18,22 @@ Public Class WebService
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then 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=sa;Pwd=BmWr501956"
Connectionstring = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;" Connectionstring = "Server=DEVELOPER\DEVSQL;Database=VERAG;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
Else Else
Connectionstring = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;" Connectionstring = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;" 'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
End If End If
Dim myConn As New SqlConnection(Connectionstring) Dim myConn As New SqlConnection(Connectionstring)
Dim objComm As New SqlCommand("SELECT LKW Kennzeichen FROM FROM [VERAG_HOMEPAGE].[dbo].[Rechnungsausgang] " & Dim objComm As New SqlCommand("SELECT 'LKW Kennzeichen' FROM [VERAG].[dbo].[Rechnungsausgang] " &
"WHERE Kennzeichen LIKE '%'+@LookUP+'%' ORDER BY Kennzeichen", myConn) "WHERE 'LKW Kennzeichen' LIKE '%'+@LookUP+'%' ORDER BY 'LKW Kennzeichen' ASC", myConn)
myConn.Open() myConn.Open()
objComm.Parameters.AddWithValue("@LookUP", sLookUP) objComm.Parameters.AddWithValue("@LookUP", sLookUP)
Dim reader As SqlDataReader = objComm.ExecuteReader() Dim reader As SqlDataReader = objComm.ExecuteReader()
While reader.Read() While reader.Read()
lstCountries.Add(reader("Kennzeichen").ToString()) lstCountries.Add(reader("LKW Kennzeichen").ToString())
End While End While
myConn.Close() : Return lstCountries myConn.Close() : Return lstCountries
@@ -46,25 +46,108 @@ Public Class WebService
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then 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=sa;Pwd=BmWr501956"
Connectionstring = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;" Connectionstring = "Server=DEVELOPER\DEVSQL;Database=VERAG;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
Else Else
Connectionstring = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;" Connectionstring = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;" 'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
End If End If
Dim myConn As New SqlConnection(Connectionstring) Dim myConn As New SqlConnection(Connectionstring)
Dim objComm As New SqlCommand("SELECT LKW Kennzeichen FROM FROM [VERAG_HOMEPAGE].[dbo].[Rechnungsausgang] " & Dim objComm As New SqlCommand("SELECT AbsenderKundenNr FROM [VERAG].[dbo].[Rechnungsausgang] " &
"WHERE AbsenderKundenNr LIKE '%'+@LookUP+'%' ORDER BY Kennzeichen", myConn) "WHERE AbsenderKundenNr LIKE '%'+@LookUP+'%' ORDER BY AbsenderKundenNr ASC", myConn)
myConn.Open() myConn.Open()
objComm.Parameters.AddWithValue("@LookUP", sLookUP) objComm.Parameters.AddWithValue("@LookUP", sLookUP)
Dim reader As SqlDataReader = objComm.ExecuteReader() Dim reader As SqlDataReader = objComm.ExecuteReader()
While reader.Read() While reader.Read()
lstCountries.Add(reader("Kennzeichen").ToString()) lstCountries.Add(reader("AbsenderKundenNr").ToString())
End While End While
myConn.Close() : Return lstCountries myConn.Close() : Return lstCountries
End Function End Function
<WebMethod()>
Public Function ShowAbsender(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;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
Else
Connectionstring = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG;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 'AbsenderName 1' FROM [VERAG].[dbo].[Rechnungsausgang] " &
"WHERE 'AbsenderName 1' LIKE '%'+@LookUP+'%' ORDER BY [AbsenderName 1] ASC", myConn)
myConn.Open()
objComm.Parameters.AddWithValue("@LookUP", sLookUP)
Dim reader As SqlDataReader = objComm.ExecuteReader()
While reader.Read()
lstCountries.Add(reader("AbsenderName 1").ToString())
End While
myConn.Close() : Return lstCountries
End Function
<WebMethod()>
Public Function ShowEmpfaenger(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;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
Else
Connectionstring = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG;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 'EmpfängerName 1' FROM [VERAG].[dbo].[Rechnungsausgang] " &
"WHERE 'EmpfängerName 1' LIKE '%'+@LookUP+'%' ORDER BY [EmpfängerName 1] ASC", myConn)
myConn.Open()
objComm.Parameters.AddWithValue("@LookUP", sLookUP)
Dim reader As SqlDataReader = objComm.ExecuteReader()
While reader.Read()
lstCountries.Add(reader("EmpfängerName 1").ToString())
End While
myConn.Close() : Return lstCountries
End Function
<WebMethod()>
Public Function ShowRENr(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;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
Else
Connectionstring = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG;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 RechnungsNr FROM [VERAG].[dbo].[Rechnungsausgang] " &
"WHERE RechnungsNr LIKE '%'+@LookUP+'%' ORDER BY RechnungsNr", myConn)
myConn.Open()
objComm.Parameters.AddWithValue("@LookUP", sLookUP)
Dim reader As SqlDataReader = objComm.ExecuteReader()
While reader.Read()
lstCountries.Add(reader("RechnungsNr").ToString())
End While
myConn.Close() : Return lstCountries
End Function
End Class End Class

View File

@@ -27,6 +27,11 @@
<link rel="stylesheet" type="text/css" href="../css/Customers/MasterpageCustomers.css"/> <link rel="stylesheet" type="text/css" href="../css/Customers/MasterpageCustomers.css"/>
<link rel="stylesheet" type="text/css" href="../css/navbarsidebar2.css"/> <link rel="stylesheet" type="text/css" href="../css/navbarsidebar2.css"/>
<link rel="stylesheet" type="text/css" href="../css/Customers/Invoices.css"/> <link rel="stylesheet" type="text/css" href="../css/Customers/Invoices.css"/>
<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
@@ -212,19 +217,24 @@
</div> </div>
</div> </div>
</ContentTemplate></asp:UpdatePanel> </ContentTemplate></asp:UpdatePanel>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
BindControls(); BindControls();
BindControls_M(); BindControls_M();
BindControls2(); BindControls2();
BindControls2_M(); BindControls2_M();
BindControls3();
BindControls3_M();
BindControls4();
BindControls4_M();
}); });
function BindControls() { function BindControls() {
$("#txt_LKW").autocomplete({ $("#txt_LKW").autocomplete({
source: function(request, response) { source: function(request, response) {
$.ajax({ $.ajax({
url: "WebService.asmx/ShowLKWs", url: "../App_Code/WebService.asmx/ShowLKWs",
data: "{ 'sLookUP': '" + request.term + "' }", data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json", dataType: "json",
type: "POST", type: "POST",
@@ -247,7 +257,7 @@
$("#txt_LKW_M").autocomplete({ $("#txt_LKW_M").autocomplete({
source: function (request, response) { source: function (request, response) {
$.ajax({ $.ajax({
url: "WebService.asmx/ShowLKWs", url: "../App_Code/WebService.asmx/ShowLKWs",
data: "{ 'sLookUP': '" + request.term + "' }", data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json", dataType: "json",
type: "POST", type: "POST",
@@ -271,7 +281,7 @@
$("#txt_KdNrAuftrag").autocomplete({ $("#txt_KdNrAuftrag").autocomplete({
source: function (request, response) { source: function (request, response) {
$.ajax({ $.ajax({
url: "WebService.asmx/ShowLKWs", url: "../App_Code/WebService.asmx/ShowKdNrAuftrag",
data: "{ 'sLookUP': '" + request.term + "' }", data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json", dataType: "json",
type: "POST", type: "POST",
@@ -287,14 +297,14 @@
} }
}); });
}, },
minLength: 3 // MINIMUM 1 CHARACTER TO START WITH. minLength: 1 // MINIMUM 1 CHARACTER TO START WITH.
}); });
} }
function BindControls2() { function BindControls2_M() {
$("#txt_KdNrAuftrag_M").autocomplete({ $("#txt_KdNrAuftrag_M").autocomplete({
source: function (request, response) { source: function (request, response) {
$.ajax({ $.ajax({
url: "WebService.asmx/ShowLKWs", url: "../App_Code/WebService.asmx/ShowKdNrAuftrag",
data: "{ 'sLookUP': '" + request.term + "' }", data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json", dataType: "json",
type: "POST", type: "POST",
@@ -310,7 +320,144 @@
} }
}); });
}, },
minLength: 3 // MINIMUM 3 CHARACTER TO START WITH. minLength: 1 // MINIMUM 3 CHARACTER TO START WITH.
});
}
function BindControls3() {
$("#txt_Absender").autocomplete({
source: function (request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowAbsender",
data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
dataFilter: function (data) { return data; },
success: function (data) {
response($.map(data.d, function (item) {
return { value: item }
}))
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
},
minLength: 1 // MINIMUM 1 CHARACTER TO START WITH.
});
}
function BindControls3_M() {
$("#txt_Absender_M").autocomplete({
source: function (request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowAbsender",
data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
dataFilter: function (data) { return data; },
success: function (data) {
response($.map(data.d, function (item) {
return { value: item }
}))
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
},
minLength: 1 // MINIMUM 3 CHARACTER TO START WITH.
});
}
function BindControls4() {
$("<%=txt_Empfaenger.ClientID%>").autocomplete({
source: function (request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowEmpfaenger",
data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
dataFilter: function (data) { return data; },
success: function (data) {
response($.map(data.d, function (item) {
return { value: item }
}))
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
},
minLength: 1 // MINIMUM 1 CHARACTER TO START WITH.
});
}
function BindControls4_M() {
$("<%=txt_Empfaenger_M.ClientID%>").autocomplete({
source: function (request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowEmpfaenger",
data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
dataFilter: function (data) { return data; },
success: function (data) {
response($.map(data.d, function (item) {
return { value: item }
}))
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
},
minLength: 1 // MINIMUM 1 CHARACTER TO START WITH.
});
}function BindControls5() {
$("<%=txt_ReNr.ClientID%>").autocomplete({
source: function (request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowRENr",
data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
dataFilter: function (data) { return data; },
success: function (data) {
response($.map(data.d, function (item) {
return { value: item }
}))
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
},
minLength: 1 // MINIMUM 1 CHARACTER TO START WITH.
});
}
function BindControls5_M() {
$("<%=txt_ReNr_M.ClientID%>").autocomplete({
source: function (request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowRENr",
data: "{ 'sLookUP': '" + request.term + "' }",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
dataFilter: function (data) { return data; },
success: function (data) {
response($.map(data.d, function (item) {
return { value: item }
}))
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
},
minLength: 1 // MINIMUM 3 CHARACTER TO START WITH.
}); });
} }
</script> </script>

View File

@@ -24,6 +24,12 @@
</system.Web> </system.Web>
--> -->
<system.web> <system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
<authentication mode="Forms"> <authentication mode="Forms">
<forms defaultUrl="/Customers/Welcome.aspx" loginUrl="login/Login_FLEX.aspx" slidingExpiration="true" timeout="2880" /> <forms defaultUrl="/Customers/Welcome.aspx" loginUrl="login/Login_FLEX.aspx" slidingExpiration="true" timeout="2880" />
</authentication> </authentication>