public MC.Enumeration GetSiteTotals(MC.EnumerationType interfaceType, int categoryId, int entityTypeId, bool getAll = true) { MC.Enumeration e = CodesManager.GetSiteTotalsAsEnumeration(categoryId, entityTypeId, getAll); e.InterfaceType = interfaceType; e.ShowOtherValue = true; return(e); }
public MC.Enumeration GetCredentialLevel(MC.EnumerationType interfaceType, bool getAll = true) { MC.Enumeration e = CodesManager.GetEnumeration("credentialLevel", getAll); e.InterfaceType = interfaceType; e.ShowOtherValue = true; return(e); }
// public MC.Enumeration GetAudienceLevel(MC.EnumerationType interfaceType, bool getAll = true) { MC.Enumeration e = CodesManager.GetEnumeration(CodesManager.PROPERTY_CATEGORY_AUDIENCE_LEVEL, getAll); e.InterfaceType = interfaceType; e.ShowOtherValue = true; return(e); }
public MC.Enumeration GetAllAgentReverseRoles(MC.EnumerationType interfaceType) { MC.Enumeration e = OrganizationRoleManager.GetAgentToAgentRolesCodes(false); e.InterfaceType = interfaceType; e.ShowOtherValue = true; return(e); }
public static MC.Enumeration MapRatingsListToEnumermation(List <string> input) { //TBD = do we need anything for emumeration, or just items? MC.Enumeration output = new workIT.Models.Common.Enumeration(); if (input == null || input.Count == 0) { return(output); } string ctdlType = ""; string status = ""; foreach (var item in input) { string resource = RegistryServices.GetResourceByUrl(item, ref ctdlType, ref status); var rating = Newtonsoft.Json.JsonConvert.DeserializeObject <RatingEntity>(resource); if (rating != null && (rating.Name != null)) { output.Items.Add(new workIT.Models.Common.EnumeratedItem() { SchemaName = rating.Type ?? "", Name = rating.Name.ToString(), Description = rating.Description.ToString(), URL = rating.CtdlId });; } } return(output); } //
/// <summary> /// Get agent roles for learning opportunities /// </summary> /// <param name="interfaceType"></param> /// <returns></returns> //public MC.Enumeration GetLearningOppAgentRoles( MC.EnumerationType interfaceType ) //{ // MC.Enumeration e = Entity_AgentRelationshipManager.GetCommonPlusQAAgentRoles( false ); // e.InterfaceType = interfaceType; // e.ShowOtherValue = true; // return e; //} public MC.Enumeration GetCommonPlusQAAgentRoles(MC.EnumerationType interfaceType) { MC.Enumeration e = Entity_AgentRelationshipManager.GetCommonPlusQAAgentRoles(false); e.InterfaceType = interfaceType; e.ShowOtherValue = true; return(e); }
public static Enumeration FillEnumeration(Guid parentUid, int categoryId) { Enumeration entity = new ThisEntity(); entity = CodesManager.GetEnumeration(categoryId); entity.Items = new List <EnumeratedItem>(); EnumeratedItem item = new EnumeratedItem(); using (var context = new ViewContext()) { List <EntityProperty_Summary> results = context.EntityProperty_Summary .Where(s => s.EntityUid == parentUid && s.CategoryId == categoryId) .OrderBy(s => s.CategoryId).ThenBy(s => s.SortOrder).ThenBy(s => s.Property) .ToList(); if (results != null && results.Count > 0) { foreach (EntityProperty_Summary prop in results) { item = new EnumeratedItem(); item.Id = prop.PropertyValueId; item.Value = prop.PropertyValueId.ToString(); item.Selected = true; item.Name = prop.Property; item.SchemaName = prop.PropertySchemaName; entity.Items.Add(item); } } } return(entity); }
//GetCurrencies public MC.Enumeration GetCurrencies(MC.EnumerationType interfaceType) { MC.Enumeration e = CodesManager.GetCurrencies(); e.ShowOtherValue = false; e.InterfaceType = interfaceType; return(e); }
// public static MC.Enumeration GetOrganizationIdentifier(MC.EnumerationType interfaceType, bool getAll = true) { MC.Enumeration e = CodesManager.GetEnumeration(CodesManager.PROPERTY_CATEGORY_ORGANIZATION_IDENTIFIERS, getAll); e.ShowOtherValue = true; e.InterfaceType = interfaceType; return(e); }
/// <summary> /// this may get more than actually needed /// </summary> /// <param name="interfaceType"></param> /// <returns></returns> public MC.Enumeration GetCredentialAllAgentRoles(MC.EnumerationType interfaceType) { MC.Enumeration e = OrganizationRoleManager.GetCredentialOrg_AllRoles(false); e.InterfaceType = interfaceType; e.ShowOtherValue = true; return(e); }
public MC.Enumeration GetConnectionTypes(MC.EnumerationType interfaceType, int parentEntityTypeId, bool getAll = true) { MC.Enumeration e = CodesManager.GetConnectionTypes(parentEntityTypeId, getAll); e.ShowOtherValue = false; e.InterfaceType = interfaceType; return(e); }
public MC.Enumeration GetOrganizationType(MC.EnumerationType interfaceType, bool getAll = true) { MC.Enumeration e = CodesManager.GetEnumeration("organizationType", getAll); e.ShowOtherValue = true; e.InterfaceType = interfaceType; return(e); }
public MC.Enumeration GetEntityAgentNONQAActions(MC.EnumerationType interfaceType, int parentEntityTypeId, bool getAll = true, bool isInverseRole = false) { //get roles as entity to org MC.Enumeration e = OrganizationRoleManager.GetOrgEntityToNONQARoleCodes(isInverseRole, parentEntityTypeId, getAll); e.InterfaceType = interfaceType; e.ShowOtherValue = true; return(e); }
public MC.Enumeration GetJurisdictionAssertions(string filter, MC.EnumerationType interfaceType = MC.EnumerationType.MULTI_SELECT, bool showOtherValue = true, bool getAll = true) { MC.Enumeration e = CodesManager.GetJurisdictionAssertions_Filtered(filter); e.InterfaceType = interfaceType; e.ShowOtherValue = showOtherValue; return(e); }
/// <summary> /// Get an MC.Enumeration (by default a checkbox list) by schemaName /// </summary> /// <param name="dataSource"></param /// <param name="interfaceType"></param> /// <param name="showOtherValue">If true, a text box for entering other values will be displayed</param> /// <returns></returns> public MC.Enumeration GetEnumeration(string dataSource, MC.EnumerationType interfaceType = MC.EnumerationType.MULTI_SELECT, bool showOtherValue = false, bool getAll = true) { MC.Enumeration e = CodesManager.GetEnumeration(dataSource, getAll); e.InterfaceType = interfaceType; e.ShowOtherValue = showOtherValue; return(e); }
//public static List<CodeItem> CIPS_Search( int headerId = 0, string keyword = "", int pageNumber = 1, int maxRows = 25 ) //{ // int totalRows = 0; // return CodesManager.CIPS_Search( headerId, keyword, pageNumber, maxRows, ref totalRows ); //} //public static List<CodeItem> CIPS_Autocomplete( int credentialId, int headerId = 0, string keyword = "", int maxRows = 25 ) //{ // return CodesManager.CIPS_Autocomplete( headerId, keyword, maxRows ); //} //public static List<CodeItem> CIPS_Categories() //{ // return CodesManager.CIPS_Categories(); //} /// <summary> /// Get all CIPs groups /// </summary> /// <returns></returns> //public static MC.Enumeration CIPS_Categories_Enumeration() //{ // var data = CodesManager.CIPS_Categories(); // var result = new MC.Enumeration() // { // Id = 23, // Name = "Classification of Instructional Programs (CIP)", // Items = ConvertCodeItemsToEnumeratedItems( data ) // }; // return result; //} public static MC.Enumeration CIPS_CategoriesInUse_Enumeration(int entityTypeId) { //show all until the custom one is fixed //var data1 = CodesManager.CIPS_Categories(); var data = CodesManager.CIPS_CategoriesInUse(entityTypeId); var result = new MC.Enumeration() { Id = 23, Name = "Classification of Instructional Programs (CIP)", Items = ConvertCodeItemsToEnumeratedItems(data) }; return(result); }
//public static List<CodeItem> NAICS_Autocomplete( int credentialId, int headerId = 0, string keyword = "", int maxRows = 25 ) //{ // //need a getAll option for this as well! // return CodesManager.NAICS_Autocomplete( headerId, keyword, maxRows ); //} //public static List<CodeItem> NAICS_Categories() //{ // return CodesManager.NAICS_Categories(); //} /// <summary> /// Get all NAICS groups /// </summary> /// <returns></returns> //public static MC.Enumeration NAICS_Categories_Enumeration() //{ // var data = CodesManager.NAICS_Categories(); // var result = new MC.Enumeration() // { // Id = 10, // Name = "North American Industry Classification System (NAICS)", // Items = ConvertCodeItemsToEnumeratedItems( data ) // }; // return result; //} public static MC.Enumeration NAICS_CategoriesInUse_Enumeration(int entityTypeId) { var data = new List <CodeItem>(); //show all until the custom one is fixed //data = CodesManager.NAICS_Categories() data = CodesManager.NAICS_CategoriesInUse(entityTypeId); var result = new MC.Enumeration() { Id = 10, Name = "North American Industry Classification System (NAICS)", Items = ConvertCodeItemsToEnumeratedItems(data) }; return(result); }
public MC.Enumeration GetEnumerationForRadioButtons(string dataSource, int preselectId = -1, bool getAll = true) { MC.Enumeration e = CodesManager.GetEnumeration(dataSource, getAll); e.InterfaceType = MC.EnumerationType.SINGLE_SELECT; if (preselectId > -1 && e.HasItems()) { int cntr = 0; foreach (MC.EnumeratedItem item in e.Items) { if (cntr == preselectId) { item.Selected = true; break; } cntr++; } } return(e); }
public MC.Enumeration EntityStatisticGetEnumeration(int entityTypeId, MC.EnumerationType interfaceType = MC.EnumerationType.MULTI_SELECT, bool getAll = true) { MC.Enumeration e = CodesManager.GetEntityStatisticsAsEnumeration(entityTypeId, getAll); e.InterfaceType = interfaceType; return(e); }