protected override bool ExecuteRemoveParty(Party partyToRemove, bool isUser)
 {
     return(AzureStorageHelper.DeleteEntryAsync <PartyEntity>(
                isUser ? _userPartiesTable : _botPartiesTable,
                PartyEntity.CreatePartitionKey(partyToRemove, isUser ? PartyEntityType.User : PartyEntityType.Bot),
                PartyEntity.CreateRowKey(partyToRemove)).Result);
 }
Exemplo n.º 2
0
        public void Should_Have_Truthy_Equality_Check_When_Empty()
        {
            var actual   = new PartyEntity();
            var expected = new PartyEntity();

            Assert.True(actual.IsEqualTo(expected));
        }
 protected override bool ExecuteRemoveAggregationParty(Party aggregationPartyToRemove)
 {
     return(AzureStorageHelper.DeleteEntryAsync <PartyEntity>(
                _aggregationPartiesTable,
                PartyEntity.CreatePartitionKey(aggregationPartyToRemove, PartyEntityType.Aggregation),
                PartyEntity.CreateRowKey(aggregationPartyToRemove)).Result);
 }
        public PartyEntity Post([FromBody] PartyEntity partyEntity)
        {
            partyService
            .CreateParty(partyEntity);

            return(partyEntity);
        }
        public ManagerResponse <GetShippingMethodsResult, IReadOnlyCollection <ShippingMethod> > GetShippingMethods(
            string shopName,
            Cart cart,
            ShippingOptionType shippingOptionType,
            PartyEntity address,
            List <string> cartLineExternalIdList)
        {
            if (cartLineExternalIdList != null && cartLineExternalIdList.Any <string>())
            {
            }

            CommerceParty commerceParty = null;

            if (address != null)
            {
                commerceParty = this.connectEntityMapper.MapToCommerceParty(address);
            }

            var shippingOption = new ShippingOption {
                ShippingOptionType = shippingOptionType
            };
            var request = new Sitecore.Commerce.Engine.Connect.Services.Shipping.GetShippingMethodsRequest(shippingOption, commerceParty, cart as CommerceCart);
            GetShippingMethodsResult shippingMethods = this.shippingServiceProvider.GetShippingMethods <GetShippingMethodsRequest, GetShippingMethodsResult>(request);

            return(new ManagerResponse <GetShippingMethodsResult, IReadOnlyCollection <ShippingMethod> >(shippingMethods, shippingMethods.ShippingMethods));
        }
Exemplo n.º 6
0
    public static UnityWebRequest UpdatePlayerParty(PartyEntity partyData)
    {
        WWWForm form = new WWWForm();

        form.AddField("partyNumber", partyData.PartyNumber);

        for (int i = 0; i < GameDefineData.NUMBER_OF_PARTY_MEMBER; i++)
        {
            if (partyData.MemberMonsterIds[i] > 0)
            {
                form.AddField(string.Format("position{0}MonsterId", i), partyData.MemberMonsterIds[i]);
                Debug.Log(string.Format("position{0}MonsterId: {1}", i, partyData.MemberMonsterIds[i]));
            }
        }

        Debug.Log(string.Format("UpdatePlayerParty PartyNumber{0}", partyData.PartyNumber));

        var uri = host + APIName.UPDATE_PLAYER_PARTY;

        var request = UnityWebRequest.Post(uri, form);

        request.SetRequestHeader(COOKIE, PlayerPrefs.GetString(COOKIE));

        return(request);
    }
        public override object ExecuteCommand(InCourseRequest inCourseRequest)
        {
            PartyEntity request = new PartyEntity();

            request.IdPartyType             = IdPartyType;
            request.Name                    = Name;
            request.MarketCustomerNumber    = MarketCustomerNumber;
            request.DocumentNumber          = DocumentNumber;
            request.IdLegalPersonality      = IdLegalPersonality;
            request.TaxIdentificationNumber = TaxIdentificationNumber;
            List <int> listParties = GetParents(Parties);

            foreach (int IdFather in listParties)
            {
                var IdPartyTypeFather = (from d in context.Persona where d.IdParty == IdFather select d).FirstOrDefault().IdPartyType;
                if ((IdPartyType == (byte)TipoPersona.CLIENTE && (IdPartyTypeFather == (byte)TipoPersona.NEGOCIADOR || IdPartyTypeFather == (byte)TipoPersona.LIQUIDADOR)) ||
                    (IdPartyType == (byte)TipoPersona.NEGOCIADOR && IdPartyTypeFather == (byte)TipoPersona.LIQUIDADOR))
                {
                    PartyHierarchyEntity father = new PartyHierarchyEntity()
                    {
                        IdPartyFather = IdFather,
                        Party         = request
                    };
                    request.PartyItems.Add(father);
                }
            }
            Message       = (listParties.Count() == request.PartyItems.Count) ? "" : "La nueva persona no pudo ser asociada a algunas de las otras personas.";
            request.Phone = Phone;

            this.AgregarAlContextoParaAlta(request);
            return(ExecutionResult.ReturnInmediatelyAndQueueOthers(new { Ok = true, Message }));
        }
