コード例 #1
0
        private void InitStore2()
        {
            SystemRoleWrapper systemRoleWrapper   = SystemRoleWrapper.FindById(RoleID);
            List <SystemApplicationWrapper> list2 = SystemRoleWrapper.GetRoleAssignedApplications(systemRoleWrapper);

            Store2.DataSource = list2;
            Store2.DataBind();
        }
コード例 #2
0
        protected void storeAssigned_RefreshData(object sender, StoreRefreshDataEventArgs e)
        {
            SystemRoleWrapper systemRoleWrapper           = SystemRoleWrapper.FindById(RoleID);
            List <SystemApplicationWrapper> assignedRoles = SystemRoleWrapper.GetRoleAssignedApplications(systemRoleWrapper);

            storeAssigned.DataSource = assignedRoles;
            storeAssigned.DataBind();
        }
 protected void storeSystemApplication_Refresh(object sender, StoreRefreshDataEventArgs e)
 {
     if (RoleID != 0)
     {
         SystemRoleWrapper role = SystemRoleWrapper.FindById(RoleID);
         List <SystemApplicationWrapper> list = SystemRoleWrapper.GetRoleAssignedApplications(role);
         storeSystemApplication.DataSource = list;
         storeSystemApplication.DataBind();
     }
 }
コード例 #4
0
        private void InitStore1()
        {
            SystemRoleWrapper systemRoleWrapper   = SystemRoleWrapper.FindById(RoleID);
            List <SystemApplicationWrapper> list1 = SystemApplicationWrapper.FindAll();
            List <SystemApplicationWrapper> list2 = SystemRoleWrapper.GetRoleAssignedApplications(systemRoleWrapper);
            List <int> list = new List <int>();

            foreach (SystemApplicationWrapper wrapper in list2)
            {
                list.Add(wrapper.SystemApplicationID);
            }
            IEnumerable <SystemApplicationWrapper> list3 = list1.FindAll(p => !list.Contains(p.SystemApplicationID));

            Store1.DataSource = list3;
            Store1.DataBind();
        }