public ViewApplications(controlPanel parent) { InitializeComponent(); this.parent = parent; dataGrid.IsReadOnly = true; dataGrid.ItemsSource = ApplicationDAO.getAllApplicationRecords(); }
public EditUser(User user, controlPanel parent) { InitializeComponent(); this.user = user; this.parent = parent; applications = ApplicationDAO.getAllApplicationRecords(); users = UserDAO.getAllUsers(); user_combobox.ItemsSource = (from u in users select u.LoginID).ToArray <String>(); user_combobox.SelectedIndex = 0; }
public EditRole(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>(); application_combobox.ItemsSource = appNames; application_combobox.SelectedIndex = 0; }
public EditApplication(User user, controlPanel parent) { InitializeComponent(); this.parent = parent; this.user = user; applications = ApplicationDAO.getAllApplicationRecords(); String[] appStrings = (from app in applications select app.Application_Name).ToArray <String>(); String[] active = { "Active", "Disabled" }; application_combobox.ItemsSource = appStrings; isActive_combobox.ItemsSource = active; save_btn.IsEnabled = false; }
public EditPermission(User user, controlPanel parent) { this.user = user; this.parent = parent; InitializeComponent(); applications = ApplicationDAO.getAllApplicationRecords(); permissions = PermissionDAO.getAllPermissions(); String [] permStrings = (from p in permissions select p.Permission_Name).ToArray <String>(); String[] active = { "Active", "Disabled" }; permission_combobox.ItemsSource = permStrings; isActive_combobox.ItemsSource = active; save_btn.IsEnabled = false; }
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; }
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; }