Example #1
0
 // the following code connects with the SelectAll function in the DataAccess logic through the BusinessLogic
 private List <OwnersEntity> ListAllOwners()
 {
     try
     {
         using (var owners = new OwnersBusiness())
         {
             return(owners.SelectAllOwners());
         }
     }
     catch (Exception ex)
     {
         //Log exception error
         _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true);
     }
     return(null);
 }
Example #2
0
        private List <OwnersEntity> SelectAll()
        {
            try
            {
                using (var owners = new OwnersBusiness())
                {
                    return(owners.SelectAllOwners());
                }
            }
            catch (Exception ex)
            {
                //Log exception error
                _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true);

                MessageBox.Show("UserInterface:OwnersForm::SelectAll::Error occured." +
                                Environment.NewLine + ex.Message, "Error", MessageBoxButtons.OK);
            }
            return(null);
        }