private void listBox1_SelectedValueChanged(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         this.CurrentGroup = listBox1.SelectedItem as Group;
         groupPermissions = new GroupPermissionListViewModel(repository, this.CurrentGroup);
         groupPermissionBindingSource.DataSource = groupPermissions.GroupPermissions;
     }
 }
        private void LoadLookups()
        {
            groupbindingSource.DataSource = repository.Groups.GetAll().ToList();
            this.CurrentGroup = groupbindingSource.Current as Group;

            groupPermissions = new GroupPermissionListViewModel(repository, this.CurrentGroup);
            groupPermissionBindingSource.DataSource = groupPermissions.GroupPermissions;
        }