Exemplo n.º 8
0
        public static List <IParty> GetParty(int PartyID, ISearchCriteria searchCriteria)
        {
            string        strExecution = "[fwd].[uspGetParty]";
            List <IParty> lstParty     = new List <IParty>();

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddBigIntegerParam("@PartyId", PartyID);
                oDq.AddVarcharParam("@SchLocAbbr", 3, searchCriteria.LocAbbr);
                oDq.AddVarcharParam("@SchPartyName", 60, searchCriteria.PartyName);
                oDq.AddVarcharParam("@SchShortName", 10, searchCriteria.StringParams[1]);
                oDq.AddIntegerParam("@SchPartyType", Convert.ToInt32(searchCriteria.StringParams[0]));
                oDq.AddVarcharParam("@SortExpression", 50, searchCriteria.SortExpression);
                oDq.AddVarcharParam("@SortDirection", 4, searchCriteria.SortDirection);
                DataSet reader = oDq.GetTables();

                if (reader != null && reader.Tables.Count > 0 && reader.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < reader.Tables[0].Rows.Count; i++)
                    {
                        IParty iParty = new PartyEntity(reader.Tables[0].Rows[i]);
                        lstParty.Add(iParty);
                    }
                }
            }
            return(lstParty);
        }
 protected override bool ExecuteRemovePendingRequest(Party requestorParty)
 {
     return(AzureStorageHelper.DeleteEntryAsync <PartyEntity>(
                _pendingRequestsTable,
                PartyEntity.CreatePartitionKey(requestorParty, PartyEntityType.PendingRequest),
                PartyEntity.CreateRowKey(requestorParty)).Result);
 }
Exemplo n.º 10
0
 public PartyResponse(PartyEntity entity)
 {
     this.Id        = entity.UserId;
     this.Name      = entity.User.Name;
     this.Lastname  = entity.User.Lastname;
     this.DateIn    = entity.DateIn;
     this.Email     = entity.User.Email;
     this.Timestamp = (long)entity.DateIn.ToUniversalTime().Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds;
 }
Exemplo n.º 11
0
        public async Task <PartyEntity> AddPartyAsync(PartyEntity party)
        {
            var cloudTable = await getCloudTable();

            var insertOperation = TableOperation.Insert(party);
            await cloudTable.ExecuteAsync(insertOperation);

            return(party);
        }
Exemplo n.º 12
0
    public override void Initialise(StateManager a_controller)
    {
        PartyEntity party = a_controller.GetComponent <PartyEntity>();

        // Visually update screen
        EventManager.TriggerEvent("PartyUnconscious", new PartyInfo {
            partySlot = party.partySlot
        });
    }
        protected override bool ExecuteRemoveAggregationParty(Party aggregationPartyToRemove)
        {
            var partyEntitiesToRemove = GetPartyEntitiesByPropertyNameAndValue(
                PartitionKey,
                PartyEntity.CreatePartitionKey(aggregationPartyToRemove, PartyEntityType.Aggregation))
                                        .FirstOrDefault();

            return(AzureStorageHelper.DeleteEntry <PartyEntity>(
                       _partiesTable, partyEntitiesToRemove.PartitionKey, partyEntitiesToRemove.RowKey));
        }
        public static PartyEntity GetPersona(int idPersona)
        {
            using (OrdenesContext context = new OrdenesContext())
            {
                PartyEntity persona = (from d in context.Persona
                                       where d.IdParty == idPersona
                                       select d).FirstOrDefault();

                return((persona == null) ? null : persona);
            }
        }
