public CompanyController(
     ICompanyManager companyManager,
     ICompanyEmployeeManager companyEmployeeManager)
 {
     _companyManager         = companyManager ?? throw new ArgumentNullException(nameof(companyManager));
     _companyEmployeeManager = companyEmployeeManager ?? throw new ArgumentNullException(nameof(companyEmployeeManager));
 }
 public SubscriptionManager(ISubscriptionRepository subscriptionRepository, ICompanyManager companyManager)
     : base(subscriptionRepository)
 {
     _subscriptionRepository = subscriptionRepository;
     _companyManager         = companyManager;
     StripeConfiguration.SetApiKey(ConfigUtil.StripeApiKey);
 }
 public LoginController(IBranchManager iBranchManager, ICompanyManager iCompanyManager, ICommonManager iCommonManager, IEmployeeManager iEmployeeManager)
 {
     _iBranchManager   = iBranchManager;
     _iCompanyManager  = iCompanyManager;
     _iCommonManager   = iCommonManager;
     _iEmployeeManager = iEmployeeManager;
 }
        public ReportBusinessManager(IMapper mapper, ICompanyManager companyManager,
                                     ICustomerManager customerManager,
                                     ICustomerActivityManager customerActivityManager,
                                     ICustomerCreditUtilizedManager customerCreditUtilizedManager,

                                     ISavedReportFactManager savedReportFactManager,
                                     ISavedReportFieldManager savedReportFieldManager,
                                     ISavedReportFileManager savedReportFileManager,

                                     ISavedReportPlanManager savedReportPlanManager,
                                     ISavedReportPlanFieldManager savedReportPlanFieldManager,

                                     ICrudBusinessManager businessManager,
                                     IReportManager reportManager
                                     )
        {
            _mapper                        = mapper;
            _companyManager                = companyManager;
            _customerManager               = customerManager;
            _customerActivityManager       = customerActivityManager;
            _customerCreditUtilizedManager = customerCreditUtilizedManager;

            _savedReportFactManager  = savedReportFactManager;
            _savedReportFieldManager = savedReportFieldManager;
            _savedReportFileManager  = savedReportFileManager;

            _savedReportPlanManager      = savedReportPlanManager;
            _savedReportPlanFieldManager = savedReportPlanFieldManager;

            _businessManager = businessManager;
            _reportManager   = reportManager;
        }
 public MetricsController(ICompanyManager companyManager,
                          IMetricManager metricManager, ListHelper listHelper)
 {
     _companyManager = companyManager;
     _metricManager  = metricManager;
     ListHelper      = listHelper;
 }
Beispiel #6
0
 public UserRegistrationManager(
     TenantManager tenantManager,
     IUserManager userManager,
     RoleManager roleManager,
     IUserEmailer userEmailer,
     INotificationSubscriptionManager notificationSubscriptionManager,
     IAppNotifier appNotifier,
     IUserPolicy userPolicy,
     IPasswordHasher <User> passwordHasher,
     CompanyManager companyManager,
     IRepository <TermsOfService, long> termsOfServicesRepository,
     IRepository <Friendship, long> friendshipRepository)
 {
     _tenantManager = tenantManager;
     _userManager   = userManager;
     _roleManager   = roleManager;
     _userEmailer   = userEmailer;
     _notificationSubscriptionManager = notificationSubscriptionManager;
     _appNotifier               = appNotifier;
     _userPolicy                = userPolicy;
     _passwordHasher            = passwordHasher;
     _companyManager            = companyManager;
     AbpSession                 = NullAbpSession.Instance;
     _termsOfServicesRepository = termsOfServicesRepository;
     _friendshipRepository      = friendshipRepository;
 }
Beispiel #7
0
 public StocksController(IStocksManager stocksManager,
                         ICompanyManager companyManager, ILogger <StocksController> logger)
 {
     _stocksManager  = stocksManager;
     _companyManager = companyManager;
     _logger         = logger;
 }
 public CompanyValidator(ICompanyManager manager, ValidationMode mode) : base(manager, mode)
 {
     RuleFor(company => company.CompanyName)
     .MustAsync(async(x, token) => await manager.GetByName(x) == null)
     .When(x => HasFlag(ValidationMode.Add | ValidationMode.Update | ValidationMode.DataRelevance))
     .WithMessage("Company with name {PropertyValue} is already exists");
 }
