Esempio n. 1
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_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;
        }
Esempio n. 3
0
        internal bool Parse_configurationInfo_getDenomination(s2sMessage target, object source)
        {
            ModuleProc PROC   = new ModuleProc(this.DYN_MODULE_NAME, "Parse_configurationInfo_getDenomination");
            bool       result = default(bool);
            getConfigurationGetDenomination s2s = source as getConfigurationGetDenomination;

            try
            {
                DLDenominationCollectionDto collection = _di.GetDenominations(target.p_body.p_configuration.propertyId, s2s.denomId.s2sStringId());
                result = this.Parse_configurationInfo_getDenomination(target, collection);
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return(result);
        }
Esempio n. 4
0
        public DLDenominationCollectionDto GetDenominations(string siteCode, object denominationId)
        {
            ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "GetDenominations");
            DLDenominationCollectionDto result = new DLDenominationCollectionDto();

            try
            {
                using (Database db = DbFactory.OpenDB(_connectionString))
                {
                    db.Open();

                    DbParameter[] parameters = db.CreateParameters(2);
                    parameters[0] = db.CreateParameter("@SiteCode", DbType.AnsiString, 50, siteCode);
                    parameters[1] = db.CreateParameter("@Denomination_Id", denominationId);
                    DataSet   ds = db.ExecuteDataset("[dbo].[rsp_EBS_GetDenominationDetails]", parameters);
                    DataTable dt = ds.GetDataTable(0);
                    if (dt != null)
                    {
                        foreach (DataRow dr in dt.Rows)
                        {
                            DLDenominationDto dto = new DLDenominationDto();
                            dto.DenominationId    = dr.Field <string>("DenominationId");
                            dto.DenominationName  = dr.Field <string>("DenominationName");
                            dto.DenominationValue = dr.Field <string>("DenominationValue");
                            dto.IsActive          = dr.Field <bool>("IsActive");
                            result.Add(dto);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return(result);
        }
        public DLDenominationCollectionDto GetDenominations(string siteCode, object denominationId)
        {
            ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "GetDenominations");
            DLDenominationCollectionDto result = new DLDenominationCollectionDto();

            try
            {
                using (Database db = DbFactory.OpenDB(_connectionString))
                {
                    db.Open();

                    DbParameter[] parameters = db.CreateParameters(2);
                    parameters[0] = db.CreateParameter("@SiteCode", DbType.AnsiString, 50, siteCode);
                    parameters[1] = db.CreateParameter("@Denomination_Id", denominationId);
                    DataSet ds = db.ExecuteDataset("[dbo].[rsp_EBS_GetDenominationDetails]", parameters);
                    DataTable dt = ds.GetDataTable(0);
                    if (dt != null)
                    {
                        foreach (DataRow dr in dt.Rows)
                        {
                            DLDenominationDto dto = new DLDenominationDto();
                            dto.DenominationId = dr.Field<string>("DenominationId");
                            dto.DenominationName = dr.Field<string>("DenominationName");
                            dto.DenominationValue = dr.Field<string>("DenominationValue");
                            dto.IsActive = dr.Field<bool>("IsActive");
                            result.Add(dto);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return result;
        }