Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
using Grand.Business.Core.Interfaces.Checkout.GiftVouchers;
using Grand.Business.Core.Interfaces.Common.Localization;
using Grand.Domain.Orders;
using Grand.Web.AdminShared.Controllers;
using Grand.Web.AdminShared.Interfaces;
using Grand.Web.Common.Filters;
using Grand.Web.Store.Extensions;
using Microsoft.AspNetCore.Mvc;
namespace Grand.Web.Store.Controllers;
[AutoValidateAntiforgeryToken]
[Area(Constants.AreaStore)]
[AuthorizeStore]
[AuthorizeMenu]
public class GiftVoucherController(
IGiftVoucherViewModelService giftVoucherViewModelService,
IGiftVoucherService giftVoucherService,
ITranslationService translationService,
IAdminDataScope<GiftVoucher> scope)
: BaseGiftVoucherController(giftVoucherViewModelService, giftVoucherService, translationService, scope)
{
protected override void EditWarningCheck(GiftVoucher giftVoucher)
{
if (string.IsNullOrEmpty(giftVoucher.StoreId))
Warning(TranslationService.GetResource("Admin.GiftVouchers.Permissions"));
}
}