Пример #1
0
 public BillsController()
 {
     //    var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "dlls");
     //    Resolver = new Resolver(path);
     //    _ibs = Resolver.ResolveMany<IBillsService>().FirstOrDefault();
     _ibs = new BillsService();
 }
Пример #2
0
 public CategoryController(IUnitOfWork db, ICategoriesService categoryService, IBillsService billService, IOffersService offerService)
 {
     this.db = db;
     this.categoryService = categoryService;
     this.billService     = billService;
     this.offerService    = offerService;
 }
Пример #3
0
 public BillsController(IBillsService billsService, IOffersService offersService, IUsersService usersService, IVouchersService vouchersService)
 {
     this.billsService    = billsService;
     this.offersService   = offersService;
     this.usersService    = usersService;
     this.vouchersService = vouchersService;
 }
Пример #4
0
        public ServiceTests()
        {
            INotificationService notificationService = new NotificationService();

            _billsService = new BillsService(notificationService);
            _userService  = new UserService();
        }
Пример #5
0
 public LocalBillingService(
     ISuppliersService localSuppliersService
     , IBillsService localBillsService
     )
 {
     this.Suppliers = localSuppliersService ?? throw new ArgumentNullException(nameof(localSuppliersService));
     this.Bills     = localBillsService ?? throw new ArgumentNullException(nameof(localBillsService));
 }
Пример #6
0
 public BillController(IUnitOfWork db, IBillsService billService, IOffersService offerService, IUsersService userService, IVouchersService voucherService, IEmailsService emailsService)
 {
     this.db             = db;
     this.billService    = billService;
     this.offerService   = offerService;
     this.userService    = userService;
     this.voucherService = voucherService;
     this.emailsService  = emailsService;
 }
 public BillingService(IViewRenderService viewRenderService, IHtmlToPdfConverter htmlToPdfConverter, IUploadService uploadService, ICustomerService customerService, IBillsService billsService, IEmailSender emailSender, IWebHostEnvironment enviroment)
 {
     this.viewRenderService  = viewRenderService;
     this.htmlToPdfConverter = htmlToPdfConverter;
     this.uploadService      = uploadService;
     this.customerService    = customerService;
     this.billsService       = billsService;
     this.emailSender        = emailSender;
     this.enviroment         = enviroment;
 }
Пример #8
0
        public XXBillsController(IAppLogger logger, IBillsService billsService, IPaysService paysService,
                                 IThirdPartyPayService thirdPartyPayService, IMapper mapper)
        {
            _logger = logger;

            _billsService         = billsService;
            _paysService          = paysService;
            _thirdPartyPayService = thirdPartyPayService;
            _mapper = mapper;
        }
        public XXSubscribesController(IOptions <SubscribesSettings> subscribesSettings,
                                      ISubscribesService subscribesService, IPlansService plansService,
                                      IPaysService paysService, IBillsService billsService,
                                      IAppLogger logger, IMapper mapper)
        {
            _subscribesSettings = subscribesSettings.Value;

            _subscribesService = subscribesService;
            _plansService      = plansService;
            _paysService       = paysService;
            _billsService      = billsService;
            _logger            = logger;
            _mapper            = mapper;
        }
Пример #10
0
 public MainWindow(IInfoService infoService, IBillsService billsService, IUsersService usersService)
 {
     this.infoService  = infoService;
     this.billsService = billsService;
     this.usersService = usersService;
     InitializeComponent();
     appDataGrid.Visibility   = Visibility.Hidden;
     welcomeLabel.Visibility  = Visibility.Visible;
     addInfoButton.Visibility = Visibility.Hidden;
     addBill.Visibility       = Visibility.Hidden;
     welcomeLabel.FontSize    = 20;
     welcomeLabel.FontWeight  = FontWeights.Bold;
     welcomeLabel.Content     = "Witam w aplikacji Bill Manager, wybierz opcję z menu";
 }
Пример #11
0
        public TestsService(IAppLogger logger, IOptions <AppSettings> appSettings,
                            IPaysService paysService, IBillsService billsService,
                            ISubscribesService subscribesService, IUsersService usersService, IAuthService authService)
        {
            _logger      = logger;
            _appSettings = appSettings.Value;


            _paysService       = paysService;
            _billsService      = billsService;
            _subscribesService = subscribesService;

            _usersService = usersService;
            _authService  = authService;
        }
Пример #12
0
        public SubscribesService(Web.Services.IThirdPartyPayService thirdPartyPayService,
                                 ApplicationCore.Services.ISubscribesService subscribesService,
                                 IPlansService plansService, IBillsService billsService, IPaysService paysService,
                                 IUsersService usersService,
                                 IOptions <SubscribesSettings> subscribesSettings, IOptions <AdminSettings> adminSettings,
                                 IAppLogger logger, IMapper mapper)
        {
            _subscribesService    = subscribesService;
            _plansService         = plansService;
            _billsService         = billsService;
            _paysService          = paysService;
            _thirdPartyPayService = thirdPartyPayService;
            _usersService         = usersService;

            _subscribesSettings = subscribesSettings.Value;
            _adminSettings      = adminSettings.Value;
            _logger             = logger;
            _mapper             = mapper;
        }
