Exemplo n.º 1
0
        //private OrgAccess[] _orgAccess = null;
        public static Role GetRole(MRole role)
        {
            Role r = new Role();

            r.IsAccessAllOrgs     = role.IsAccessAllOrgs();
            r.IsAdministrator     = role.IsAdministrator();
            r.AD_Client_ID        = role.GetAD_Client_ID();
            r.AD_User_ID          = role.GetAD_User_ID();
            r.UserLevel           = role.GetUserLevel();
            r.IsCanExport         = role.IsCanExport();
            r.IsCanReport         = role.IsCanReport();
            r.IsUseBPRestrictions = role.IsUseBPRestrictions();
            r.IsPersonalAccess    = role.IsPersonalAccess();
            r.Name             = role.GetName();
            r.IsShowPreference = role.IsShowPreference();
            r.PreferenceType   = role.GetPreferenceType();

            r.IsDisplayClient        = role.IsDisplayClient();
            r.IsDisplayOrg           = role.IsDisplayOrg();
            r.IsPersonalLock         = role.IsPersonalLock();
            r.IsOverwritePriceLimit  = role.IsOverwritePriceLimit();
            r.IsOverrideReturnPolicy = role.IsOverrideReturnPolicy();

            r.tableAccessLevel = role.GetTableAccessLevel();
            r.tableName        = role.GetTableNames();
            r.orgAccess        = role.GetOrgAccess();
            r.windowAccess     = role.GetWindowAccess();
            r.formAccess       = role.GetFormAccess();
            r.processAccess    = role.GetProcessAccess();

            r.tableAccess           = TableAccess.Get(role.GetTableAccess());
            r.columnAccess          = ColumnAccess.Get(role.GetColumnAccess());
            r.recordAccess          = RecordAccess.Get(role.GetRecordAccess());
            r.recordDependentAccess = RecordAccess.Get(role.GetRecordDependentAccess());

            r.MaxQueryRecords = role.GetMaxQueryRecords();
            r.IsShowAcct      = role.IsShowAcct();
            r.IsDisableMenu   = role.IsDisableMenu();
            r.HomePage        = role.GetHomePage_ID();

            /* Prepare Pre Setting of Table*/

            r.tableData = TableData.Get();


            return(r);
        }