public TransactionService(IDatabase database, IAccountService accountService, ICategoryService categoryService, IVendorService vendorService, IBillService billService)
			: base(database)
		{
			_accountService = accountService;
			_categoryService = categoryService;
			_vendorService = vendorService;
			_billService = billService;
		}
Example #2
0
 public static void SetServiceProvider(Func<IBillService> provider)
 {
     try {
         _cacheService = provider.Invoke();
     }
     catch (Exception) {
         throw;
     }
 }
Example #3
0
 public CashieringController(IInsuranceDepositService insuranceDepositService, ICCSystemAirtimeService ccsystemAirtimeService,
     IAccountReceivableService accountReceivableService, ISavingDepositService savingDepositService, IMedallionService medallionService,
     ITransactionHistoryService transactionHistoryService, IBillService billService, IMemberService memberService, ICompanyService companyService, ILoanService loanService)
 {
     this.insuranceDepositService = insuranceDepositService;
     this.ccsystemAirtimeService = ccsystemAirtimeService;
     this.accountReceivableService = accountReceivableService;
     this.savingDepositService = savingDepositService;
     this.medallionService = medallionService;
     this.transactionHistoryService = transactionHistoryService;
     this.billService = billService;
     this.memberService = memberService;
     this.companyService = companyService;
     this.loanService = loanService;
 }
Example #4
0
 public StatsService(IClientService clientService,
                     IRepository <Bill> billRepository,
                     IBillService billService)
 {
     if (clientService == null)
     {
         throw new ArgumentNullException(nameof(clientService));
     }
     if (billRepository == null)
     {
         throw new ArgumentNullException(nameof(billRepository));
     }
     if (billService == null)
     {
         throw new ArgumentNullException(nameof(billService));
     }
     _clientService  = clientService;
     _billRepository = billRepository;
     _billService    = billService;
 }
Example #5
0
 private static void Seed(IBillService billService)
 {
     if (!billService.GetBillValuesAsync().Result.Any())
     {
         billService.AddBillsAsync(new List <Bill> {
             new Bill {
                 Value = 5, Quantity = 20
             },
             new Bill {
                 Value = 10, Quantity = 60
             },
             new Bill {
                 Value = 20, Quantity = 80
             },
             new Bill {
                 Value = 50, Quantity = 100
             }
         });
     }
 }
        public ExceptionalTest()
        {
            _bill = new BillDetails
            {
                Title       = "Electricity Bill",
                Catagory    = BillCategory.Office,
                Amount      = 0,
                DateOfEntry = null,
                DueDate     = null,
                PaymentMode = BillPaymentMode.Bank_Transfer,
                Status      = BillStatus.Unpaid
            };
            config = new ConfigurationBuilder().AddJsonFile("appsettings.test.json").Build();
            MongoDBUtility mongoDBUtility = new MongoDBUtility();

            context         = mongoDBUtility.MongoDBContext;
            _userRepository = new UserRepository(context);
            _billRepository = new BillRepository(context);
            _userService    = new UserService(_userRepository);
            _billService    = new BillService(_billRepository);
        }
Example #7
0
 public void Initialize()
 {
     _mockRepository  = new Mock <IBillRepository>();
     _mockUnitOfWork  = new Mock <IUnitOfWork>();
     _categoryService = new BillService(_mockUnitOfWork.Object, _mockRepository.Object);
     _listCategory    = new List <Bill>()
     {
         new Bill()
         {
             ID = 3, CustomerName = "Test bill", CreatedDate = DateTime.Now, CreatedBy = "Test", Content = "Trung rong hap sa", Status = true
         },
         new Bill()
         {
             ID = 4, CustomerName = "Test bill", CreatedDate = DateTime.Now, CreatedBy = "Test", Content = "Trung rong hap sa", Status = true
         },
         new Bill()
         {
             ID = 5, CustomerName = "Test bill", CreatedDate = DateTime.Now, CreatedBy = "Test", Content = "Trung rong hap sa", Status = true
         },
     };
 }
Example #8
0
        /// <summary>
        /// 生成单据号
        /// </summary>
        public static string GenerateBillCode <T>(T bill) where T : BillBase, new()
        {
            DateTime time = DateTime.Now;

            using (ChannelFactory <IBillService> channelFactory = new ChannelFactory <IBillService>("BillSVC"))
            {
                IBillService service = channelFactory.CreateChannel();
                time = service.GetDateTimeOfServer();
            }
            var lp      = VMGlobal.DistributionQuery.LinqOP;
            var maxCode = lp.Search <T>(o => o.OrganizationID == bill.OrganizationID).Where(t => t.CreateTime >= time.Date && t.CreateTime <= time.AddDays(1).Date).Max(t => t.Code);

            if (string.IsNullOrEmpty(maxCode))
            {
                int    tag       = (int)Enum.Parse(typeof(BillTypeEnum), typeof(T).Name);
                string prefixion = Enum.GetName(typeof(BillCodePrefixion), tag);
                var    ocode     = lp.Search <ViewOrganization>(b => b.ID == bill.OrganizationID).Select(o => o.Code).First();
                maxCode = prefixion + ocode + "-" + time.ToString("yyyyMMdd") + "000";
            }
            int preLength = maxCode.Length - 3;

            return(maxCode.Substring(0, preLength) + (Convert.ToInt32(maxCode.Substring(preLength)) + 1).ToString("000"));
        }
