private void UpdateDb(AuthItem root, AuthItemManager aim) { //if (!aim.Exists(root)) { aim.Store(root); } foreach (AuthItem item in root.Children) { UpdateDb(item, aim); } }
private IList <AuthItem> Build() { roots = new List <AuthItem>(); roots.Add(CreateBOAuthItem_Sales()); roots.Add(CreateBOAuthItem_Purchases()); roots.Add(CreateBOAuthItem_Accounts()); roots.Add(CreateBOAuthItem_Inventory()); roots.Add(CreateBOAuthItem_Jobs()); roots.Add(CreateBOAuthItem_Cards()); roots.Add(CreateBOAuthItem_Analysis()); AuthItemManager aim = mAccountant.AuthItemMgr; foreach (AuthItem root in roots) { UpdateDb(root, aim); } return(roots); }