Пример #1
0
        private void RemoveUserFromFavoritesClick(object sender, EventArgs e)
        {
            byte   itemCompanyID;
            short  itemUserID;
            string itemUserName;

            if (GetUserInfoFromContextMenuClick(sender, out itemCompanyID, out itemUserID, out itemUserName))
            {
                Cursor.Current = Cursors.WaitCursor;

                UserFavoriteFunctions.FavoriteRemove(mCompanyID, mUserID, itemCompanyID, itemUserID);

                // Remove item from Favorites List control for not to need to reload the entire list
                //listiviewFavorites.Items[CS_Constants.KeyStringer + favoriteCompanyID + CS_Constants.KeyDelimiter + favoriteUserID].Remove();

                Cursor.Current = Cursors.Default;
            }
        }
Пример #2
0
        private void AddUserToFavoritesMenuClick(object sender, EventArgs e)
        {
            byte   itemCompanyID;
            short  itemUserID;
            string itemUserName;

            if (GetUserInfoFromContextMenuClick(sender, out itemCompanyID, out itemUserID, out itemUserName))
            {
                Cursor.Current = Cursors.WaitCursor;

                UserFavoriteFunctions.FavoriteAdd(mCompanyID, mUserID, itemCompanyID, itemUserID, mCompanyCount);

                // Add item to Favorites List control for not to need to reload the entire list
                //TODO: UserFavoriteFunctions.FavoriteAddListItem(ref listviewFavorites, favoriteCompanyID, companyAbbreviation, favoriteUserID, userName, companyCount);

                Cursor.Current = Cursors.Default;
            }
        }