public async Task <ActionResult> ProgressShow(string[] g) { try { maindirectory.UpdateCampusDatabase(g); } catch (Exception ex) { NLogCore.LogAplicationError(ex.Message); NLogCore.LogAplicationError(ex.StackTrace); Response.StatusCode = 500; return(Json(new { error = ex.Message }, JsonRequestBehavior.AllowGet)); } return(Json("Імпорт даних завершен успішно", JsonRequestBehavior.AllowGet)); }
public JsonResult EmployeeAdd(DataToConvert selectedToConvert) { try { maindirectory.PartialyUpdateCampusDatabase(selectedToConvert); } catch (Exception ex) { NLogCore.LogAplicationError(ex.Message); NLogCore.LogAplicationError(ex.StackTrace); Response.StatusCode = 500; return(Json(new { error = ex.Message }, JsonRequestBehavior.AllowGet)); } return(Json("Імпорт даних завершен успішно", JsonRequestBehavior.AllowGet)); }
protected void Application_Error() { Exception lastException = Server.GetLastError(); NLogCore.LogAplicationError(lastException.Message); }