public RemoveGarmentScrapTransactionCommandHandler(IStorage storage)
 {
     _storage = storage;
     _garmentScrapTransactionRepository     = storage.GetRepository <IGarmentScrapTransactionRepository>();
     _garmentScrapTransactionItemRepository = storage.GetRepository <IGarmentScrapTransactionItemRepository>();
     _garmentScrapStockRepository           = storage.GetRepository <IGarmentScrapStockRepository>();
 }
            public UpdateGarmentScrapTransactionCommandValidator(IStorage storage)
            {
                IGarmentScrapTransactionRepository _GarmentScrapTransactionRepository = storage.GetRepository <IGarmentScrapTransactionRepository>();

                RuleFor(r => r.TransactionDate).NotNull().GreaterThan(DateTimeOffset.MinValue).WithMessage("Tanggal Transaksi harus diisi");
                RuleFor(r => r.TransactionDate).NotNull().LessThan(DateTimeOffset.Now).WithMessage("Tanggal Tidak Lebih dari Hari Ini");
                RuleForEach(r => r.Items).SetValidator(new GarmentScrapTransactionItemValueObjectValidator());
            }
 public PlaceGarmentScrapTransactionCommandHandler(IStorage storage)
 {
     _storage = storage;
     _garmentScrapTransactionRepository     = storage.GetRepository <IGarmentScrapTransactionRepository>();
     _garmentScrapTransactionItemRepository = storage.GetRepository <IGarmentScrapTransactionItemRepository>();
     //_garmentScrapSourceRepository = storage.GetRepository<IGarmentScrapSourceRepository>();
     //_garmentScrapDestinationRepository = storage.GetRepository<IGarmentScrapDestinationRepository>();
     _garmentScrapStockRepository = storage.GetRepository <IGarmentScrapStockRepository>();
 }
예제 #4
0
 public GarmentScrapTransactionController(IServiceProvider serviceProvider) : base(serviceProvider)
 {
     _garmentScrapTransactionRepository     = Storage.GetRepository <IGarmentScrapTransactionRepository>();
     _garmentScrapTransactionItemRepository = Storage.GetRepository <IGarmentScrapTransactionItemRepository>();
 }