Код: Выделить всё
$(document).on('click', '.openFormData', function () {
//debugger;
var dataId = $(this).attr("data-id");
$.ajax({
url: '/User/OpenUserData',
type: 'GET',
data: { 'id': dataId },
dataType: 'html',
success: function (data) {
$('#main').html(data);
},
error: function (e, v) {
console.log('Error occurred:', e);
alert('Error occurred: ', e.status + ': ' + e.statusText);
}
});
});
Код: Выделить всё
public async Task[i] OpenUserData(Guid id)
{
CreateUpdateUserRequest request = new CreateUpdateUserRequest();
if (id != Guid.Empty)
{
var route = "GetUserDetailsByUserId?UserId=" + id;
var response = await DataHelper.Execute(route, OperationTypes.GET, null);
if (response != null && response.Data != null)
{
request = response.Data;
}
}
return View("UserInformation", request);
}
Код: Выделить всё
Код: Выделить всё
$("#addNewUser").click(function (e) {
//debugger;
const table = $('#add-data').DataTable();
var newRow = [
`[i][/i]`,
'value'
];
table.row.add(newRow).draw(false);
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... -net-c-sha
Мобильная версия