Beispiel #9
0
 public CommandManager(ICompanyManager companyManager)
 {
     this.CompanyManager = companyManager;
     this.commandList = new List<ICommand>();
     this.CommandFactory = new CommandFactory(companyManager);
     this.InitilizeTemplateCommands();
 }
Beispiel #10
0
 public OrganizationController(ICountryManager countryManager, ICompanyManager companyManager, IUserManagerWrapper <ApplicationUser> userManager, ILoggerFactory loggerFactory)
 {
     _countryManager = countryManager;
     _companyManager = companyManager;
     _userManager    = userManager;
     _logger         = loggerFactory.CreateLogger(nameof(OrganizationController));
 }
Beispiel #11
0
 public AdminsModel(
     ICompanyManager _companyManager,
     UserManager <User> _userManager)
 {
     this.companyManager = _companyManager;
     this.userManager    = _userManager;
 }
 public HomeController(IReportManager reportManager, IMetricManager metricManager, ICompanyManager companyManager, ListHelper listHelper)
 {
     _reportManager  = reportManager;
     _metricManager  = metricManager;
     _companyManager = companyManager;
     ListHelper      = listHelper;
 }
Beispiel #13
0
        public void SetUp()
        {
            _loggerFactory      = Mock.Of <ILoggerFactory>();
            _countryManagerMock = Mock.Of <ICountryManager>();
            _userManagerMock    = Mock.Of <IUserManagerWrapper <ApplicationUser> >();
            _companyManagerMock = Mock.Of <ICompanyManager>();
            _currentUser        = new ApplicationUser()
            {
                Id       = Guid.NewGuid().ToString(),
                UserName = "******",
                Email    = "*****@*****.**"
            };

            Mock.Get(_countryManagerMock)
            .Setup(x => x.GetCountries())
            .Returns(new List <CountryBo> {
                new CountryBo
                {
                    IsoCountryCode = "US",
                    Name           = "United States"
                }
            });

            Mock.Get(_userManagerMock)
            .Setup(x => x.GetUserAsync(_controller.User).Result)
            .Returns(_currentUser);

            _controller = new OrganizationController(_countryManagerMock, _companyManagerMock, _userManagerMock, _loggerFactory);
        }
 private List <SelectListItem> TransformCompanies(ICompanyManager manager)
 {
     return(manager.GetCompanies().Select(x => new SelectListItem
     {
         Value = x.Id.ToString(),
         Text = x.Name
     }).ToList());
 }
Beispiel #15
0
 public AdminManager(ICloudStorage cloudStorage, IAdminRepository adminRepository,
                     ICompanyManager companyManager, IGenericEmailManager genericEmailManager)
 {
     _cloudStorage        = cloudStorage;
     _adminRepository     = adminRepository;
     _companyManager      = companyManager;
     _genericEmailManager = genericEmailManager;
 }
Beispiel #16
0
 public DataSourcesController(IExternalApiAuthManager externalApiAuthManager, ICompanyManager companyManager, IGoogleAuthorizer googleAuthorizer, ListHelper listHelper)
     : base(ownerAccessOnly: true)
 {
     _externalApiAuthManager = externalApiAuthManager;
     _companyManager         = companyManager;
     _googleAuthorizer       = googleAuthorizer;
     ListHelper = listHelper;
 }
Beispiel #17
0
        //[TestMethod]
        public void DeleteCompany()
        {
            ICompanyManager cManager = DaoFactory.GetCompanyManager();
            Company         _company = new Company();

            _company.Id = 1;
            cManager.DeleteCompanyById(_company);
        }
