public dtoEditAssignment() { TranslatedPermissions = new dtoDisplayPermissions() { Type = PermissionType.none, Value = "" }; }
public static dtoDisplayPermissions Create(long permissions, Boolean inherited, Boolean denyed, Boolean hasMoreItems, String translation) { dtoDisplayPermissions item = new dtoDisplayPermissions(); item.Type = (inherited ? PermissionType.inherited : PermissionType.none) | (denyed ? PermissionType.denyed : PermissionType.allowed) | (permissions == 0 ? PermissionType.nopermissions : PermissionType.none) | (hasMoreItems ? PermissionType.needmoreinfo : PermissionType.none); item.Value = translation; return(item); }
public void SetPermissionsTranslation(String translation) { if (TranslatedPermissions == null) { TranslatedPermissions = new dtoDisplayPermissions(); } TranslatedPermissions.Type = (Inherited ? PermissionType.inherited: PermissionType.none) | (Denyed ? PermissionType.denyed: PermissionType.allowed) | (Permissions == 0 ? PermissionType.nopermissions : PermissionType.none); TranslatedPermissions.Value = translation; }