Пример #1
0
        public async Task EntityGroupDelete(string entityType, string entityGroupId)
        {
            log.LogEverything("Communicator.EntityGroupDelete", "called");
            log.LogVariable("Communicator.EntityGroupDelete", nameof(entityType), entityType);
            log.LogVariable("Communicator.EntityGroupDelete", nameof(entityGroupId), entityGroupId);

            try
            {
                if (entityType == Constants.FieldTypes.EntitySearch)
                {
                    if (await http.EntitySearchGroupDelete(entityGroupId))
                    {
                        return;
                    }
                    else
                    {
                        throw new Exception("EntityGroupDelete failed");
                    }
                }

                if (entityType == Constants.FieldTypes.EntitySelect)
                {
                    if (await http.EntitySelectGroupDelete(entityGroupId))
                    {
                        return;
                    }
                    else
                    {
                        throw new Exception("EntityGroupDelete failed");
                    }
                }

                throw new Exception("entityType:'" + entityType + "' not known");
            }
            catch (Exception ex)
            {
                throw new Exception("EntityGroupDelete failed", ex);
            }
        }
Пример #2
0
        public void EntityGroupDelete(string entityType, string entityGroupId)
        {
            log.LogEverything("Not Specified", t.GetMethodName() + " called");
            log.LogVariable("Not Specified", nameof(entityType), entityType);
            log.LogVariable("Not Specified", nameof(entityGroupId), entityGroupId);

            try
            {
                if (entityType == "EntitySearch")
                {
                    if (http.EntitySearchGroupDelete(entityGroupId))
                    {
                        return;
                    }
                    else
                    {
                        throw new Exception("EntitySearchItemDelete failed");
                    }
                }

                if (entityType == "EntitySelect")
                {
                    if (http.EntitySelectGroupDelete(entityGroupId))
                    {
                        return;
                    }
                    else
                    {
                        throw new Exception("EntitySearchItemDelete failed");
                    }
                }

                throw new Exception("entityType:'" + entityType + "' not known");
            }
            catch (Exception ex)
            {
                throw new Exception("EntityGroupDelete failed", ex);
            }
        }
Пример #3
0
        public void EntityGroupDelete(string entityType, string entityGroupId)
        {
            log.LogEverything(t.GetMethodName("Comminicator"), "called");
            log.LogVariable(t.GetMethodName("Comminicator"), nameof(entityType), entityType);
            log.LogVariable(t.GetMethodName("Comminicator"), nameof(entityGroupId), entityGroupId);

            try
            {
                if (entityType == Constants.FieldTypes.EntitySearch)
                {
                    if (http.EntitySearchGroupDelete(entityGroupId))
                    {
                        return;
                    }
                    else
                    {
                        throw new Exception("EntitySearchItemDelete failed");
                    }
                }

                if (entityType == Constants.FieldTypes.EntitySelect)
                {
                    if (http.EntitySelectGroupDelete(entityGroupId))
                    {
                        return;
                    }
                    else
                    {
                        throw new Exception("EntitySearchItemDelete failed");
                    }
                }

                throw new Exception("entityType:'" + entityType + "' not known");
            }
            catch (Exception ex)
            {
                throw new Exception("EntityGroupDelete failed", ex);
            }
        }