private CoberturaExposicion CreateExposureCoverage(int companyId, int channelId, int brandId, ClassificationLevelValueDTO value, IEnumerable<int> shopSizes)
 {
     var exposureCoverage = Mapper.Map<ClassificationLevelValueDTO, CoberturaExposicion>(value);
     exposureCoverage.EmpresaId = companyId;
     exposureCoverage.CanalId = channelId;
     exposureCoverage.MarcaId = brandId;
     exposureCoverage.CoberturaMinima = 0;
     exposureCoverage.CoberturaMedia = 0;
     exposureCoverage.CoberturaMaxima = 0;
     exposureCoverage.Consolidado = true;
     foreach (var shopSize in shopSizes)
     {
         exposureCoverage.CoberturasExposicionPorTamañoTienda.Add(new CoberturaExposicionPorTamañoTienda
         {
             TamañoTiendaId = shopSize,
             ValorExposicion = 0,
             Consolidado = true
         });
     }
     return exposureCoverage;
 }
        private CoberturaExposicion CreateExposureCoverage(int companyId, int channelId, int brandId, ClassificationLevelValueDTO value, IEnumerable <int> shopSizes)
        {
            var exposureCoverage = Mapper.Map <ClassificationLevelValueDTO, CoberturaExposicion>(value);

            exposureCoverage.EmpresaId       = companyId;
            exposureCoverage.CanalId         = channelId;
            exposureCoverage.MarcaId         = brandId;
            exposureCoverage.CoberturaMinima = 0;
            exposureCoverage.CoberturaMedia  = 0;
            exposureCoverage.CoberturaMaxima = 0;
            exposureCoverage.Consolidado     = true;
            foreach (var shopSize in shopSizes)
            {
                exposureCoverage.CoberturasExposicionPorTamañoTienda.Add(new CoberturaExposicionPorTamañoTienda
                {
                    TamañoTiendaId  = shopSize,
                    ValorExposicion = 0,
                    Consolidado     = true
                });
            }
            return(exposureCoverage);
        }
        private IEnumerable <SqlParameter> GetExposureCoverageParameters(int companyId, int brandId, int channelId, IList <int> selectedLevels, ClassificationLevelValueDTO value)
        {
            IList <SqlParameter> objects = new List <SqlParameter>();

            objects.Add(new SqlParameter("@companyId", companyId));
            objects.Add(new SqlParameter("@brandId", brandId));
            objects.Add(new SqlParameter("@channelId", channelId));
            foreach (var selectedLevel in selectedLevels)
            {
                var propertyInfo =
                    typeof(ClassificationLevelValueDTO).GetProperties()
                    .Single(p => p.Name.Equals("NivelClasificacion" + selectedLevel));
                objects.Add(new SqlParameter("@nivel" + selectedLevel, (string)(propertyInfo.GetValue(value, null))));
            }
            return(objects.ToArray());
        }
 private IEnumerable<SqlParameter> GetExposureCoverageParameters(int companyId, int brandId, int channelId, IList<int> selectedLevels, ClassificationLevelValueDTO value)
 {
     IList<SqlParameter> objects = new List<SqlParameter>();
     objects.Add(new SqlParameter("@companyId", companyId));
     objects.Add(new SqlParameter("@brandId", brandId));
     objects.Add(new SqlParameter("@channelId", channelId));
     foreach (var selectedLevel in selectedLevels)
     {
         var propertyInfo =
             typeof(ClassificationLevelValueDTO).GetProperties()
                 .Single(p => p.Name.Equals("NivelClasificacion" + selectedLevel));
         objects.Add(new SqlParameter("@nivel" + selectedLevel, (string)(propertyInfo.GetValue(value, null))));
     }
     return objects.ToArray();
 }