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

            _billsService = new BillsService(notificationService);
            _userService  = new UserService();
        }
Ejemplo n.º 5
0
 public LocalBillingService(
     ISuppliersService localSuppliersService
     , IBillsService localBillsService
     )
 {
     this.Suppliers = localSuppliersService ?? throw new ArgumentNullException(nameof(localSuppliersService));
     this.Bills     = localBillsService ?? throw new ArgumentNullException(nameof(localBillsService));
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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";
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 14
0
 public BillsController(IBillsService billsService, IVoteService voteService, IConstituencyService constituencyService)
 {
     _billsService        = billsService;
     _voteService         = voteService;
     _constituencyService = constituencyService;
 }
Ejemplo n.º 15
0
 public BillsController(ILogger <BillsController> logger, IBillsService billsService)
 {
     _logger       = logger;
     _billsService = billsService;
 }
Ejemplo n.º 16
0
 public DebatesService(IDatabaseRepository db, IBillsService billsService)
 {
     _db           = db;
     _billsService = billsService;
 }
Ejemplo n.º 17
0
 public BillsController(IBillsService billsService, IPeopleService peopleService)
 {
     this._billsService  = billsService;
     this._peopleService = peopleService;
 }
Ejemplo n.º 18
0
 public BillController(IBillsService billService, ILogger <BillController> logger)
 {
     this._billService = billService;
     this._logger      = logger;
 }
Ejemplo n.º 19
0
 public HomeController(IBillsService buiService)
 {
     _billsService = buiService;
 }
Ejemplo n.º 20
0
 public BillsController(IBillsService billsService, IFaturaKalemService faturaKalemService)
 {
     _billsService       = billsService;
     _faturaKalemService = faturaKalemService;
 }
Ejemplo n.º 21
0
 public BillsController(IBillsService billsService)
 {
     _billsService = billsService;
 }
 public BillsController(IBillsService BillsService)
 {
     this.BillsService = BillsService ??
                         throw new ArgumentNullException(nameof(BillsService));
 }
Ejemplo n.º 23
0
 public InvoicesController(IBillsService billsService, IBillingService billingService)
 {
     this.billsService   = billsService;
     this.billingService = billingService;
 }