AutoComplete verworfen

This commit is contained in:
ja
2021-11-10 10:02:50 +01:00
parent fd32664516
commit f442d666c6
3 changed files with 52 additions and 284 deletions

View File

@@ -28,10 +28,10 @@
<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"/>
<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/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> <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">
@@ -51,23 +51,23 @@
<br /> <br />
<h3>Here you'll find all Information about your Invoices.</h3> <h3>Here you'll find all Information about your Invoices.</h3>
<%Try <%Try
VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW
'Dim AD As New VERAG_PROG_ALLGEMEIN.cAdressen(799124) 'Dim AD As New VERAG_PROG_ALLGEMEIN.cAdressen(799124)
Dim VERAGSQL = New VERAG_PROG_ALLGEMEIN.SQL Dim VERAGSQL = New VERAG_PROG_ALLGEMEIN.SQL
' MsgBox(VERAGSQL.GetADMINConnectionString()) ' MsgBox(VERAGSQL.GetADMINConnectionString())
'Response.Write(AD.Ordnungsbegriff) 'Response.Write(AD.Ordnungsbegriff)
Dim STANDORT = "SUB" Dim STANDORT = "SUB"
If (Request.QueryString.Count > 0) AndAlso (Request.QueryString("STANDORT") IsNot Nothing) Then If (Request.QueryString.Count > 0) AndAlso (Request.QueryString("STANDORT") IsNot Nothing) Then
Try Try
STANDORT = (Request.QueryString("STANDORT")) STANDORT = (Request.QueryString("STANDORT"))
Catch ex As Exception Catch ex As Exception
STANDORT = "SUB" STANDORT = "SUB"
End Try End Try
End If End If
If True Then If True Then
Dim AVISO_dt As System.Data.DataTable = VERAG_PROG_ALLGEMEIN.cAviso.getAVISO_List(STANDORT) Dim AVISO_dt As System.Data.DataTable = VERAG_PROG_ALLGEMEIN.cAviso.getAVISO_List(STANDORT)
If AVISO_dt IsNot Nothing Then If AVISO_dt IsNot Nothing Then
If True Then 'AVISO.Status <> 1 And AVISO.Status <> 2 Then 'SENDUNGSTABELLE'%> If True Then 'AVISO.Status <> 1 And AVISO.Status <> 2 Then 'SENDUNGSTABELLE'%>
<div class="col-12" style="margin-left:4px"> <div class="col-12" style="margin-left:4px">
<div> <div>
<div style="height:0.936768149882904vh"></div> <div style="height:0.936768149882904vh"></div>
@@ -208,258 +208,14 @@
<asp:Label ID="lbl_status" runat="server" Font-Size="1em" ForeColor="Black" Text=""></asp:Label> <asp:Label ID="lbl_status" runat="server" Font-Size="1em" ForeColor="Black" Text=""></asp:Label>
<% End If <% End If
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
Response.Write(ex.Message & ex.StackTrace) Response.Write(ex.Message & ex.StackTrace)
End Try %> End Try %>
</div> </div>
</div> </div>
</div> </div>
</ContentTemplate></asp:UpdatePanel> </ContentTemplate></asp:UpdatePanel>
<script>
$(document).ready(function() {
BindControls();
BindControls_M();
BindControls2();
BindControls2_M();
BindControls3();
BindControls3_M();
BindControls4();
BindControls4_M();
});
function BindControls() {
$("#txt_LKW").autocomplete({
source: function(request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowLKWs",
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 BindControls_M() {
$("#txt_LKW_M").autocomplete({
source: function (request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowLKWs",
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 BindControls2() {
$("#txt_KdNrAuftrag").autocomplete({
source: function (request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowKdNrAuftrag",
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 BindControls2_M() {
$("#txt_KdNrAuftrag_M").autocomplete({
source: function (request, response) {
$.ajax({
url: "../App_Code/WebService.asmx/ShowKdNrAuftrag",
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 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>
</asp:Content> </asp:Content>

View File

@@ -1,5 +1,7 @@
Imports System.Data Imports System.Data
Imports System.Data.SqlClient
Imports System.Globalization Imports System.Globalization
Imports System.Web.Services
Partial Class Customers_Default3 Partial Class Customers_Default3
Inherits System.Web.UI.Page Inherits System.Web.UI.Page
@@ -41,23 +43,23 @@ Partial Class Customers_Default3
End If End If
DataBind() DataBind()
tbl_Header_row.TableSection = TableRowSection.TableHeader tbl_Header_row.TableSection = TableRowSection.TableHeader
If (Page.IsPostBack And normaltable.EnableViewState = False) Then If (Page.IsPostBack And normaltable.EnableViewState = False) Then
Page.MaintainScrollPositionOnPostBack = True Page.MaintainScrollPositionOnPostBack = True
normaltable.EnableViewState = True normaltable.EnableViewState = True
If valreq_pickdate1.IsValid And valreq_pickdate2.IsValid Then If valreq_pickdate1.IsValid And valreq_pickdate2.IsValid Then
datevon = Date.Parse(pickdate1.Text) datevon = Date.Parse(pickdate1.Text)
datebis = Date.Parse(pickdate2.Text) datebis = Date.Parse(pickdate2.Text)
Else Else
Dim erster = New Date(Now().Year, Now().Month, 1) Dim erster = New Date(Now().Year, Now().Month, 1)
datevon = erster datevon = erster
datebis = Date.Parse(Now.ToShortDateString) datebis = Date.Parse(Now.ToShortDateString)
pickdate1.Text = erster.ToShortDateString() pickdate1.Text = erster.ToShortDateString()
pickdate2.Text = Date.Now.ToShortDateString() pickdate2.Text = Date.Now.ToShortDateString()
End If
End If End If
End If End If
End If
End Sub End Sub
Protected Sub initcells(tr As TableRow, t1 As TableCell, t2 As TableCell, t3 As TableCell, t4 As TableCell, t5 As TableCell, t6 As TableCell, t7 As TableCell, t8 As TableCell, th1 As TableHeaderCell, th2 As TableHeaderCell, th3 As TableHeaderCell, th4 As TableHeaderCell, th5 As TableHeaderCell, th6 As TableHeaderCell, th7 As TableHeaderCell, th8 As TableHeaderCell) Protected Sub initcells(tr As TableRow, t1 As TableCell, t2 As TableCell, t3 As TableCell, t4 As TableCell, t5 As TableCell, t6 As TableCell, t7 As TableCell, t8 As TableCell, th1 As TableHeaderCell, th2 As TableHeaderCell, th3 As TableHeaderCell, th4 As TableHeaderCell, th5 As TableHeaderCell, th6 As TableHeaderCell, th7 As TableHeaderCell, th8 As TableHeaderCell)
@@ -480,7 +482,7 @@ Partial Class Customers_Default3
lbl_status.ForeColor = Drawing.Color.Red lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error in getting Customer-ID from login" lbl_status.Text = VERAG_VARIABLES.geterrornumb + "Error in getting Customer-ID from login"
End If End If
Else Else
VERAG_VARIABLES.seterrorcount(8) VERAG_VARIABLES.seterrorcount(8)
lbl_status.ForeColor = Drawing.Color.Red lbl_status.ForeColor = Drawing.Color.Red
lbl_status.Text = VERAG_VARIABLES.geterrornumb + "The time chosen is newer then today or older than april 2001. Please correct" lbl_status.Text = VERAG_VARIABLES.geterrornumb + "The time chosen is newer then today or older than april 2001. Please correct"

View File

@@ -1 +1,11 @@
<%@ WebService Language="VB" CodeBehind="~/App_Code/WebService.vb" Class="WebService" %> <%@ WebService Language="VB" CodeBehind="~/App_Code/WebService.vb" Class="WebService" %>
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data.SqlClient
<System.Web.Script.Services.ScriptService()>
Public Class WebService
Inherits System.Web.Services.WebService
End Class