public Dictionary <string, object> CreateUserAlliance(IDbConnection connection, string newAllianceName, AllianceUserDataModel oldCurrentAllianceUser, string currentUserName, IStoreService storeService)
        {
            if (oldCurrentAllianceUser.AllianceId != (int)NpcAllianceId.Confederation)
            {
                throw new Exception(Error.YouInAlliance);
            }

            var name = newAllianceName.ToUpper();

            name.ValidateAllianceName();
            var currentUserId = oldCurrentAllianceUser.UserId;

            var balance = storeService.BalanceCalcResultCc(connection, currentUserId, AllianceHelper.CreatePrice);
            AllianceDataModel newAlliance;

            try
            {
                var existAlliance = GetAllianceNameObj(connection, name);
                if (existAlliance != null)
                {
                    throw new Exception(Error.AllianceNameNotUnic);
                }
                var am = _createAllianceModel(name, currentUserId, currentUserName);
                newAlliance = _createAlliance(connection, am, oldCurrentAllianceUser);
                if (newAlliance.Id == 0)
                {
                    throw new NotImplementedException("unknown");
                }
            }
            catch (Exception e)
            {
                storeService.BalanceGetCc(connection, currentUserId);
                throw new Exception(e.Message, e);
            }
            var newBalance = storeService.AddOrUpdateBalance(connection, balance);
            var result     = new Dictionary <string, object>();

            result["NewBalanceCc"] = newBalance.Quantity;
            result["NewAlliance"]  = newAlliance;
            var password = Guid.NewGuid().ToString();

            result["NewChannel"] = _channelService.CreateAllianceChannel(connection, newAlliance, password);

            return(result);
        }