Beruflich Dokumente
Kultur Dokumente
public ReadOnlyCollection<PriceGroup>
GetAffiliationPriceGroups(IEnumerable<AffiliationLoyaltyTier> affiliationLoyaltyTiers)
{
ThrowIf.Null<IEnumerable<AffiliationLoyaltyTier>>(affiliationLoyaltyTiers,
"affiliationLoyaltyTiers");
using (DataTable table = new DataTable("AFFILIATIONLOYALTYTIERTABLETYPE"))
{
table.Columns.Add("AFFILIATIONID", typeof(long));
table.Columns.Add("LOYALTYTIERID", typeof(long));
foreach (AffiliationLoyaltyTier tier in affiliationLoyaltyTiers)
{
DataRow row = table.NewRow();
row["AFFILIATIONID"] = (long) tier.AffiliationId;
row["LOYALTYTIERID"] = (long) tier.LoyaltyTierId;
table.Rows.Add(row);
}
ParameterSet parameters = new ParameterSet();
parameters["@bi_ChannelId"] = (long) base.ChannelId;
parameters["@affiliationLoyaltyTiers"] = table;
return
base.ExecuteStoredProcedure<PriceGroup>("GETAFFILIATIONLOYALTYTIERPRICEGROUPS",
parameters);
}
}
public ReadOnlyCollection<DiscountCode>
GetDiscountCodesByOfferId(IEnumerable<string> offerIds, ColumnSet columns)
{
ThrowIf.Null<IEnumerable<string>>(offerIds, "offerIds");
ThrowIf.Null<ColumnSet>(columns, "columns");
SqlPagedQuery query = new SqlPagedQuery {
Select = columns,
Paging = new PagingInfo(PagingInfo.MaximumPageSize, 0),
From = "DISCOUNTCODEVIEW",
Where = "DATAAREAID = @dataAreaId",
IsQueryByPrimaryKey = false
};
using (StringIdTableType type = new StringIdTableType(offerIds, "DISCOUNTOFFERID"))
{
query.Parameters.set_Item("@TVP_OFFERIDTABLETYPE", type);
query.Parameters.set_Item("@dataAreaId",
base.Context.GetChannelConfiguration().InventLocationDataAreaId);
return base.ExecuteSelect<DiscountCode>(query);
}
}
public ReadOnlyCollection<MixAndMatchLineGroup>
GetMixAndMatchLineGroupsByOffer(string offerId, QueryResultSettings settings)
{
ThrowIf.NullOrWhiteSpace(offerId, "offerId");
ThrowIf.Null<QueryResultSettings>(settings, "settings");
SqlPagedQuery query = new SqlPagedQuery {
Select = settings.ColumnSet,
Paging = settings.Paging,
From = "RETAILMIXANDMATCHLINEGROUPSVIEW",
Where = "OFFERID = @offerId AND CHANNELID = @channelId",
IsQueryByPrimaryKey = false
};
query.Parameters.set_Item("@offerId", offerId);
query.Parameters.set_Item("@channelId", (long) base.ChannelId);
return base.ExecuteSelect<MixAndMatchLineGroup>(query);
}
public ReadOnlyCollection<MixAndMatchLineGroup>
GetMixAndMatchLineGroupsByOfferIds(IEnumerable<string> offerIds)
{
ThrowIf.Null<IEnumerable<string>>(offerIds, "offerIds");
SqlPagedQuery query = new SqlPagedQuery {
Select = new ColumnSet(),
Paging = new PagingInfo(PagingInfo.MaximumPageSize, 0),
From = "RETAILMIXANDMATCHLINEGROUPSVIEW",
Where = "CHANNELID = @channelId",
IsQueryByPrimaryKey = false
};
using (StringIdTableType type = new StringIdTableType(offerIds, "OFFERID"))
{
query.Parameters.set_Item("@TVP_STRINGIDTABLETYPE", type);
query.Parameters.set_Item("@channelId", (long) base.ChannelId);
return base.ExecuteSelect<MixAndMatchLineGroup>(query);
}
}
public ReadOnlyCollection<QuantityDiscountLevel>
GetMultipleBuyDiscountLinesByOfferIds(IEnumerable<string> offerIds)
{
ThrowIf.Null<IEnumerable<string>>(offerIds, "offerIds");
SqlPagedQuery query = new SqlPagedQuery {
Select = new ColumnSet(),
Paging = new PagingInfo(PagingInfo.MaximumPageSize, 0),
From = "RETAILMULTIBUYDISCOUNTLINESVIEW",
Where = "DATAAREAID = @dataAreaId",
IsQueryByPrimaryKey = false
};
using (StringIdTableType type = new StringIdTableType(offerIds, "MULTIBUYID"))
{
query.Parameters.set_Item("@TVP_STRINGIDTABLETYPE", type);
query.Parameters.set_Item("@dataAreaId",
base.Context.GetChannelConfiguration().InventLocationDataAreaId);
return base.ExecuteSelect<QuantityDiscountLevel>(query);
}
}
public ReadOnlyCollection<RetailCategoryMember>
GetRetailCategoryMembersForItems(ISet<long> productOrVariantIds)
{
throw new NotImplementedException("unauthorized direct call to a data store accessor");
}
public ReadOnlyCollection<RetailDiscountPriceGroup>
GetRetailDiscountPriceGroups(ISet<string> offerIds)
{
ThrowIf.Null<ISet<string>>(offerIds, "offerIds");
SqlPagedQuery query = new SqlPagedQuery {
Select = new ColumnSet(),
Paging = new PagingInfo(PagingInfo.MaximumPageSize, 0),
From = "RETAILDISCOUNTPRICEGROUPSVIEW",
Where = "DATAAREAID = @dataAreaId",
IsQueryByPrimaryKey = false
};
using (StringIdTableType type = new StringIdTableType((IEnumerable<string>) offerIds,
RetailDiscountPriceGroup.OfferIdColumn))
{
query.Parameters.set_Item("@TVP_STRINGIDTABLETYPE", type);
query.Parameters.set_Item("@dataAreaId",
base.Context.GetChannelConfiguration().InventLocationDataAreaId);
return base.ExecuteSelect<RetailDiscountPriceGroup>(query);
}
}
public ReadOnlyCollection<ThresholdDiscountTier>
GetThresholdTiersByOfferIds(IEnumerable<string> offerIds)
{
ThrowIf.Null<IEnumerable<string>>(offerIds, "offerIds");
SqlPagedQuery query = new SqlPagedQuery {
Select = new ColumnSet(),
Paging = new PagingInfo(PagingInfo.MaximumPageSize, 0),
From = "RETAILDISCOUNTTHRESHOLDTIERSVIEW",
Where = "DATAAREAID = @dataAreaId",
IsQueryByPrimaryKey = false
};
using (StringIdTableType type = new StringIdTableType(offerIds, "OFFERID"))
{
query.Parameters.set_Item("@TVP_STRINGIDTABLETYPE", type);
query.Parameters.set_Item("@dataAreaId",
base.Context.GetChannelConfiguration().InventLocationDataAreaId);
return base.ExecuteSelect<ThresholdDiscountTier>(query);
}
}
public ReadOnlyCollection<ValidationPeriod>
GetValidationPeriodsByIds(IEnumerable<string> periodIds, ColumnSet columns)
{
ThrowIf.Null<IEnumerable<string>>(periodIds, "periodIds");
ThrowIf.Null<ColumnSet>(columns, "columns");
SqlPagedQuery query = new SqlPagedQuery {
Select = columns,
Paging = new PagingInfo(PagingInfo.MaximumPageSize, 0),
From = "VALIDATIONPERIODVIEW",
Where = "CHANNELID = @channelId",
IsQueryByPrimaryKey = false
};
using (StringIdTableType type = new StringIdTableType(periodIds, "PERIODID"))
{
query.Parameters.set_Item("@TVP_STRINGIDTABLETYPE", type);
query.Parameters.set_Item("@channelId", (long) base.ChannelId);
return base.ExecuteSelect<ValidationPeriod>(query);
}
}
public ReadOnlyCollection<ProductVariant>
GetVariants(IEnumerable<ItemVariantInventoryDimension> itemVariants, ColumnSet columnSet)
{
throw new NotImplementedException("unauthorized direct call to a data store accessor");
}