Exemplo n.º 1
0
 public HomeController(IUserService userService, IRoleService roleService, IMenuService menuService, ILedgerAccountService ledgerAccountService)
 {
     this.userService          = userService;
     this.roleService          = roleService;
     this.menuService          = menuService;
     this.ledgerAccountService = ledgerAccountService;
 }
 public LedgerAccountsController(ECERPDbContext dbContext,
                                 SignInManager <ApplicationUser> signInManager,
                                 UserManager <ApplicationUser> userManager,
                                 ILedgerAccountService ledgerAccountService) : base(dbContext, signInManager, userManager)
 {
     _ledgerAccountService = ledgerAccountService;
 }
Exemplo n.º 3
0
        public LedgerAccountOpeningController(ILedgerAccountOpeningService LedgerAccountOpening, ILedgerAccountService LedgerAccount, IUnitOfWork unitOfWork, IExceptionHandlingService exec)
        {
            _LedgerAccountOpeningService = LedgerAccountOpening;
            _LedgerAccountService        = LedgerAccount;
            _unitOfWork = unitOfWork;
            _exception  = exec;

            UserRoles = (List <string>)System.Web.HttpContext.Current.Session["Roles"];
        }
 public LedgerTransactionsController(ECERPDbContext dbContext,
                                     SignInManager <ApplicationUser> signInManager,
                                     UserManager <ApplicationUser> userManager,
                                     ILedgerTransactionService transactionService,
                                     IChartOfAccountsService chartOfAccountsService,
                                     ILedgerAccountService ledgerAccountService) : base(dbContext, signInManager, userManager)
 {
     _ledgerTransactionService = transactionService;
     _chartOfAccountsService   = chartOfAccountsService;
     _ledgerAccountService     = ledgerAccountService;
 }
        public LedgerAccountController(ILedgerAccountService LedgerAccountService, IUnitOfWork unitOfWork, IExceptionHandlingService exec)
        {
            _LedgerAccountService = LedgerAccountService;
            _unitOfWork           = unitOfWork;
            _exception            = exec;

            //Log Initialization
            LogVm.SessionId      = 0;
            LogVm.ControllerName = System.Web.HttpContext.Current.Request.RequestContext.RouteData.GetRequiredString("controller");
            LogVm.ActionName     = System.Web.HttpContext.Current.Request.RequestContext.RouteData.GetRequiredString("action");
            LogVm.User           = System.Web.HttpContext.Current.Request.RequestContext.HttpContext.User.Identity.Name;
        }
        public LedgerAccountServiceTests()
        {
            _mockRepo = new Mock <IRepository>();

            _mockRepo.Setup(
                x =>
                x.Get(It.IsAny <Expression <Func <LedgerAccount, bool> > >(), null, null, null,
                      It.IsAny <Expression <Func <LedgerAccount, object> >[]>()))
            .Returns(new List <LedgerAccount>());

            _mockRepo.Setup(
                x =>
                x.Get(It.IsAny <Expression <Func <LedgerAccount, bool> > >(), null, 0, int.MaxValue,
                      It.IsAny <Expression <Func <LedgerAccount, object> >[]>()))
            .Returns(this.GetTestLedgerAccounts());

            _mockRepo.Setup(
                x =>
                x.Get(It.IsAny <Expression <Func <LedgerAccount, bool> > >(), null, 0, 5,
                      It.IsAny <Expression <Func <LedgerAccount, object> >[]>()))
            .Returns(this.GetTestLedgerAccounts().Take(5));

            _mockRepo.Setup(x => x.GetById(It.IsAny <object>(), It.IsAny <Expression <Func <LedgerAccount, object> >[]>()))
            .Returns(this.GetTestLedgerAccount);

            _mockRepo.Setup(x => x.GetOne(It.IsAny <Expression <Func <LedgerAccount, bool> > >()))
            .Returns(this.GetTestLedgerAccount());

            _mockRepo.SetupSequence(x => x.GetOne(It.IsAny <Expression <Func <LedgerAccountBalance, bool> > >()))
            .Returns(null)
            .Returns(this.GetTestLedgerAccountBalance())
            .Returns(this.GetTestLedgerAccountBalance());

            _mockRepo.Setup(
                x =>
                x.Get(It.IsAny <Expression <Func <LedgerTransactionLine, bool> > >(), null, null, null,
                      It.IsAny <Expression <Func <LedgerTransactionLine, object> >[]>()))
            .Returns(this.GetTestAccountLedgerTransactionLines);
            _ledgerAccountService = new LedgerAccountService(_mockRepo.Object);
        }
Exemplo n.º 7
0
 public CompanyService(IRepository repository, ILedgerAccountService ledgerAccountService)
 {
     _repository           = repository;
     _ledgerAccountService = ledgerAccountService;
 }
 public LedgerAccountController(ILedgerAccountService ledgerAccountService, IMapping mapping)
 {
     this.ledgerAccountService = ledgerAccountService;
     this.mapping = mapping;
 }
 public SupplierSubscriptionService(IRepository repository,
                                    ILedgerAccountService ledgerAccountService)
 {
     _repository           = repository;
     _ledgerAccountService = ledgerAccountService;
 }
 public AccountTransactionController(IAccountTransactionService accountTransactionService, ILedgerAccountService ledgerAccountService, IMapping mapping)
 {
     this.accountTransactionService = accountTransactionService;
     this.mapping = mapping;
     this.ledgerAccountService = ledgerAccountService;
 }