예제 #1
0
 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));
 }
예제 #2
0
 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));
 }
예제 #3
0
        protected void Application_Error()
        {
            Exception lastException = Server.GetLastError();

            NLogCore.LogAplicationError(lastException.Message);
        }