Exemple #1
0
        /// <summary>
        /// Loads the data. Intended be invoked only when the program starts
        /// </summary>
        /// <returns>A response object. The response should contain a error message in case of an error.</returns>
        public Response LoadData()
        {
            Response rs = us.LoadData();

            if (rs.ErrorOccured)
            {
                return(rs);
            }
            return(bs.LoadData());
        }
Exemple #2
0
        /// <summary>
        /// Loads the data. Intended be invoked only when the program starts
        /// </summary>
        /// <returns>A response object. The response should contain a error message in case of an error.</returns>
        public Response LoadData()
        {
            Response response;

            try
            {
                userService.LoadData();
                boardService.LoadData();
                log.Info("All existing data was loaded successfully");
                response = new Response();
            }
            catch (ApplicationException e)
            {
                log.Warn(e.Message);
                response = new Response(e.Message);
            }
            catch (Exception e)
            {
                log.Error("Failed to load data", e);
                response = new Response(e.Message);
            }
            return(response);
        }