Exemplo n.º 15
0
        public void Should_Have_Truthy_Equality_Check_When_Same()
        {
            var actual = new PartyEntity {
                Name = "Erik", Size = 1
            };
            var expected = new PartyEntity {
                Name = "Erik", Size = 1
            };

            Assert.True(actual.IsEqualTo(expected));
        }
Exemplo n.º 16
0
        public void Should_Not_Have_Truthy_Equality_Check_When_Name_Differs()
        {
            var actual = new PartyEntity {
                Name = "Erik", Size = 1
            };
            var expected = new PartyEntity {
                Name = "John", Size = 1
            };

            Assert.False(actual.IsEqualTo(expected));
        }
        public override object ExecuteCommand(InCourseRequest inCourseRequest)
        {
            var entidad = (from d in context.Persona where d.IdParty == r_id select d);

            ValidateExiste(entidad.Count(), r_id, CodigosMensajes.FE_ACTUALIZA_NO_EXISTE);

            PartyEntity request = entidad.FirstOrDefault();

            request.IdPartyType             = IdPartyType;
            request.Name                    = Name;
            request.MarketCustomerNumber    = MarketCustomerNumber;
            request.DocumentNumber          = DocumentNumber;
            request.IdLegalPersonality      = IdLegalPersonality;
            request.TaxIdentificationNumber = TaxIdentificationNumber;

            /*if (IdTipoPersona == (byte)TipoPersona.CLIENTE && IdEmpresa.HasValue)
             *  request.IdEmpresa = IdEmpresa.Value;
             * else
             *  request.IdEmpresa = null;*/
            List <int> IdParties = GetParents(Parties);
            string     parties   = string.Empty;

            foreach (int IdPartyFather in IdParties)
            {
                var entidades = (from d in context.PartyHierarchyEntities where d.IdPartyHijo == r_id && d.IdPartyFather == IdPartyFather select d).ToList();
                if (entidades.Count() == 0)
                {
                    var padre = (from d in context.Persona where d.IdParty == IdPartyFather select d).FirstOrDefault();
                    if ((IdPartyType == (byte)TipoPersona.CLIENTE && (padre.IdPartyType == (byte)TipoPersona.NEGOCIADOR || padre.IdPartyType == (byte)TipoPersona.LIQUIDADOR)) ||
                        (IdPartyType == (byte)TipoPersona.NEGOCIADOR && padre.IdPartyType == (byte)TipoPersona.LIQUIDADOR))
                    {
                        PartyHierarchyEntity father = new PartyHierarchyEntity()
                        {
                            IdPartyFather = IdPartyFather,
                            Party         = request
                        };
                        this.AgregarAlContextoParaAlta(father);
                    }
                    else
                    {
                        parties += padre.Name + ", ";
                    }
                }
            }
            foreach (PartyHierarchyEntity r in context.PartyHierarchyEntities.Where(p => ((!Parties.Contains(p.IdPartyFather.ToString()) || string.IsNullOrEmpty(Parties)) && p.IdPartyHijo == r_id)))
            {
                context.Remove(r);
                request.PartyItems.Remove(r);
            }
            Message       = (IdParties.Count() == request.PartyItems.Count) ? "" : "No se pudo asociar la persona a algunas de las otras personas seleccionadas: " + parties.Substring(0, parties.Length - 2);
            request.Phone = Phone;

            return(ExecutionResult.ReturnInmediatelyAndQueueOthers(new { Ok = true, Message }));
        }
Exemplo n.º 18
0
        public static bool ExeedsCapacity(this TableEntity tableEntity, PartyEntity partyEntity)
        {
            if (partyEntity == null)
            {
                return(false);
            }

            return(ExeedsCapacity(tableEntity, new List <PartyEntity> {
                partyEntity
            }));
        }
