public static List <ColumnAccess> Get(MColumnAccess[] colAccess) { List <ColumnAccess> cl = new List <ColumnAccess>(); ColumnAccess ca = null; foreach (MColumnAccess c in colAccess) { ca = new ColumnAccess(); ca.IsExclude = c.IsExclude(); ca.AD_Column_ID = c.GetAD_Column_ID(); ca.AD_Table_ID = c.GetAD_Table_ID(); ca.IsReadOnly = c.IsReadOnly(); cl.Add(ca); } return(cl); }
//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); }