Beispiel #18
0
 public AccountController(ICompanyManager companyManager, IAdminManager adminManager, IGenericEmailManager genericEmailManager, ISubscriptionManager subscriptionManager, ITermsAndConditionsManager termsAndConditionsManager)
 {
     _companyManager            = companyManager;
     _adminManager              = adminManager;
     _genericEmailManager       = genericEmailManager;
     _subscriptionManager       = subscriptionManager;
     _termsAndConditionsManager = termsAndConditionsManager;
 }
Beispiel #19
0
 public SettingsController(ICompanyManager companyManager, ILogoManager logoManager, IWebhookManager webhookManager, ISlackManager slackManager, ListHelper listHelper)
     : base(ownerAccessOnly: true)
 {
     _webhookManager = webhookManager;
     _slackManager   = slackManager;
     _companyManager = companyManager;
     _logoManager    = logoManager;
     ListHelper      = listHelper;
 }
 public ProfileViewModel(ProfileViewModel model, ICompanyManager companyManager)
 {
     FirstName      = model.FirstName;
     LastName       = model.LastName;
     Email          = model.Email;
     CompanyId      = model.CompanyId;
     Companies      = TransformCompanies(companyManager);
     IsCompanyAdmin = model.IsCompanyAdmin;
 }
Beispiel #21
0
 public OrdersController(IUnitOfWork unitOfWork, IMemoryCache memoryCache, IMapper mapper, ICompanyManager companyManager, IConfiguration configuration, ILogger <OrdersController> logger)
 {
     this.unitOfWork     = unitOfWork;
     this.memoryCache    = memoryCache;
     this.companyManager = companyManager;
     this.configuration  = configuration;
     this.mapper         = mapper;
     this.logger         = logger;
 }
 public ProfileViewModel(ApplicationUser user, ICompanyManager companyManager)
 {
     FirstName      = user.FirstName;
     LastName       = user.LastName;
     Email          = user.Email;
     CompanyId      = user.CompanyId;
     Companies      = TransformCompanies(companyManager);
     IsCompanyAdmin = companyManager.IsUserCompanyAdmin(user.Id, user.CompanyId);
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="companyRepository"></param>
 /// <param name="companyManager"></param>
 /// <param name="companyAvatarsManager"></param>
 public CompanyController(ILogger <CompanyController> logger,
                          ICompanyRepository companyRepository,
                          ICompanyManager companyManager,
                          ICompanyAvatarsManager companyAvatarsManager)
 {
     _logger                = logger ?? throw new ArgumentNullException(nameof(logger));
     _companyRepository     = companyRepository ?? throw new ArgumentNullException(nameof(companyRepository));
     _companyManager        = companyManager ?? throw new ArgumentNullException(nameof(companyManager));
     _companyAvatarsManager = companyAvatarsManager ?? throw new ArgumentNullException(nameof(companyAvatarsManager));
 }
 public DiscussionManager(IDiscussionRepository discussionRepository, ICompanyManager companyManager,
                          IGenericEmailManager genericEmailManager, IReportEmailManager reportEmailManager, IWebhookManager webhookManager)
     : base(discussionRepository)
 {
     _dicussionRepository = discussionRepository;
     _companyManager      = companyManager;
     _genericEmailManager = genericEmailManager;
     _reportEmailManager  = reportEmailManager;
     _webhookManager      = webhookManager;
 }
Beispiel #25
0
 public ExternalApiAuthManager(IExternalApiAuthRepository externalApiAuthRepository,
                               IChartMogulApiManager chartMogulApiManager, IGoogleAnalyticsApiManager googleAnalyticsApiManager,
                               ICompanyManager companyManager)
     : base(externalApiAuthRepository)
 {
     _externalApiAuthRepository = externalApiAuthRepository;
     _googleAnalyticsApiManager = googleAnalyticsApiManager;
     _chartMogulApiManager      = chartMogulApiManager;
     _companyManager            = companyManager;
 }
Beispiel #26
0
 public ProfileModel(
     UserManager <User> userManager,
     SignInManager <User> signInManager,
     ICompanyManager companyManager,
     IReservationManager reservationManager)
 {
     _userManager        = userManager;
     _signInManager      = signInManager;
     _companyManager     = companyManager;
     _reservationManager = reservationManager;
 }
 public ServiceProviderManager(ILogger <ServiceProviderManager> logger,
                               ITenantRepository serviceProviderRepository,
                               ICompanyManager companyManager)
 {
     _logger = logger ??
               throw new ArgumentNullException(nameof(logger));
     _serviceProviderRepository = serviceProviderRepository ??
                                  throw new ArgumentNullException(nameof(_serviceProviderRepository));
     _companyManager = companyManager ??
                       throw new ArgumentNullException(nameof(_companyManager));
 }
Beispiel #28
0
 public ReportEmailManager(IReportEmailRepository reportEmailRepository, ICompanyManager companyManager,
                           IGenericEmailManager genericEmailManager, ITemplateManager templateManager, IRecipientManager recipientManager,
                           IReportManager reportManager, IWebhookManager webhookManager)
     : base(reportEmailRepository)
 {
     _genericEmailManager   = genericEmailManager;
     _templateManager       = templateManager;
     _companyManager        = companyManager;
     _reportEmailRepository = reportEmailRepository;
     _reportManager         = reportManager;
     _recipientManager      = recipientManager;
     _webhookManager        = webhookManager;
 }
Beispiel #29
0
        //[TestMethod]
        public void SaveCompany()
        {
            ICompanyManager cManager = DaoFactory.GetCompanyManager();
            Company         _company = new Company();

            _company.CompanyName   = "Bhim and kalu company";
            _company.ContactPerson = "Bhim kunwar";
            _company.Email         = "*****@*****.**";
            _company.IsActive      = true;
            _company.JoinedDate    = DateTime.Now;
            _company.ValidTillDate = DateTime.Now;
            cManager.SaveCompany(_company);
        }
Beispiel #30
0
 public AddCarModel(
     ICarManager _carManager,
     UserManager <User> _userManager,
     ICompanyManager _companyManager,
     ILocationManager _locationManager,
     IHostingEnvironment _environment)
 {
     carManager      = _carManager;
     userManager     = _userManager;
     companyManager  = _companyManager;
     locationManager = _locationManager;
     environment     = _environment;
 }
Beispiel #31
0
 public LocationsModel(
     ICompanyManager _companyManager,
     ILocationManager _locationManager
     )
 {
     companyManager  = _companyManager;
     locationManager = _locationManager;
     AllCountries    = locationManager.GetAllCountries().Select(c => new SelectListItem
     {
         Text  = c.ToString(),
         Value = c.ToString()
     });
 }
 public void SetUp()
 {
     try
     {
         log4net.Config.XmlConfigurator.Configure();
         IApplicationContext applicationContext = ContextRegistry.GetContext();
         companyManager = (ICompanyManager)applicationContext.GetObject("CompanyManager");
     }
     catch (Exception ex)
     {
         logger.Error(ex);
         throw ex;
     }
 }
        public XF_CompanyNewEdit(ICompanyManager manager)
        {
            InitializeComponent();

            if (manager == null)
                throw new ArgumentNullException("manager");

            this.Manager = manager;
            this.Load += XF_CompanyNewEdit_Load;
            gridViewLocations.RowCellClick += gridViewLocations_RowCellClick;
            gridViewLocations.InitNewRow += gridViewLocations_InitNewRow;
            gridViewLicense.InitNewRow += gridViewLicense_InitNewRow;
            gridViewInvoice.InitNewRow += gridViewInvoice_InitNewRow;
        }
Beispiel #34
0
 public CommandFactory(ICompanyManager companyManager)
 {
     this.CompanyManager = companyManager;
 }
 public CreateCompanyCommand(ICompanyManager companyManager)
     : base(companyManager)
 {
 }
 public CreateEmployeeCommand(ICompanyManager companyManager)
     : base(companyManager)
 {
 }
 public CreateDepartmentCommand(ICompanyManager companyManager)
     : base(companyManager)
 {
 }
Beispiel #38
0
 public PaySalaryCommand(ICompanyManager companyManager)
     : base(companyManager)
 {
 }
Beispiel #39
0
 protected Command(ICompanyManager companyManager)
 {
     this.CompanyManager = companyManager;
 }