Exemplo n.º 19
0
        public static FixOrdenEntity FixOrden_AccionIngresar(OrdenEntity orden, FixTipoAccionEnum fixAccion,
                                                             PartyEntity persona, MercadoEntity mercado, ProductoEntity producto, MonedaEntity moneda, TipoOrdenEntity tipoOrden, PartyEntity personaEnNombreDe)
        {
            FixOrdenEntity fixOrden = new FixOrdenEntity();

            fixOrden.Accion           = fixAccion;
            fixOrden.NumeroOrdenLocal = orden.IdOrden;
            fixOrden.Mercado          = mercado.Codigo;
            fixOrden.Moneda           = TraducirMoneda(moneda.CodigoISO);
            fixOrden.Producto         = producto.Codigo;
            fixOrden.TipoOferta       = FixTipoEntradaEnum.Offer;

            fixOrden.Cantidad              = orden.Cantidad;
            fixOrden.CantidadMinima        = orden.CantidadMinima;
            fixOrden.Side                  = orden.CompraVenta == "C" ? FixSideOrdenEnum.Buy : FixSideOrdenEnum.Sell;
            fixOrden.FechaVencimientoOrden = orden.FechaVencimiento;
            fixOrden.Rueda                 = orden.Rueda;
            fixOrden.OperoPorTasa          = orden.OperoPorTasa;

            if (orden.PrecioLimite.HasValue)
            {
                fixOrden.TipoOrden = FixTipoOrdenEnum.Limit;
                fixOrden.Precio    = orden.PrecioLimite.Value;
            }
            else
            {
                fixOrden.TipoOrden = FixTipoOrdenEnum.Market;
            }

            if (personaEnNombreDe != null)
            {
                fixOrden.ClienteId  = personaEnNombreDe.TaxIdentificationNumber;
                fixOrden.ClienteRol = FixRolParticipanteEnum.Cliente;
                fixOrden.ClienteNro = personaEnNombreDe.MarketCustomerNumber;
            }

            if (orden.Plazo.HasValue && orden.Plazo.Value > 0)
            {
                fixOrden.TipoPlazoLiquidacionOrden = (PlazoOrdenEnum)orden.Plazo;
                //if (orden.Plazo.Value > (byte)PlazoOrdenEnum.Hr96)
                //{
                //    orden.FechaLiquidacion = CachingManager.Instance.GetFechaLiquidacion(orden.IdProducto,orden.Plazo);
                //}
            }
            fixOrden.TipoDuracionOrden = traducirTipoOrden(tipoOrden);
            if (OrdenesApplication.Instance.ContextoAplicacion.EnviarAgentCode && !string.IsNullOrEmpty(persona.AgentCode))
            {
                fixOrden.AgenteNegociadorId = persona.AgentCode;
            }
            return(fixOrden);
        }
        public Result <ShippingModel> GetShippingMethods(GetShippingArgs getShippingArgs)
        {
            var model  = new ShippingModel();
            var result = new Result <ShippingModel>();

            try
            {
                result.SetResult(model);
                var currentCart = this.CartManager.GetCurrentCart(
                    this.StorefrontContext.ShopName,
                    this.VisitorContext.ContactId);
                if (!currentCart.ServiceProviderResult.Success)
                {
                    result.SetErrors(currentCart.ServiceProviderResult);
                    return(result);
                }

                var         shippingOptionType = ConnectOptionTypeHelper.ToShippingOptionType(getShippingArgs.ShippingPreferenceType);
                PartyEntity address            = null;
                if (getShippingArgs.ShippingAddress != null)
                {
                    address = this.EntityMapper.MapToPartyEntity(getShippingArgs.ShippingAddress);
                }

                var shippingMethods = this.ShippingManager.GetShippingMethods(
                    this.StorefrontContext.ShopName,
                    currentCart.Result,
                    shippingOptionType,
                    address,
                    null);
                if (!currentCart.ServiceProviderResult.Success)
                {
                    result.SetErrors(currentCart.ServiceProviderResult);
                    return(result);
                }

                result.Data.ShippingMethods = new List <ShippingMethodModel>();
                foreach (var shippingMethod in shippingMethods.ServiceProviderResult.ShippingMethods)
                {
                    var shippingModel = this.EntityMapper.MapToShippingMethodModel(shippingMethod);
                    result.Data.ShippingMethods.Add(shippingModel);
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex.Message, ex, this);
                result.SetErrors(nameof(this.GetShippingMethods), ex);
            }

            return(result);
        }
