Implementierung FOrmbefüllung mit JSON OBjekten und getrennten Datenströmen
This commit is contained in:
@@ -61,8 +61,8 @@
|
||||
<div class="row w-100">
|
||||
<div class="col">
|
||||
<div class="col">
|
||||
<label id="lbl_Umstellungsdatum">Umstellungsdatum:</label>
|
||||
<input id="Text1" readonly="readonly" runat="server" style="width: 68px; margin-left: 0px" value="Text" />
|
||||
<label id="lbl_Umstellungsdatum" runat="server">Umstellungsdatum:</label>
|
||||
<input id="txt_Umstellungsdatum" readonly="readonly" runat="server" style="width: 68px; margin-left: 0px" value="Text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
@@ -98,12 +98,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<row>
|
||||
<label id="lbl_OBIU_Nr">OBIU-ID:</label>
|
||||
<input id="txt_OBIU_ID" readonly="readonly" runat="server" style="width: 318px; margin-left: 20px; font-weight: 400" value="Text" />
|
||||
</row>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="col">
|
||||
<label id="lbl_Vermerk">Vermerk:</label>
|
||||
<input id="txt_Vermerk" readonly="readonly" runat="server" style="width: 170px; height: 70px; margin-left: 98px" aria-multiline="true" value="Text" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label id="lbl_GueltigBis">Gueltig Bis:</label>
|
||||
<input id="GueltigBis" readonly="readonly" runat="server" />
|
||||
<label id="lbl_GueltigBis" runat="server">Gueltig Bis:</label>
|
||||
<input id="txt_GueltigBis" readonly="readonly" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="height: 40px;"></div>
|
||||
@@ -117,16 +129,80 @@
|
||||
</asp:CheckBoxList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<row>
|
||||
<label id="lbl_OBIU_Nr">OBIU-ID:</label>
|
||||
<input id="txt_OBIU_ID" readonly="readonly" runat="server" style="width: 318px; margin-left: 20px; font-weight:400" value="Text" />
|
||||
</row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function getParamValue(paramName) {
|
||||
var url = window.location.search.substring(1); //get rid of "?" in querystring
|
||||
var qArray = url.split('&'); //get key-value pairs
|
||||
for (var i = 0; i < qArray.length; i++) {
|
||||
var pArr = qArray[i].split('='); //split key and value
|
||||
if (pArr[0] == paramName)
|
||||
return pArr[1]; //return value
|
||||
}
|
||||
}
|
||||
var param1 = getParamValue('Kennzeichen');
|
||||
|
||||
$('txt_ClientNr').val(param1);
|
||||
detailtabelle(param1)
|
||||
alert(param1)
|
||||
|
||||
function detailtabelle(id) {
|
||||
// alert("Testdata:" + id)
|
||||
|
||||
let data = {};
|
||||
data['Kennzeichen'] = id;
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "Formtemplate UTA Karte.aspx/filltabledetails",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
async: "true",
|
||||
data: JSON.stringify(data),
|
||||
success: function (data) {
|
||||
//alert(data.d.AaData)
|
||||
result = data.d.AaData;
|
||||
//addheader();
|
||||
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
//let strHTML4 = '<tr><td>878465464634</td><td>DIESEL</td><td>12/05/2026</td><td>151515313521351</td></tr>'
|
||||
//alert('Horray! 200 status code!' + result[i]);
|
||||
// alert(result.rows.length)
|
||||
if (id == result[i]["7"]) {
|
||||
document.getElementById('<%=txt_BestNr.ClientID%>').setAttribute('value', result[i]["0"]);
|
||||
document.getElementById('<%=txt_Umstellungsdatum.ClientID%>').setAttribute('value', result[i]["1"]);
|
||||
document.getElementById('<%=txt_Kategorie.ClientID%>').setAttribute('value', result[i]["2"]);
|
||||
document.getElementById('<%=txt_Vertrabschldat.ClientID%>').setAttribute('value', result[i]["3"]);
|
||||
document.getElementById('<%=txt_Status.ClientID%>').setAttribute('value', result[i]["4"]);
|
||||
document.getElementById('<%=txt_Schadstoffklasse.ClientID%>').setAttribute('value', result[i]["5"]);
|
||||
document.getElementById('<%=txt_OBIU_ID.ClientID%>').setAttribute('value', result[i]["6"]);
|
||||
document.getElementById('<%=txt_Vermerk.ClientID%>').setAttribute('value', result[i]["7"]);
|
||||
document.getElementById('<%=txt_GueltigBis.ClientID%>').setAttribute('value', result[i]["8"]);
|
||||
}
|
||||
}
|
||||
//renderTable(data.d);
|
||||
//alert(strHTML);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
|
||||
}
|
||||
});
|
||||
}
|
||||
function detailtabelle_M(id_M) {
|
||||
// alert("Testdata:" + id)
|
||||
|
||||
let data = {};
|
||||
data['Kennzeichen'] = id;
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user