public PermissionViewModel(UserInformation userInformation, string roleName) { _secRoleObjectPermission = new SEC_ROLE_OBJECT_PERMISSION(); _permissionDet = new PermissionDet(userInformation); Permission = _permissionDet.GetRolePermissionList(roleName); _roleName = roleName; }
public PermissionViewModel(UserInformation userInformation, string roleName) { _secRoleObjectPermission = new SEC_ROLE_OBJECT_PERMISSION(); _permissionDet = new PermissionDet(userInformation); Permission = _permissionDet.GetRolePermissionList(roleName); _roleName = roleName; foreach (SEC_ROLE_OBJECT_PERMISSION perm in Permission) { if (!_permissionDet.IsPrintDisable(perm.OBJECT_NAME)) { perm.PERM_PRINT = false; perm.PERM_VIEW = false; } } //var checkedcnt = Permission.Where(perm => perm.PERM_PRINT == true); //var cnt = Permission.Where(perm => _permissionDet.IsPrintDisable(perm.OBJECT_NAME)); //chkSelectAllPrint.IsChecked = (checkedcnt.Count() == cnt.Count() ? true : false); }