ajax url Url Action ServerScanARM_Sernum Delete Invoice data JSON stri

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$.ajax(
{
url: '@Url.Action("ServerScanARM_SernumDelete", "Invoice")',
data: JSON.stringify({
"Sernum": Sernum,
"Articul2": Sku,
"oldArticulSernum": oldArticulSernum,
"InvoiceKey": @Model.InvoiceKey,
"CreatedUser": $("#UserId").val()
}),
async: false,
dataType: "html",
type: 'POST',
contentType: "application/json; charset=utf-8",
crossDomain: true,
success: function (res) {
if(res != null && res != "")
{
alert(res);
}
else
{
myGrid.jqGrid('setRowData', selectedRowId, rowData);
if(!$("#ScanedSwovOrHide").is(':checked'))
{
$("#" + selectedRowId,"#ServerScanARM_CompositionTable").css({display:"none"});
}
myGrid.trigger('reloadGrid');
}
},
error: function () {
alert('Ошибка при вызове или заполнении модального окна');
}
});