Beispiel #1
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();
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (X.IsAjaxRequest)
            {
                return;
            }

            chkgApplication.Items.Clear();

            List <SystemApplicationWrapper> apps = SystemApplicationWrapper.FindAll();

            for (int i = 0; i < apps.Count; i++)
            {
                chkgApplication.Items.Add(new Checkbox(false, apps[i].SystemApplicationName));
                //chkgApplication.Items.Add(new Checkbox(new Checkbox.Config(){BoxLabel=apps[i].SystemApplicationName,Value=apps[i].SystemApplicationID.ToString(),Checked=false}));
            }
        }
        protected void storeSystemApplication_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            storeSystemApplication.DataSource = SystemApplicationWrapper.FindAll();

            storeSystemApplication.DataBind();
        }