예제 #1
0
 public RolesPresenter(RolesView view)
 {
     this.view = view;
     Roles = modelProxy.RoleDao.GetAll().ToList();
     Permissions = modelProxy.PermissionDao.GetAll().ToList();
     foreach (var role in Roles)
     {
         List<Permission> listPermissions = new List<Permission>();
         foreach (var permission in role.Permissions)
         {
             listPermissions.Add(Permissions.First(x => x.Id == permission.Id));
         }
         role.Permissions = listPermissions;
     }
 }
예제 #2
0
 public RolesPresenter(RolesView view)
 {
     this.view = view;
     Roles = model.GetAll().ToList();
     Permissions = modelPermission.GetAll().ToList();
 }
예제 #3
0
 private void RolesButton_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     var form = new Roles.RolesView();
     form.MdiParent = this;
     form.Show();
 }