public AjaxResult Get() { var ajaxResult = new AjaxResult(); try { using (StaffBL staffBL = new StaffBL()) { ajaxResult.Data = staffBL.GetAll(); ajaxResult.Success = true; ajaxResult.Message = Resources.Success; } } catch (Exception ex) { ajaxResult.Success = false; ajaxResult.Data = ex; ajaxResult.Message = Resources.Error; } return(ajaxResult); }