示例#1
0
        public static ThisEntity GetByCtid(string ctid)
        {
            ThisEntity entity = new ThisEntity();

            if (string.IsNullOrWhiteSpace(ctid))
            {
                return(entity);
            }

            return(EntityMgr.GetByCtid(ctid));
        }
示例#2
0
        public bool Import(ThisEntity entity, ref SaveStatus status)
        {
            bool isValid = new EntityMgr().Save(entity, ref status);

            if (entity.Id > 0)
            {
                //update cache
                new CacheManager().PopulateEntityRelatedCaches(entity.RowId);

                //TODO - will need to update related elastic indices
                new SearchPendingReindexManager().Add(CodesManager.ENTITY_TYPE_ORGANIZATION, entity.OrganizationId, 1, ref messages);
            }

            return(isValid);
        }
 //
 public static MicroProfile ConvertCostManifestToMicroProfile(MC.CostManifest item)
 {
     return(new MicroProfile()
     {
         Id = item.Id,
         RowId = item.RowId,
         Name = item.Name,
         Heading2 = "",
         Description = item.Description,
         Selectors = new Dictionary <string, object>()
         {
             { "RowId", item.RowId },
             { "Id", item.Id },
             { "Name", item.Name },
             { "TypeName", item.GetType().Name }
         }
     });
 }