コード例 #1
0
        private void UpdateCategoriesTabOrder()
        {
            UserDataDefinitionsDAO lUserDataDefinitionsDao = new UserDataDefinitionsDAO();

            for (int i = 0; i < userDataExplorerBar.Groups[0].Items.Count; i++)
            {
                UserDataCategory userDataCategory = userDataExplorerBar.Groups[0].Items[i].Tag as UserDataCategory;
                if (userDataCategory != null)
                {
                    userDataCategory.TabOrder = i;
                    lUserDataDefinitionsDao.UserDataCategoryUpdate(userDataCategory);
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Add this User Data Category to the database (or possibly update an existing item)
        /// </summary>
        /// <returns></returns>
        public int Add()
        {
            UserDataDefinitionsDAO lwDataAccess = new UserDataDefinitionsDAO();

            if (CategoryID == 0)
            {
                _categoryID = lwDataAccess.UserDataCategoryAdd(this);
            }
            else
            {
                lwDataAccess.UserDataCategoryUpdate(this);
            }
            return(0);
        }