Example #1
0
        internal bool Parse_configurationInfo_getManufacturer(s2sMessage target, DLManufacturerCollectionDto collection)
        {
            ModuleProc PROC   = new ModuleProc(this.DYN_MODULE_NAME, "Parse_configurationInfo_getManufacturer");
            bool       result = default(bool);

            try
            {
                configurationInfo ci = target.p_body.p_configuration.p_configurationInfo;
                if (collection != null)
                {
                    List <manufacturer> manufacturers = new List <manufacturer>();
                    foreach (var dto in collection)
                    {
                        manufacturers.Add(new manufacturer()
                        {
                            manufacturerId     = dto.ManufacturerId.ToString(),
                            manufacturerName   = dto.ManufacturerName,
                            manufacturerValue  = dto.ManufacturerValue,
                            manufacturerActive = dto.IsActive,
                        });
                    }
                    ci.manufacturer = manufacturers.ToArray();
                    result          = true;
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return(result);
        }
        internal bool Parse_configurationInfo_getSite(s2sMessage target, DLSiteCollectionDto collection)
        {
            ModuleProc PROC   = new ModuleProc(this.DYN_MODULE_NAME, "Parse_getConfiguration");
            bool       result = default(bool);

            try
            {
                configurationInfo ci = target.p_body.p_configuration.p_configurationInfo;
                if (collection != null)
                {
                    List <casino> Casinos = new List <casino>();
                    foreach (var dto in collection)
                    {
                        Casinos.Add(new casino()
                        {
                            casinoId     = dto.SiteId,
                            casinoName   = dto.SiteName,
                            casinoActive = dto.IsActive
                        });
                    }
                    ci.casino = Casinos.ToArray();
                    result    = true;
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return(result);
        }
        internal bool Parse_configurationInfo_getGame(s2sMessage target, DLGameCollectionDto collection)
        {
            ModuleProc PROC   = new ModuleProc(this.DYN_MODULE_NAME, "Parse_configurationInfo_getGame");
            bool       result = default(bool);

            try
            {
                configurationInfo ci = target.p_body.p_configuration.p_configurationInfo;
                if (collection != null)
                {
                    List <game> Games = new List <game>();
                    foreach (var dto in collection)
                    {
                        Games.Add(new game()
                        {
                            gameId     = dto.GameID.ToStringSafe(),
                            gameName   = dto.GameName,
                            gameActive = dto.IsActive,
                        });
                    }
                    ci.game = Games.ToArray();
                    result  = true;
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return(result);
        }
Example #4
0
        internal void AddConfigurationInfo(s2sMessage target)
        {
            ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "AddConfiguration");

            try
            {
                // set the target configuration
                configuration conf = target.p_body.p_configuration;
                if (conf == null)
                {
                    conf            = new configuration();
                    conf.propertyId = target.p_propertyId;
                    target.p_body.p_configuration = conf;
                    target.p_body.Items           = new object[] { conf };
                }

                // set the target configuration info
                configurationInfo confInfo = conf.p_configurationInfo;
                if (confInfo == null)
                {
                    confInfo = new configurationInfo();
                    conf.p_configurationInfo = confInfo;
                    conf.Item = confInfo;
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }
        }
Example #5
0
        internal bool Parse_configurationInfo_getDenomination(s2sMessage target, DLDenominationCollectionDto collection)
        {
            ModuleProc PROC   = new ModuleProc(this.DYN_MODULE_NAME, "Parse_configurationInfo_getDenomination");
            bool       result = default(bool);

            try
            {
                configurationInfo ci = target.p_body.p_configuration.p_configurationInfo;
                if (collection != null)
                {
                    List <denomination> denominations = new List <denomination>();
                    foreach (var dto in collection)
                    {
                        denominations.Add(new denomination()
                        {
                            denominationId     = dto.DenominationId,
                            denominationName   = dto.DenominationName,
                            denominationValue  = dto.DenominationValue,
                            denominationActive = dto.IsActive,
                        });
                    }
                    ci.denomination = denominations.ToArray();
                    result          = true;
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return(result);
        }
        internal bool Parse_configurationInfo_getMachine(s2sMessage target, DLMachineCollectionDto collection)
        {
            ModuleProc PROC   = new ModuleProc(this.DYN_MODULE_NAME, "Parse_configurationInfo_getMachine");
            bool       result = default(bool);

            try
            {
                configurationInfo ci = target.p_body.p_configuration.p_configurationInfo;
                if (collection != null)
                {
                    List <machine> Machines = new List <machine>();
                    foreach (var dto in collection)
                    {
                        Machines.Add(new machine()
                        {
                            machineId      = dto.MachineID,
                            areaId         = dto.Area,
                            gameId         = dto.GameName,
                            machineLoc     = dto.MachineLoc,
                            machineActive  = dto.IsActive,
                            denominationId = dto.DenominationID,
                            manufacturerId = dto.ManufacturerName,
                            casinoId       = dto.CasinoID,
                            machineType    = dto.MachineType,
                            zoneId         = dto.ZoneID,
                            bankId         = dto.Bank
                        });
                    }
                    ci.machine = Machines.ToArray();
                    result     = true;
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return(result);
        }