Skip to content

Conversation

@mtrich
Copy link
Owner

@mtrich mtrich commented Dec 20, 2018

No description provided.

//instantiates Dao
static DAO theDao = new DAO();
//sets itemList to Dao list
static List<Item> itemList = theDao.list();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not make the list a static variable here. the point of the dao is to get you the ilst when needed. since it might change in the database outside of this program.

}
static void ListItems(bool statusChecked, bool checkingSpecific)
{
foreach(Item listedItem in itemList)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of using the static 'itemList' here, i would have gotten a "fresh" list from the dao (theDao.list())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants