private void InitStore1()
        {
            SystemUserGroupWrapper   systemUserGroupWrapper = SystemUserGroupWrapper.FindById(UserGroupID);
            List <SystemRoleWrapper> list1 = SystemRoleWrapper.FindAll();                                                //得到所有的角色
            List <string>            list2 = SystemUserGroupWrapper.GetUserGroupAssignedRoleIDs(systemUserGroupWrapper); //得到用户的所有角色编号
            List <SystemRoleWrapper> list3 = list1.FindAll(p => !list2.Contains(p.RoleID.ToString()));

            Store1.DataSource = list3;
            Store1.DataBind();
        }
Exemplo n.º 2
0
        protected void Store1_OnRefreshData(object sender, StoreRefreshDataEventArgs e)
        {
            SystemUserGroupWrapper   systemUserGroupWrapper = SystemUserGroupWrapper.FindById(UserGroupID);
            List <SystemRoleWrapper> list1 = SystemRoleWrapper.FindAll();                                                //得到所有的角色
            List <string>            list2 = SystemUserGroupWrapper.GetUserGroupAssignedRoleIDs(systemUserGroupWrapper); //得到用户的所有角色编号
            List <SystemRoleWrapper> list3 = list1.FindAll(p => !list2.Contains(p.RoleID.ToString()));

            Store1.DataSource = list3;
            Store1.DataBind();
        }
        private void InitStore2()
        {
            SystemUserGroupWrapper   systemUserGroupWrapper = SystemUserGroupWrapper.FindById(UserGroupID);
            List <string>            list2 = SystemUserGroupWrapper.GetUserGroupAssignedRoleIDs(systemUserGroupWrapper);
            List <SystemRoleWrapper> list3 = new List <SystemRoleWrapper>();

            foreach (string s in list2)
            {
                list3.Add(SystemRoleWrapper.FindById(Int32.Parse(s)));
            }
            Store2.DataSource = list3;
            Store2.DataBind();
        }
Exemplo n.º 4
0
        protected void Store2_OnRefreshData(object sender, StoreRefreshDataEventArgs e)
        {
            SystemUserGroupWrapper   systemUserGroupWrapper = SystemUserGroupWrapper.FindById(UserGroupID);
            List <string>            list2 = SystemUserGroupWrapper.GetUserGroupAssignedRoleIDs(systemUserGroupWrapper);
            List <SystemRoleWrapper> list3 = new List <SystemRoleWrapper>();

            foreach (string s in list2)
            {
                list3.Add(SystemRoleWrapper.FindById(Int32.Parse(s)));
            }
            Store2.DataSource = list3;
            Store2.DataBind();
        }