Exemple #1
0
        public StoreRole getStoreRole(Store store, SubscribedUser user)
        {
            foreach (StoreRole st in storeRole)
            {
                Store          s = st.getStore();
                SubscribedUser u = st.getUser();
                if (store.Equals(s) && user.Equals(u))
                {
                    return(st);
                }
            }

            return(null);
        }
Exemple #2
0
        //public void removeStoreRole(Store store, SubscribedUser user)
        //{
        //    StoreRole sr = getStoreRole(store, user);
        //    if (sr != null)
        //        storeRole.Remove(sr);

        //}

        public StoreRole getStoreRole(Store store, SubscribedUser user)
        {
            initStoresAndRolesForUserName(user.getUsername());
            foreach (StoreRole st in storeRole)
            {
                Store          s = st.getStore();
                SubscribedUser u = st.getUser();
                if (store.Equals(s) && user.Equals(u))
                {
                    return(st);
                }
            }

            return(null);
        }