Example #9
0
 public ProductController(IProductService productService, IProductCategoryService productCategoryService, IBillService billService, IMapper mapper, IConfiguration configuration)
 {
     _productService         = productService;
     _productCategoryService = productCategoryService;
     _billService            = billService;
     _mapper        = mapper;
     _configuration = configuration;
 }
Example #10
0
 public InsertarEmpresaPresenter(IInsertarEmpresaView view, IBillsSystemContext billsSystemContext, IBillService billService, ICompanyService companyService)
     : base(view, billsSystemContext, billService, companyService)
 {
     this.View.OnInsertCompany    += View_OnInsertCompany;
     this.View.OnServerValidation += View_OnServerValidation;
 }
Example #11
0
 public BillsController(IBillService billService, IMapper mapper)
 {
     this.mapper      = mapper;
     this.billService = billService;
 }
 public BillController(IBillService service)
 {
     _service = service;
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 public BillsController(
     UserManager <ApplicationUser> userManager,
     IBillService billService) : base(userManager)
 {
     _billService = billService;
 }
Example #14
0
 public PersonController(IBillService billService)
 {
     this._billService = billService;
 }
 public BillHistoryController(IBillService billService)
 {
     this._billService = billService;
 }
 public BillServiceController(IBillService billService, IBuildingService buildingService, IServicesService servicesService) : base(buildingService)
 {
     _billService     = billService;
     _buildingService = buildingService;
     _servicesService = servicesService;
 }
Example #17
0
 public BillController(IBillService billService)
 {
     this.billService = billService;
 }
Example #18
0
 public GenerateBillEventHandler(IBillService billService)
 {
     _billService = billService;
 }
Example #19
0
 public BillController(IBillService billService, IWebHostEnvironment webHostEnvironment)
 {
     _billService        = billService;
     _webHostEnvironment = webHostEnvironment;
 }
Example #20
0
 public BlogController(IBlogService BlogService, IConfiguration configuration, IOptions <CloudinaryImage> cloudinaryConfig, IHostingEnvironment hostingEnvironment, IBlogCategoryService BlogCategoryService, IBillService billService)
 {
     _blogService         = BlogService;
     _configuration       = configuration;
     _hostingEnvironment  = hostingEnvironment;
     _blogCategoryService = BlogCategoryService;
     _billService         = billService;
 }
Example #21
0
 public ProductController(IProductService productService, IConfiguration configuration, IHostingEnvironment hostingEnvironment, IProductCategoryService productCategoryService, IBillService billService, IAuthorizationService authorizationService)
 {
     _productService         = productService;
     _configuration          = configuration;
     _hostingEnvironment     = hostingEnvironment;
     _productCategoryService = productCategoryService;
     _billService            = billService;
     _authorizationService   = authorizationService;
 }
 public BillsController(IBillService billservice, IMapper mapper)
 {
     _billservice = billservice;
     _mapper      = mapper;
 }
Example #23
0
 public BillController(IBillService billService, IAuthorizationService authorizationService)
 {
     _billService          = billService;
     _authorizationService = authorizationService;
 }
Example #24
0
 public BillsController(IBillService billService)
 {
     _billService = billService;
 }
Example #25
0
 public GetAllBillByIdQueryHandler(IBillService service, MyContext context)
 {
     _service = service;
     _context = context;
 }
 public BillController(IBillService billService, IHostingEnvironment hostingEnvironment)
 {
     _billService        = billService;
     _hostingEnvironment = hostingEnvironment;
 }
 public HomeController(IRecipientService recipientService, IBillService billService)
 {
     _recipientService = recipientService;
     _billService      = billService;
 }
 void Init()
 {
     this._serviceBill      = new BillService(new BillRepository());
     this._serviceBillInfo  = new BillInfoService(new BillInfoRepository());
     this._serviceTableFood = new TableFoodService(new TableFoodRepository());
 }
Example #29
0
        public SumaFacturasPresenter(ISumaFacturasView view, IBillsSystemContext billsSystemContext, IBillService billService, ICompanyService companyService, ISumBillsService sumBillsService)
            : base(view, billsSystemContext, billService, companyService)
        {
            this.sumBillsService = sumBillsService;

            this.View.OnListView1_GetData += View_OnListView1_GetData;
        }
Example #30
0
 public BillsController(IBillService billService, IBillFactory billFactory, IRecipientService recipientService)
 {
     _billService      = billService;
     _billFactory      = billFactory;
     _recipientService = recipientService;
 }
 public ListaEmpresasPresenter(IListaEmpresasView view, IBillsSystemContext billsSystemContext, IBillService billService, ICompanyService companyService)
     : base(view, billsSystemContext, billService, companyService)
 {
     this.View.OnListView1_GetData    += View_OnListView1_GetData;
     this.View.OnListView1_UpdateItem += View_OnListView1_UpdateItem;
 }
 public DashboardController(IBillService billService, ITenantService tenantService, IDocumentService documentService)
 {
     _billService     = billService;
     _tenantService   = tenantService;
     _documentService = documentService;
 }
Example #33
0
 public BillController(IBillService billService, ILog log)
 {
     _billService = billService;
     _log = log;
 }
Example #34
0
        //private readonly ILogger _logger;

        public MakeController(IBillService billService, UserManager <ApplicationUser> userManager)//, ILogger logger)
        {
            _billService = billService;
            _userManager = userManager;
            //  _logger = logger;
        }
 public AccountController(IAccountService accountService, IBillService billService)
 {
     service          = accountService;
     this.billService = billService;
 }