Пример #13
0
        public AddBillViewModel(
            IBillsService billsService,
            ISuppliersService suppliersService,
            BillDto bill)
        {
            this._billsService     = billsService ?? throw new ArgumentNullException(nameof(billsService));
            this._suppliersService = suppliersService ?? throw new ArgumentNullException(nameof(suppliersService));
            this._billDto          = bill ?? throw new ArgumentNullException(nameof(bill));

            this._suppliersSourceCache         = new SourceCache <SupplierDto, long>(x => x.Id).DisposeWith(this._disposables);
            this._suppliersSubscription_Serial = new SerialDisposable().DisposeWith(this._disposables);

            this.LoadSuppliers = ReactiveCommand.CreateFromTask(
                async() =>
            {
                var suppliers = await this._suppliersService.GetAllAsync().ConfigureAwait(false);
                this._suppliersSourceCache.Edit(updater =>
                {
                    updater.Clear();
                    updater.AddOrUpdate(suppliers);
                });
            })
                                 .DisposeWith(this._disposables);
            this.LoadSuppliers.ThrownExceptions
            .ObserveOn(RxApp.MainThreadScheduler)
            .Subscribe(ex => Debug.WriteLine(ex))
            .DisposeWith(this._disposables);

            this.ValidationContext.DisposeWith(this._disposables);

            this.ValidationRule(
                vm => vm.SupplierId,
                propVal => propVal.HasValue,
                propVal => $"Invalid {nameof(AddBillViewModel.Code)} format.")
            .DisposeWith(this._disposables);
            this.ValidationRule(
                vm => vm.Code,
                propVal => !string.IsNullOrWhiteSpace(propVal),
                propVal => $"Invalid {nameof(AddBillViewModel.Code)} format.")
            .DisposeWith(this._disposables);
            this.ValidationRule(
                vm => vm.ReleaseDate,
                propVal => !propVal.HasValue || propVal.Value <= DateTime.Now,
                propVal => $"{nameof(AddBillViewModel.ReleaseDate)} must be in the past.")
            .DisposeWith(this._disposables);
            this.ValidationRule(
                vm => vm.PaymentDate,
                propVal => !propVal.HasValue || propVal.Value <= DateTime.Now,
                propVal => $"{nameof(AddBillViewModel.PaymentDate)} must be in the past.")
            .DisposeWith(this._disposables);
            this.ValidationRule(
                this
                .WhenAnyValue(x => x.ReleaseDate, x => x.DueDate)
                .Select(dates =>
            {
                var(releaseDate, dueDate) = dates;

                return(!releaseDate.HasValue ||
                       !dueDate.HasValue ||
                       releaseDate <= dueDate);
            }),
                $"{nameof(AddBillViewModel.DueDate)} cannot come before {nameof(AddBillViewModel.ReleaseDate)}.")
            .DisposeWith(this._disposables);
            this.ValidationRule(
                this
                .WhenAnyValue(x => x.ReleaseDate, x => x.PaymentDate)
                .Select(dates =>
            {
                var(releaseDate, paymentDate) = dates;

                return(!releaseDate.HasValue ||
                       !paymentDate.HasValue ||
                       releaseDate <= paymentDate);
            }),
                $"{nameof(AddBillViewModel.PaymentDate)} cannot come before {nameof(AddBillViewModel.ReleaseDate)}.")
            .DisposeWith(this._disposables);
        }
Пример #14
0
 public BillsController(IBillsService billsService, IVoteService voteService, IConstituencyService constituencyService)
 {
     _billsService        = billsService;
     _voteService         = voteService;
     _constituencyService = constituencyService;
 }
Пример #15
0
 public BillsController(ILogger <BillsController> logger, IBillsService billsService)
 {
     _logger       = logger;
     _billsService = billsService;
 }
Пример #16
0
 public DebatesService(IDatabaseRepository db, IBillsService billsService)
 {
     _db           = db;
     _billsService = billsService;
 }
Пример #17
0
 public BillsController(IBillsService billsService, IPeopleService peopleService)
 {
     this._billsService  = billsService;
     this._peopleService = peopleService;
 }
Пример #18
0
 public BillController(IBillsService billService, ILogger <BillController> logger)
 {
     this._billService = billService;
     this._logger      = logger;
 }
Пример #19
0
 public HomeController(IBillsService buiService)
 {
     _billsService = buiService;
 }
Пример #20
0
 public BillsController(IBillsService billsService, IFaturaKalemService faturaKalemService)
 {
     _billsService       = billsService;
     _faturaKalemService = faturaKalemService;
 }
Пример #21
0
 public BillsController(IBillsService billsService)
 {
     _billsService = billsService;
 }
 public BillsController(IBillsService BillsService)
 {
     this.BillsService = BillsService ??
                         throw new ArgumentNullException(nameof(BillsService));
 }
Пример #23
0
 public InvoicesController(IBillsService billsService, IBillingService billingService)
 {
     this.billsService   = billsService;
     this.billingService = billingService;
 }