public int Insert(ref string errMessage, DefaultCardOut defaultCardOut) { Database db = DatabaseFactory.CreateDatabase(); errMessage = ""; try { return(DefaultCardOutDataAccess.Insert(db, defaultCardOut)); } catch (Exception ex) { errMessage = ex.Message + ex.StackTrace; logger.Error("Error Message:" + ex.Message + " Trace:" + ex.StackTrace); return(-1); } }