コード例 #1
0
 public SearchBillsQueryHandler(
     IBillRepository billRepository,
     IMapper mapper)
 {
     this.billRepository = billRepository ?? throw new ArgumentNullException(nameof(billRepository));
     this.mapper         = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
コード例 #2
0
 public ProductController(IProductRepository productRepository, IBillRepository billRepository, IConfiguration configuration, IProductCategoryRepository productCategoryRepository)
 {
     _productRepository         = productRepository;
     _billRepository            = billRepository;
     _configuration             = configuration;
     _productCategoryRepository = productCategoryRepository;
 }
コード例 #3
0
        //
        // GET: /Member/

        public BillController(IBillRepository billParam, IConstantRepository constantParam, IPayeeCategoryRepository PayeeCategoryParam, IPayeeRepository payeeParam)
        {
            billRepository          = billParam;
            ConstantRepository      = constantParam;
            PayeeCategoryRepository = PayeeCategoryParam;
            PayeeRepository         = payeeParam;

            ViewBag.Supervisor = false;
            int memberID = Convert.ToInt16(System.Web.HttpContext.Current.Session["personID"]);

            if (memberID > 0)
            {
                if (MembershipRepositroy.IsUser(memberID))
                {
                    user user = MembershipRepositroy.GetUserByID(memberID);
                    if ((user.role.Name == "WebMaster") || (user.role.Name == "Pastor") || (user.role.Name == "Admin") || (user.role.Name == "FinanceLead")) //creator access
                    {
                        ViewBag.Supervisor = true;
                    }
                    if (user.role.Name == "WebMaster") //creator access
                    {
                        ViewBag.WebMaster = true;
                    }

                    if (user.role.Name == "FinanceStaff") //creator access
                    {
                        ViewBag.Supervisor2 = true;
                    }
                }
            }
        }
コード例 #4
0
 public FiananceProjectService(IFinanceProjectRepository fProjRepo, IFinanceUserRepository fUserRepo, IBillRepository billRepository)
 {
     _fProjRepo      = fProjRepo;
     _fUserRepo      = fUserRepo;
     _billRepository = billRepository;
     Mapper.Initialize(cfg => cfg.CreateMap <FinanceProject, FianceProjectViewModel>());
 }
コード例 #5
0
 public CartController(IProductRepository productRepository, IBillRepository billRepository, IConfiguration configuration, UserManager <AppUser> userManager)
 {
     _productRepository = productRepository;
     _billRepository    = billRepository;
     _configuration     = configuration;
     UserManager        = userManager;
 }
コード例 #6
0
 public GetBillImageQueryHandler(
     IBillRepository billRepository,
     IBillImageRepository billImageRepository)
 {
     this.billRepository      = billRepository ?? throw new ArgumentNullException(nameof(billRepository));
     this.billImageRepository = billImageRepository ?? throw new ArgumentNullException(nameof(billImageRepository));
 }
コード例 #7
0
 public BillController(IBillRepository billRepository, IDiscordService discordService, IUserService userService, IRecurringBillWorker recurringBillWorker)
 {
     _userService         = userService;
     _billRepository      = billRepository;
     _discordService      = discordService;
     _recurringBillWorker = recurringBillWorker;
 }
コード例 #8
0
 public ReceptionPresenter(clinicEntities clinicEntities, IReceptionView view, IBillRepository billRepository, IPatientRepository patientRepository)
 {
     _clinicEntities    = clinicEntities;
     _view              = view;
     _billRepository    = billRepository;
     _patientRepository = patientRepository;
 }
        public BoundaryTest()
        {
            _bill = new BillDetails
            {
                Title       = "Electricity Bill",
                Catagory    = BillCategory.Office,
                Amount      = 1000,
                DateOfEntry = DateTime.Now,
                DueDate     = DateTime.Now.AddDays(30),
                PaymentMode = BillPaymentMode.Bank_Transfer,
                Status      = BillStatus.Unpaid
            };

            _user = new User
            {
                UserName        = "******",
                Password        = "******",
                ConfirmPassword = "******",
                Email           = "*****@*****.**",
                UserType        = UserType.Visitor
            };
            _userLogin = new UserLogin
            {
                UserName = "******",
                Password = "******",
            };
            MongoDBUtility mongoDBUtility = new MongoDBUtility();

            context         = mongoDBUtility.MongoDBContext;
            _userRepository = new UserRepository(context);
            _billRepository = new BillRepository(context);
            _userService    = new UserService(_userRepository);
            _billService    = new BillService(_billRepository);
            config          = new ConfigurationBuilder().AddJsonFile("appsettings.test.json").Build();
        }
コード例 #10
0
 public BillCommandHandlerTest()
 {
     _userStore          = Substitute.For <IUserStore <IdentityUser> >();
     _optionsAccessor    = Substitute.For <IOptions <IdentityOptions> >();
     _passwordHasher     = Substitute.For <IPasswordHasher <IdentityUser> >();
     _userValidators     = Substitute.For <IEnumerable <IUserValidator <IdentityUser> > >();
     _passwordValidators = Substitute.For <IEnumerable <IPasswordValidator <IdentityUser> > >();
     _keyNormalizer      = Substitute.For <ILookupNormalizer>();
     _errors             = Substitute.For <IdentityErrorDescriber>();
     _logger             = Substitute.For <ILogger <UserManager <IdentityUser> > >();
     _optionsAccessor    = Substitute.For <IOptions <IdentityOptions> >();
     _userManager        = new UserManager <IdentityUser>
                               (_userStore,
                               _optionsAccessor,
                               _passwordHasher,
                               _userValidators,
                               _passwordValidators,
                               _keyNormalizer,
                               _errors,
                               _serviceProvider,
                               _logger);
     _mapper         = Resolve <IMapper>();
     _billRepository = Substitute.For <IBillRepository>();
     _commandHandler = new BillCommandHandler(_serviceProvider, _userManager, _mapper, _billRepository);
 }
コード例 #11
0
 public BillService(IBillRepository billRepository, IUserService userService, IAccountService accountService, IMapper mapper)
 {
     _billRepository = billRepository;
     _userService    = userService;
     _accountService = accountService;
     _mapper         = mapper;
 }
コード例 #12
0
 public BillController(IBillRepository repo, IStaffRepository srepo, IAccountRepository arepo, IProductRepository prepo)
 {
     this._srepo = srepo;
     this._arepo = arepo;
     this._prepo = prepo;
     this._repo  = repo;
 }
コード例 #13
0
 public BillsController(IBillRepository billRepository, ICategoryRepository categoryRepository, ILogger <BillsController> logger, IPaymentService paymentService)
 {
     _billRepository     = billRepository;
     _categoryRepository = categoryRepository;
     _logger             = logger;
     _paymentService     = paymentService;
 }
コード例 #14
0
 public BillService(IBillRepository billRepository, IBillDetailRepository billDetailRepository, IDrinkRepository drinkRepository, IPromotionDetailRepository promotionDetailRepository)
 {
     this.billRepository            = billRepository;
     this.billDetailRepository      = billDetailRepository;
     this.drinkRepository           = drinkRepository;
     this.promotionDetailRepository = promotionDetailRepository;
 }
コード例 #15
0
 public BillUnitOfWork(BillingContext billingContext, IBillRepository billRepository,
                       IReadingRepository readingRepository)
     : base(billingContext)
 {
     BillRepository    = billRepository;
     ReadingRepository = readingRepository;
 }
コード例 #16
0
ファイル: Startup.cs プロジェクト: Flave229/SaltVault
        public Startup(IHostingEnvironment env)
        {
            _billRepository            = new BillRepository();
            _shoppingRepository        = new ShoppingRepository();
            _peopleRepository          = new PeopleRepository();
            _toDoRepository            = new ToDoRepository();
            _householdRepository       = new HouseholdRepository();
            _discordService            = new DiscordService(new HttpClient());
            _userService               = new UserService(new UserCache(), _peopleRepository);
            _inviteLinkService         = new InviteLinkService();
            _googleTokenAuthentication = new GoogleTokenAuthentication(new HttpClient());
            _recurringBillWorker       = new RecurringBillWorker(_billRepository);

            var builder = new ConfigurationBuilder()
                          .SetBasePath(env.ContentRootPath)
                          .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                          .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
                          .AddEnvironmentVariables();

            if (env.IsDevelopment())
            {
                builder.AddApplicationInsightsSettings(developerMode: true);
            }

            var discordWorker           = new DiscordMessageListener(_billRepository, _shoppingRepository, _peopleRepository, _discordService);
            var backgroundDiscordWorker = new Task(() => discordWorker.StartWorker());

            backgroundDiscordWorker.Start();

            Configuration = builder.Build();
        }
コード例 #17
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="BillOrchestrator" /> class.
        /// </summary>
        /// <param name="assembler">
        ///     The assembler.
        /// </param>
        /// <param name="repository">
        ///     The repository.
        /// </param>
        /// <param name="dataTransformer">
        ///     The data transformer.
        /// </param>
        /// <param name="errorHelper">
        ///     The error helper.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        ///     Exception thrown when either the assembler, repository or data transformer are null.
        /// </exception>
        public BillOrchestrator(
            IBillAssembler assembler,
            IBillRepository repository,
            IBillDataTransformer dataTransformer,
            IErrorHelper errorHelper)
            : base(errorHelper)
        {
            if (assembler == null)
            {
                throw new ArgumentNullException(nameof(assembler));
            }

            if (repository == null)
            {
                throw new ArgumentNullException(nameof(repository));
            }

            if (dataTransformer == null)
            {
                throw new ArgumentNullException(nameof(dataTransformer));
            }

            this.assembler       = assembler;
            this.dataTransformer = dataTransformer;
            this.repository      = repository;
        }
コード例 #18
0
 public CustomerController(IBillRepository billDatabase, IUserProfileRepository userProfileDatabase, IBillProductRepository billProductDatabase, IProductRepository proDatabase)
 {
     _billDatabase        = billDatabase;
     _userProfileDatabase = userProfileDatabase;
     _billProductDatabase = billProductDatabase;
     _proDatabase         = proDatabase;
 }
コード例 #19
0
 public BillController(IBillRepository billRepository, DatabaseContext context)
     : base(billRepository, context)
 {
     _billRepository = billRepository;
     _context        = context;
     _entity         = _context.Set <BillEntity>();
 }
コード例 #20
0
 public GetBillByIdQueryHandler(
     IMapper mapper,
     IBillRepository billRepository)
 {
     this.mapper         = mapper ?? throw new ArgumentNullException(nameof(mapper));
     this.billRepository = billRepository ?? throw new ArgumentNullException(nameof(billRepository));
 }
コード例 #21
0
 public void Setup()
 {
     Repo = new BillRepository(DataAccess)
     {
         User = SystemOperator.SysOperator
     };
 }
コード例 #22
0
 public BillsController(IBillRepository billRepository, IUserRepository userRepository, IUnitOfWork unitOfWork, IMapper mapper)
 {
     _billRepository = billRepository;
     _userRepository = userRepository;
     _unitOfWork     = unitOfWork;
     _mapper         = mapper;
 }
コード例 #23
0
 public BillService(IBillRepository billRepo, IProductRepository prodRepo, IUnitOfWork unitOfWork, IMemoryCache cache)
 {
     _billRepo   = billRepo;
     _prodRepo   = prodRepo;
     _unitOfWork = unitOfWork;
     _cache      = cache;
 }
コード例 #24
0
ファイル: BillService.cs プロジェクト: xudong114/CRM
 public BillService(IRepositoryContext context,
                    IBillRepository iBillRepository,
                    IUserRepository iUserRepository)
     : base(context)
 {
     this._IBillRepository = iBillRepository;
     this._IUserRepository = iUserRepository;
 }
コード例 #25
0
 public BillsService(
     IBillRepository billRepository,
     IBusinessRuleRepository businessRuleRepository
     )
 {
     _billRepository         = billRepository;
     _businessRuleRepository = businessRuleRepository;
 }
コード例 #26
0
ファイル: BillManagerTests.cs プロジェクト: SKDon/Tracker
        public void TestInitialize()
        {
            _fixture     = new Fixture();
            _composition = new CompositionHelper(Settings.Default.MainConnectionString, Settings.Default.FilesConnectionString);

            _manager        = _composition.Kernel.Get <BillManager>();
            _billRepository = _composition.Kernel.Get <IBillRepository>();
        }
コード例 #27
0
 public Payments(IBillRepository IBillRepository, ICoinRepository ICoinRepository,
                 ITransactionXBillRepository ITransactionXBillRepository, ITransactionXCoinRepository ITransactionXCoinRepository)
 {
     this.IBillRepository             = IBillRepository;
     this.ICoinRepository             = ICoinRepository;
     this.ITransactionXBillRepository = ITransactionXBillRepository;
     this.ITransactionXCoinRepository = ITransactionXCoinRepository;
 }
コード例 #28
0
 public CartController(DatabaseContext database, IBillRepository billDatabase, IUserProfileRepository userProfileDatabase, IBillProductRepository billProductDatabase, IProductRepository proDatabase)
 {
     _database            = database;
     _billDatabase        = billDatabase;
     _userProfileDatabase = userProfileDatabase;
     _billProductDatabase = billProductDatabase;
     _proDatabase         = proDatabase;
 }
コード例 #29
0
 public BillController(
     IBillRepository BillRepository,
     IMapper mapper
     )
 {
     this.BillRepository = BillRepository;
     this.mapper         = mapper;
 }
コード例 #30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserBillService"/> class.
 /// </summary>
 public UserBillService()
 {
     _logRepository                        = new LogRepository();
     _billRepository                       = new BillRepository();
     _userBillRepository                   = new UserBillRepository();
     _recurrenceTypeRepository             = new RecurrenceTypeRepository();
     _userBillRecurrenceScheduleRepository = new UserBillRecurrenceScheduleRepository();
 }
コード例 #31
0
ファイル: BillManagerTests.cs プロジェクト: UHgEHEP/test
		public void TestInitialize()
		{
			_fixture = new Fixture();
			_composition = new CompositionHelper(Settings.Default.MainConnectionString, Settings.Default.FilesConnectionString);

			_manager = _composition.Kernel.Get<BillManager>();
			_billRepository = _composition.Kernel.Get<IBillRepository>();
		}
コード例 #32
0
 public BillController BillController(IBillRepository billRepository)
 {
     var sut = new BillController(billRepository)
     {
         Request = new HttpRequestMessage(),
         Configuration = new HttpConfiguration()
     };
     return sut;
 }
コード例 #33
0
 public RepositoryUnitOfWork(IUserRepository userRepository = null, IBudgetRepository budgetRepository = null, ICategoryRepository categoryRepository = null, ITransactionRepository transactionRepository = null, IBillRepository billRepository = null, IDbConnection connection = null)
 {
     this.userRepository = userRepository;
     this.budgetRepository = budgetRepository;
     this.categoryRepository = categoryRepository;
     this.transactionRepository = transactionRepository;
     this.billRepository = billRepository;
     this.connection = connection;
 }
コード例 #34
0
ファイル: AccountService.cs プロジェクト: kenwarner/scrilla
 public AccountService(IUnitOfWork unitOfWork, IAccountRepository accountRepository, ITransactionRepository transactionRepository, ICategoryRepository categoryRepository, IVendorRepository vendorRepository, IBillRepository billRepository, IBillTransactionRepository billTransactionRepository, IBillGroupRepository billGroupRepository, ICategoryGroupRepository categoryGroupRepository, IBudgetCategoryRepository budgetCategoryRepository, IImportDescriptionVendorMapRepository importDescriptionVendorMapRepository)
 {
     _unitOfWork = unitOfWork;
     _accountRepository = accountRepository;
     _transactionRepository = transactionRepository;
     _categoryRepository = categoryRepository;
     _vendorRepository = vendorRepository;
     _billRepository = billRepository;
     _billTransactionRepository = billTransactionRepository;
     _billGroupRepository = billGroupRepository;
     _categoryGroupRepository = categoryGroupRepository;
     _budgetCategoryRepository = budgetCategoryRepository;
     _importDescriptionVendorMapRepository = importDescriptionVendorMapRepository;
 }
コード例 #35
0
ファイル: BillController.cs プロジェクト: UHgEHEP/test
		public BillController(
			IBillPdf pdf,
			IBillModelFactory modelFactory,
			IApplicationRepository applications,
			IBillRepository bills,
			IBillManager manager,
			IIdentityService identity)
		{
			_pdf = pdf;
			_modelFactory = modelFactory;
			_applications = applications;
			_bills = bills;
			_manager = manager;
			_identity = identity;
		}
コード例 #36
0
ファイル: BillManager.cs プロジェクト: UHgEHEP/test
		public BillManager(
			IApplicationRepository applications,
			ISettingRepository settings,
			IBillRepository bills,
			IBillPdf pdf,
			IAdminRepository admins,
			IMailSender mail)
		{
			_applications = applications;
			_settings = settings;
			_bills = bills;
			_pdf = pdf;
			_admins = admins;
			_mail = mail;
		}
コード例 #37
0
ファイル: BillModelBinder.cs プロジェクト: ngnono/NG.FM
 public BillModelBinder(IBillRepository service)
 {
     _repository = service;
 }
コード例 #38
0
ファイル: BillController.cs プロジェクト: ngnono/NG.FM
 public BillController(ICustomerRepository customerRepository, IBillRepository repository, ITagRepository tagRepository)
 {
     _repository = repository;
     _tagRepository = tagRepository;
     _customerRepository = customerRepository;
 }
コード例 #39
0
ファイル: BillController.cs プロジェクト: EdgeTest/billet
 public BillController(IBillRepository billRepository)
 {
     _billRepository = billRepository;
 }
コード例 #40
0
ファイル: GetAllBillsQuery.cs プロジェクト: mokhan/mo.money
 public GetAllBillsQuery(IBillRepository bills, Mapper<IBill, BillInformationDTO> mapper)
 {
     this.bills = bills;
     this.mapper = mapper;
 }
コード例 #41
0
ファイル: BillPdf.cs プロジェクト: UHgEHEP/test
		public BillPdf(IBillRepository bills)
		{
			_bills = bills;
		}