コード例 #1
0
 public ViewRoles(controlPanel parent)
 {
     InitializeComponent();
     this.parent          = parent;
     dataGrid.IsReadOnly  = true;
     dataGrid.ItemsSource = RoleDAO.getAllRoles();
 }
コード例 #2
0
 public ViewApplications(controlPanel parent)
 {
     InitializeComponent();
     this.parent          = parent;
     dataGrid.IsReadOnly  = true;
     dataGrid.ItemsSource = ApplicationDAO.getAllApplicationRecords();
 }
コード例 #3
0
 public ViewPermissions(controlPanel parent)
 {
     InitializeComponent();
     this.parent          = parent;
     dataGrid.IsReadOnly  = true;
     dataGrid.ItemsSource = PermissionDAO.getAllPermissions();
 }
コード例 #4
0
 public AddPermission(User user, controlPanel parent)
 {
     InitializeComponent();
     apps = Security.DAL.ApplicationDAO.getAllApplicationRecords();
     String[] appsArr = (from app in apps select app.Application_Name).ToArray <String>();
     this.user                 = user;
     this.parent               = parent;
     appComboBox.ItemsSource   = appsArr;
     appComboBox.SelectedIndex = 0;
 }
コード例 #5
0
        public AddRole(User user, controlPanel parent)
        {
            InitializeComponent();
            this.user   = user;
            this.parent = parent;
            apps        = ApplicationDAO.getAllApplicationRecords();

            String [] appNames = (from app in apps select app.Application_Name).ToArray <String>();
            appComboBox.ItemsSource   = appNames;
            appComboBox.SelectedIndex = 0;

            isParentControlPanel         = true;
            edit_btn.Visibility          = System.Windows.Visibility.Hidden;
            isActive_labelv.Visibility   = System.Windows.Visibility.Hidden;
            isActive_combobox.Visibility = System.Windows.Visibility.Hidden;
        }
コード例 #6
0
        public AddUser(User user, controlPanel parent)
        {
            this.user   = user;
            this.parent = parent;
            InitializeComponent();

            isParentControlPanel = true;

            isActive_comboBox.Visibility = System.Windows.Visibility.Hidden;
            isActive_Label.Visibility    = System.Windows.Visibility.Hidden;

            apps           = ApplicationDAO.getAllApplicationRecords();
            availableApps  = (from app in apps select app.Application_Name).ToList <String>();
            selectedApps   = new List <string>();
            roles          = new List <Role>();
            availableRoles = new List <string>();
            selectedRoles  = new List <string>();

            avalaible_applications_list_box.ItemsSource = availableApps;
        }
コード例 #7
0
 public AddApplication(User user, controlPanel window)
 {
     InitializeComponent();
     this.user   = user;
     this.parent = window;
 }