Exemplo n.º 21
0
        public static bool IsDislikedBy(this PartyEntity partyEntity, PartyEntity comparedEntity)
        {
            if (partyEntity.Dislikes == null)
            {
                return(false);
            }

            if (!partyEntity.Dislikes.Contains(comparedEntity))
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 22
0
        public static FixOrdenEntity FixOrden_AccionActualizar(OrdenEntity orden, FixTipoAccionEnum fixAccion,
                                                               PartyEntity persona, MercadoEntity mercado, ProductoEntity producto, MonedaEntity moneda)
        {
            FixOrdenEntity fixOrden = new FixOrdenEntity();

            fixOrden.Accion         = fixAccion;
            fixOrden.Cantidad       = orden.Cantidad;
            fixOrden.CantidadMinima = orden.CantidadMinima;
            fixOrden.Rueda          = orden.Rueda;
            if (orden.PrecioLimite.HasValue)
            {
                fixOrden.Precio = orden.PrecioLimite.Value;
            }

            fixOrden.Side = orden.CompraVenta == "C" ? FixSideOrdenEnum.Buy : FixSideOrdenEnum.Sell;

            fixOrden.NumeroOrdenLocal   = orden.IdOrden;
            fixOrden.Mercado            = mercado.Codigo;
            fixOrden.Moneda             = TraducirMoneda(moneda.CodigoISO);
            fixOrden.Producto           = producto.Codigo;
            fixOrden.NumeroOrdenMercado = orden.NumeroOrdenMercado;

            fixOrden.TipoOferta = FixTipoEntradaEnum.Offer;
            if (orden.PrecioLimite.HasValue)
            {
                fixOrden.TipoOrden = FixTipoOrdenEnum.Limit;
                fixOrden.Precio    = orden.PrecioLimite.Value;
            }
            else
            {
                fixOrden.TipoOrden = FixTipoOrdenEnum.Market;
            }

            if (orden.Plazo.HasValue && orden.Plazo.Value > 0)
            {
                fixOrden.TipoPlazoLiquidacionOrden = (PlazoOrdenEnum)orden.Plazo;
            }
            if (OrdenesApplication.Instance.ContextoAplicacion.EnviarAgentCode && !string.IsNullOrEmpty(persona.AgentCode))
            {
                fixOrden.AgenteNegociadorId = persona.AgentCode;
            }
            fixOrden.TipoDuracionOrden = FixTipoDuracionOrdenEnum.GTC;

            return(fixOrden);
        }
Exemplo n.º 23
0
        public async Task <PartyEntity> AddPartyByImageAsync(IFormFile file, string user)
        {
            var players = await _googleVisionApiRepository.GetPartyMembersAsync(file);

            _validationService.ValidateParty(players, user);

            var party = new PartyEntity()
            {
                PartitionKey = user,
                Player1      = players.ToList().ElementAt(0),
                Player2      = players.ToList().ElementAt(1),
                RowKey       = Guid.NewGuid().ToString(),
                Deleted      = false,
                PartyPlayed  = DateTime.Now
            };

            return(await _partyRepository.AddPartyAsync(party));
        }
Exemplo n.º 24
0
        public static bool IsEqualTo(this PartyEntity partyEntity, PartyEntity comparedEntity)
        {
            if (partyEntity.Equals(comparedEntity))
            {
                return(true);
            }

            if (partyEntity.Name != comparedEntity.Name)
            {
                return(false);
            }

            if (partyEntity.Size != comparedEntity.Size)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 25
0
        public PartyEntity GetPersonaByNroCliente(string nroCliente)
        {
            string      keyCache = KEY_PERSONA_BY_NROCLIENTE + nroCliente;
            PartyEntity persona  = CacheLayer.Get <PartyEntity>(keyCache);

            if (persona == null)
            {
                using (OrdenesContext dbContext = new OrdenesContext())
                {
                    persona =
                        (from d in dbContext.Persona where d.MarketCustomerNumber.Equals(nroCliente) select d).FirstOrDefault();
                }
                if (persona != null)
                {
                    CacheLayer.Add <PartyEntity>(persona, keyCache);
                }
            }
            return(persona);
        }
Exemplo n.º 26
0
        public PartyEntity GetPersonaById(int idPersona)
        {
            string      keyCache = KEY_PERSONA_BY_ID + idPersona;
            PartyEntity persona  = CacheLayer.Get <PartyEntity>(keyCache);

            if (persona == null)
            {
                using (OrdenesContext dbContext = new OrdenesContext())
                {
                    persona =
                        (from d in dbContext.Persona where d.IdParty == idPersona select d).FirstOrDefault();
                }
                if (persona != null)
                {
                    CacheLayer.Add(persona, keyCache);
                }
            }
            return(persona);
        }
Exemplo n.º 27
0
        public PartyEntity GetPersonaByCBU(string CBU)
        {
            string      keyCache = KEY_PERSONA_BY_CBU + CBU;
            PartyEntity persona  = CacheLayer.Get <PartyEntity>(keyCache);

            if (persona == null)
            {
                using (OrdenesContext dbContext = new OrdenesContext())
                {
                    persona =
                        (from d in dbContext.Persona where d.CBU.Equals(CBU) select d).FirstOrDefault();
                }
                if (persona != null)
                {
                    CacheLayer.Add <PartyEntity>(persona, keyCache);
                }
            }
            return(persona);
        }
Exemplo n.º 28
0
        public static MAEUserSession GetByIDSesiones(Guid idSesion)
        {
            SesionEntity se = PersistSessionHelper.Instance.GetSessionById(idSesion);

            if (se != null)
            {
                if (se.MaeUserSession == null)
                {
                    PartyEntity   pe = CachingManager.Instance.GetPersonaById(se.IdPersona);
                    UsuarioEntity us = CachingManager.Instance.GetByIdUsuario(se.IdUsuario);
                    se.MaeUserSession                     = new MAEUserSession();
                    se.MaeUserSession.ID                  = OrdenesApplication.Instance.GetSessionIdForRequest(se.IdSesion.ToString());
                    se.MaeUserSession.InternalId          = se.IdSesion;
                    se.MaeUserSession.IdUsuario           = se.IdUsuario;
                    se.MaeUserSession.Ip                  = se.Ip;
                    se.MaeUserSession.FechaInicio         = se.FechaInicio;
                    se.MaeUserSession.FechaFinalizacion   = se.FechaFinalizacion;
                    se.MaeUserSession.IdAplicacion        = se.IdAplicacion;
                    se.MaeUserSession.UltimaActualizacion = se.UltimaActualizacion;
                    se.MaeUserSession.IdPersona           = se.IdPersona;
                    se.MaeUserSession.IdTipoPersona       = pe.IdPartyType;
                    se.MaeUserSession.UserName            = us.Nombre;
                    //se.MaeUserSession.IdEmpresa = pe.IdEmpresa;
                    se.MaeUserSession.Global       = se.Global;
                    se.MaeUserSession.PrivateKey   = se.PrivateKey;
                    se.MaeUserSession.PublicKey    = se.PublicKey;
                    se.MaeUserSession.ClientPublic = se.ClientPublic;
                    se.MaeUserSession.ClientSecret = se.ClientSecret;
                    se.MaeUserSession.ServerPublic = se.ServerPublic;
                    se.MaeUserSession.ServerSecret = se.ServerSecret;
                    se.MaeUserSession.Nonce        = se.Nonce;
                    se.MaeUserSession.JavascriptAllowedCommands = se.JavascriptAllowedCommands;
                    se.MaeUserSession.PermisosUsuario           = se.PermisosUsuario;
                    se.MaeUserSession.AllowedCommands           = se.AllowedCommands;
                    se.MaeUserSession.ConfiguracionRegional     = se.ConfiguracionRegional;
                    se.MaeUserSession.LoginRealizado            = CachingManager.Instance.GetByIdUsuario(se.IdUsuario).LoginRealizado;
                }
                return(se.MaeUserSession);
            }
            return(null);
        }
Exemplo n.º 29
0
        public PartyEntity GetPadreByIdHijo(int idHijo)
        {
            string      keyCache = KEY_PADRE_BY_ID_HIJO + idHijo;
            PartyEntity persona  = CacheLayer.Get <PartyEntity>(keyCache);

            if (persona == null)
            {
                using (OrdenesContext dbContext = new OrdenesContext())
                {
                    persona = (from p in dbContext.Persona
                               join ph in dbContext.PartyHierarchyEntities on p.IdParty equals ph.IdPartyFather
                               where ph.IdPartyHijo == idHijo
                               select p).FirstOrDefault();
                }
                if (persona != null)
                {
                    CacheLayer.Add(persona, keyCache);
                }
            }
            return(persona);
        }
Exemplo n.º 30
0
    public void UpdatePartyView(PartyEntity entity)
    {
        if (entity == null)
        {
            return;
        }

        for (int i = 0; i < entity.MemberMonsterIds.Count; i++)
        {
            items[i].UpdateItem(MonsterDataManager.Instance.GetMonsterData(entity.MemberMonsterIds[i]));
        }

        partyEntity = entity;

        ResetSelectedItem();

        if (UpdatePartyMemberHandler != null)
        {
            UpdatePartyMemberHandler();
        }
    }