public bool EntityGroupUpdate(string entityType, string name, int id, string entityGroupMUId)
        {
            log.LogEverything("Not Specified", t.GetMethodName() + " called");
            log.LogVariable("Not Specified", nameof(entityType), entityType);
            log.LogVariable("Not Specified", nameof(name), name);
            log.LogVariable("Not Specified", nameof(id), id);
            log.LogVariable("Not Specified", nameof(entityGroupMUId), entityGroupMUId);

            try
            {
                if (entityType == "EntitySearch")
                {
                    if (http.EntitySearchGroupUpdate(id, name, entityGroupMUId))
                    {
                        return(true);
                    }
                    else
                    {
                        throw new Exception("EntityGroupUpdate failed");
                    }
                }

                if (entityType == "EntitySelect")
                {
                    if (http.EntitySelectGroupUpdate(id, name, entityGroupMUId))
                    {
                        return(true);
                    }
                    else
                    {
                        throw new Exception("EntityGroupUpdate failed");
                    }
                }

                throw new Exception("entityType:'" + entityType + "' not known");
            }
            catch (Exception ex)
            {
                throw new Exception("EntityGroupDelete failed", ex);
            }
        }
Exemple #2
0
        public async Task <bool> EntityGroupUpdate(string entityType, string name, int id, string entityGroupMUId)
        {
            log.LogEverything("Communicator.EntityGroupUpdate", "called");
            log.LogVariable("Communicator.EntityGroupUpdate", nameof(entityType), entityType);
            log.LogVariable("Communicator.EntityGroupUpdate", nameof(name), name);
            log.LogVariable("Communicator.EntityGroupUpdate", nameof(id), id);
            log.LogVariable("Communicator.EntityGroupUpdate", nameof(entityGroupMUId), entityGroupMUId);

            try
            {
                if (entityType == Constants.FieldTypes.EntitySearch)
                {
                    if (await http.EntitySearchGroupUpdate(id, name, entityGroupMUId))
                    {
                        return(true);
                    }
                    else
                    {
                        throw new Exception("EntityGroupUpdate failed");
                    }
                }

                if (entityType == Constants.FieldTypes.EntitySelect)
                {
                    if (await http.EntitySelectGroupUpdate(id, name, entityGroupMUId))
                    {
                        return(true);
                    }
                    else
                    {
                        throw new Exception("EntityGroupUpdate failed");
                    }
                }

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