public List <Comment> GetCommentsByEntity(int entity_key, QIQOEntityType entity_type)
 {
     Log.Info("Accessing CommentBusinessEngine GetCommentsByEntity function");
     return(ExecuteFaultHandledOperation(() =>
     {
         var comments_data = _comment_repo.GetAll(entity_key, (int)entity_type);
         var comments = new List <Comment>();
         foreach (CommentData comment in comments_data)
         {
             comments.Add(_comment_es.Map(comment));
         }
         return comments;
     }));
 }
示例#2
0
        public List <EntityAttribute> GetAttributeByEntity(int entity_key, QIQOEntityType entity_type)
        {
            var attributes = new List <EntityAttribute>();

            return(ExecuteFaultHandledOperation(() =>
            {
                var entity_attribs = _attribute_repo.GetAll(entity_key, (int)entity_type);

                foreach (AttributeData entity_attrib in entity_attribs)
                {
                    attributes.Add(MapAttributeDataToEntityAttribute(entity_attrib));
                }
                return attributes;
            }));
        }
示例#3
0
        public List <Contact> GetContactsByEntity(int entity_key, QIQOEntityType entity_type)
        {
            Log.Info("Accessing CommentBusinessEngine GetCommentsByEntity function");
            return(ExecuteFaultHandledOperation(() =>
            {
                IContactRepository comment_repo = _data_repository_factory.GetDataRepository <IContactRepository>();
                IEnumerable <ContactData> comments_data = comment_repo.GetAll(entity_key, (int)entity_type);
                List <Contact> comments = new List <Contact>();

                foreach (ContactData comment in comments_data)
                {
                    comments.Add(_contact_es.Map(comment));
                }
                return comments;
            }));
        }
示例#4
0
        public List <Address> GetAddressesByEntityID(int entity_key, QIQOEntityType entity_type)
        {
            Log.Info("Accessing AddressBusinessEngine GetAddressByID function");
            return(ExecuteFaultHandledOperation(() =>
            {
                var address_data = _address_repo.GetAll(entity_key, (int)entity_type);
                var addresses = new List <Address>();

                Log.Info("AddressBusinessEngine GetByID function completed");

                foreach (AddressData addr in address_data)
                {
                    var addrss = _addr_es.Map(addr);
                    addrss.AddressTypeData = _address_type_be.GetTypeByKey(addr.AddressTypeKey);
                    addresses.Add(addrss);
                }
                return addresses;
            }));
        }
示例#5
0
        public List <EntityProduct> GetEntityProductsByEntity(int entity_key, QIQOEntityType entity_type)
        {
            return(ExecuteFaultHandledOperation(() =>
            {
                IEntityProductRepository entity_product_repo = _data_repository_factory.GetDataRepository <IEntityProductRepository>();
                IProductRepository product_repo = _data_repository_factory.GetDataRepository <IProductRepository>();
                List <EntityProduct> entity_products = new List <EntityProduct>();

                IEnumerable <EntityProductData> entity_products_data = entity_product_repo.GetAll(entity_key, (int)entity_type);

                foreach (EntityProductData entity_product_data in entity_products_data)
                {
                    ProductData product_data = product_repo.GetByID(entity_product_data.ProductKey);
                    EntityProduct entity_product = Map(entity_product_data, product_data);
                    entity_products.Add(entity_product);
                }
                return entity_products;
            }));
        }
示例#6
0
 private List <Comment> GetComments(int acct_key, QIQOEntityType type)
 {
     return(_comment_be.GetCommentsByEntity(acct_key, type));
 }
示例#7
0
 private List <EntityAttribute> GetAttributes(int acct_key, QIQOEntityType type)
 {
     return(_entity_attribute_be.GetAttributeByEntity(acct_key, type));
 }
示例#8
0
 private List <Address> GetAddresses(int acct_key, QIQOEntityType type)
 {
     return(_address_be.GetAddressesByEntityID(acct_key, type));
 }
 public Task <List <Address> > GetAddressesByEntityAsync(int entity_key, QIQOEntityType entity_type)
 {
     return(channel.GetAddressesByEntityAsync(entity_key, entity_type));
 }
 public List <Address> GetAddressesByEntity(int entity_key, QIQOEntityType entity_type)
 {
     return(channel.GetAddressesByEntity(entity_key, entity_type));
 }
 public Task <List <Address> > GetAddressesByEntityAsync(int entity_key, QIQOEntityType entity_type)
 {
     return(Task.Run(() => GetAddressesByEntity(entity_key, entity_type)));
 }
 public List <Address> GetAddressesByEntity(int entity_key, QIQOEntityType entity_type)
 {
     return(ExecuteHandledOperation(() => { return _addressEntityService.Map(_addressRepository.GetAll(entity_key, (int)entity_type)); }));
 }
        public List <Address> GetAddressesByEntity(int entity_key, QIQOEntityType entity_type)
        {
            IAddressBusinessEngine address_be = _business_engine_factory.GetBusinessEngine <IAddressBusinessEngine>();

            return(address_be.GetAddressesByEntityID(entity_key, entity_type));
        }