...
updateRecord(state: DataSourceChangedEventArgs): Observable<any> {
return this.http.put(this.customersUrl, state.data, httpOptions);
}
... |
// POST: Sociedad/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit([Bind("IdSociedad,Sigla,Nombre,IdPais")] Sociedad sociedad)
{
if (ModelState.IsValid)
{
await _sociedadAsyncRepository.UpdateAsync(sociedad);
return RedirectToAction(nameof(Index));
}
ViewData["IdPais"] = new SelectList(_paisRepository.ListAll(), "IdPais", "Nombre", sociedad.IdPais);
return View(sociedad);
} |
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit([Bind("IdSociedad,Sigla,Nombre,IdPais")] Sociedad sociedad)
{
if (ModelState.IsValid)
{
await _sociedadAsyncRepository.UpdateAsync(sociedad);
return RedirectToAction(nameof(Index));
}
ViewData["IdPais"] = new SelectList(_paisRepository.ListAll(), "IdPais", "Nombre", sociedad.IdPais);
return sociedad;
} |
function Failure(args){
console.log(args.error);
} |
<ejs-grid #grid='' [dataSource]='data' (actionFailure)='actionFailure($event)'>
....
</ejs-grid>
|
actionFailure(e: any): void {
console.log(e.error)
} |