Example #1
0
 public CampersController(ICamperRepository camperRepository, IRedeemedCouponRepository redeemedCouponRepository,
                          ICustomFieldRepository customFieldRepository, ICamperCustomFieldRepository camperCustomFieldRepository)
 {
     _camperRepository            = camperRepository;
     _customFieldRepository       = customFieldRepository;
     _redeemedCouponRepository    = redeemedCouponRepository;
     _camperCustomFieldRepository = camperCustomFieldRepository;
 }
 public AutomationCampaignProcessor(CronJobDb cronJob, JobService jobService, string cacheName) : base(cronJob, jobService, cacheName)
 {
     campaignService       = IoC.Container.GetInstance <ICampaignService>();
     communicationService  = IoC.Container.GetInstance <ICommunicationService>();
     customFieldRepository = IoC.Container.GetInstance <ICustomFieldRepository>();
     contactRepository     = IoC.Container.GetInstance <IContactRepository>();
     accountService        = IoC.Container.GetInstance <IAccountService>();
 }
Example #3
0
        public void Setup()
        {
            _tenant = new AppTenant("Treeze", "localhost:43500", null, null);

            _pageComponent = new PageComponent("Minha Página");

            _customForms        = new List <CustomForm>();
            _customFields       = new List <CustomField>();
            _customFieldOptions = new List <CustomFieldOption>();
            _formPageComponents = new List <FormPageComponent>();
            _customFormAnswers  = new List <CustomFormAnswer>();

            _mockCustomFormRepository        = new Mock <ICustomFormRepository>();
            _mockCustomFieldRepository       = new Mock <ICustomFieldRepository>();
            _mockCustomFieldOptionRepository = new Mock <ICustomFieldOptionRepository>();
            _mockFormPageComponentRepository = new Mock <IFormPageComponentRepository>();
            _mockCustomFormAnswerRepository  = new Mock <ICustomFormAnswerRepository>();


            _mockCustomFormRepository.Setup(mr => mr.Save(It.IsAny <CustomForm>())).Callback((CustomForm target) =>
            {
                _customForms.Add(target);
                if (target.Fields == null)
                {
                    return;
                }
                foreach (var targetField in target.Fields)
                {
                    _customFields.Add(targetField);

                    if (targetField.Options == null)
                    {
                        continue;
                    }
                    foreach (var targetFieldOption in targetField.Options)
                    {
                        _customFieldOptions.Add(targetFieldOption);
                    }
                }
            });

            _mockCustomFieldRepository.Setup(mr => mr.Save(It.IsAny <CustomField>())).Callback((CustomField target) => { _customFields.Add(target); });
            _mockCustomFieldRepository.Setup(mr => mr.Get(It.IsAny <Guid>())).Returns((Guid id) => _customFields.FirstOrDefault(x => x.Id == id && x.TenantId == _tenant.Id));

            _mockCustomFieldOptionRepository.Setup(mr => mr.Save(It.IsAny <CustomFieldOption>())).Callback((CustomFieldOption target) => { _customFieldOptions.Add(target); });
            _mockFormPageComponentRepository.Setup(mr => mr.Save(It.IsAny <FormPageComponent>())).Callback((FormPageComponent target) => { _formPageComponents.Add(target); });
            _mockCustomFormAnswerRepository.Setup(mr => mr.Save(It.IsAny <CustomFormAnswer>())).Callback((CustomFormAnswer target) => { _customFormAnswers.Add(target); });



            _customFormRepository        = _mockCustomFormRepository.Object;
            _customFieldRepository       = _mockCustomFieldRepository.Object;
            _customFieldOptionRepsitory  = _mockCustomFieldOptionRepository.Object;
            _formPageComponentRepository = _mockFormPageComponentRepository.Object;
            _customFormAnswerRepository  = _mockCustomFormAnswerRepository.Object;

            _handler = new CustomFormsHandler(_tenant, _customFormRepository, _customFieldRepository, _customFieldOptionRepsitory, _formPageComponentRepository, _customFormAnswerRepository);
        }
Example #4
0
        public CustomFieldController(ICustomFieldRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.To <long>();
            this._UserId   = view.UserId.To <int>();
            this._OfficeId = view.OfficeId.To <int>();
            this._Catalog  = catalog;

            this.CustomFieldRepository = repository;
        }
 public NamingController(IIssueTypeRepository issueTypeRepository, ITicketTypeRepository ticketTypeRepository, IDepartmentRepository departmentRepository, IUserService userService, ICustomFieldRepository customFieldRepository, IEmailTemplateRepository emailTemplateRepository)
 {
     _issueTypeRepository     = issueTypeRepository;
     _ticketTypeRepository    = ticketTypeRepository;
     _departmentRepository    = departmentRepository;
     _customFieldRepository   = customFieldRepository;
     _userService             = userService;
     _emailTemplateRepository = emailTemplateRepository;
 }
Example #6
0
        public static void DefineCustomFieldType(ICustomFieldRepository customFieldRepository, string name,
                                                 string dictionaryName, int min, int max, EntityTypeEnum entityType)
        {
            var customfieldType = new CustomFieldType(customFieldRepository.GetNextId(),
                                                      name, dictionaryName, min, max, entityType, "string");

            customFieldRepository.Add(customfieldType);
            DefinedCustomFields.Add(customfieldType);
        }
Example #7
0
 public CustomFormsHandler(AppTenant tenant, ICustomFormRepository customFormRepository, ICustomFieldRepository customFieldRepository, ICustomFieldOptionRepository customFieldOptionRepository, IFormPageComponentRepository formPageComponentRepository, ICustomFormAnswerRepository customFormAnswerRepository)
 {
     _customFormRepository        = customFormRepository;
     _customFieldRepository       = customFieldRepository;
     _customFieldOptionRepository = customFieldOptionRepository;
     _formPageComponentRepository = formPageComponentRepository;
     _customFormAnswerRepository  = customFormAnswerRepository;
     _tenant = tenant;
 }
Example #8
0
        public CustomFieldController(ICustomFieldRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.To<long>();
            this._UserId = view.UserId.To<int>();
            this._OfficeId = view.OfficeId.To<int>();
            this._Catalog = catalog;

            this.CustomFieldRepository = repository;
        }
Example #9
0
 public FindSpamService(IFormRepository formRepository, IServiceProviderRepository serviceProvider, IAccountRepository accountRepository,
                        ICustomFieldRepository customFieldRepository, IAccountService accountService, IUrlService urlService)
 {
     this.formRepository        = formRepository;
     this.serviceProvider       = serviceProvider;
     this.accountRepository     = accountRepository;
     this.customFieldRepository = customFieldRepository;
     //this.formService = formService;
     this.accountService = accountService;
     this.urlService     = urlService;
 }
Example #10
0
 public JobFacadeService(IJobRepository jobRep, ICustomFieldRepository customFieldRep, IMapper <Job, JobDTO> jobMapper,
                         IMapper <Job, JobDTOWithActions> jobWithActionsMapper,
                         IMapper <CustomFieldType, CustomFieldDTO> customFieldDtoMapper,
                         IJobService jobService)
 {
     this.jobRep                 = jobRep;
     this.customFieldRep         = customFieldRep;
     this.jobMapper              = jobMapper;
     this.jobWithActionsMapper   = jobWithActionsMapper;
     this.ctcustomFieldDtoMapper = customFieldDtoMapper;
     this.jobService             = jobService;
 }
Example #11
0
 public CustomFieldFacadeService(IMapper <CustomFieldType, CustomFieldDTOWithActions> customFieldWithActionMapper,
                                 IMapper <CustomFieldType, CustomFieldDTO> customFieldMapper,
                                 //IMapper<CustomFieldType, CustomFieldDTO> abstractCustomFieldDTOMapper,
                                 IMapper <CustomFieldType, AbstractCustomFieldDescriptionDTO> abstractCustomFieldDescriptionDTOMapper,
                                 ICustomFieldService customFieldService,
                                 ICustomFieldRepository customFieldRep)
 {
     this.customFieldWithActionMapper             = customFieldWithActionMapper;
     this.customFieldMapper                       = customFieldMapper;
     this.abstractCustomFieldDescriptionDTOMapper = abstractCustomFieldDescriptionDTOMapper;
     this.customFieldService                      = customFieldService;
     this.customFieldRep = customFieldRep;
 }
        protected override void Initialize(HttpControllerContext context)
        {
            base.Initialize(context);

            if (this.CustomFieldRepository == null)
            {
                this.CustomFieldRepository = new Frapid.Config.DataAccess.CustomField
                {
                    _Catalog = this.MetaUser.Catalog,
                    _LoginId = this.MetaUser.LoginId,
                    _UserId = this.MetaUser.UserId
                };
            }
        }
Example #13
0
        public CustomFieldController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.To<long>();
            this._UserId = AppUsers.GetCurrent().View.UserId.To<int>();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.To<int>();
            this._Catalog = AppUsers.GetCatalog();

            this.CustomFieldRepository = new Frapid.Config.DataAccess.CustomField
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
Example #14
0
 public UnitFacadeService(IMapper <Unit, UnitDTOWithActions> unitWithActionMapper,
                          IMapper <Unit, UnitDTO> unitMapper,
                          IUnitService unitService,
                          IUnitRepository unitRep,
                          ICustomFieldRepository customFieldRep,
                          IMapper <CustomFieldType, CustomFieldDTO> ctcustomFieldDtoMapper)
 {
     this.unitWithActionMapper = unitWithActionMapper;
     this.unitMapper           = unitMapper;
     this.unitService          = unitService;
     this.unitRep                = unitRep;
     this.customFieldRep         = customFieldRep;
     this.ctcustomFieldDtoMapper = ctcustomFieldDtoMapper;
 }
        public CustomFieldController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog = AppUsers.GetCurrentUserDB();

            this.CustomFieldRepository = new MixERP.Net.Schemas.Core.Data.CustomField
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
Example #16
0
        public CustomFieldController()
        {
            this._LoginId  = AppUsers.GetCurrent().View.LoginId.To <long>();
            this._UserId   = AppUsers.GetCurrent().View.UserId.To <int>();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.To <int>();
            this._Catalog  = AppUsers.GetCatalog();

            this.CustomFieldRepository = new Frapid.Config.DataAccess.CustomField
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId  = this._UserId
            };
        }
Example #17
0
        public CustomFieldController()
        {
            this._LoginId  = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId   = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog  = AppUsers.GetCurrentUserDB();

            this.CustomFieldRepository = new MixERP.Net.Schemas.Core.Data.CustomField
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId  = this._UserId
            };
        }
Example #18
0
 public JobIndexFacadeService(
     IJobIndexService jobIndexService,
     ICustomFieldRepository customFieldRep,
     IMapper <AbstractJobIndex, AbstractIndex> jobIndexMapper,
     IMapper <AbstractJobIndex, AbstractJobIndexDTOWithActions> jobIndexWithActionsMapper,
     IMapper <CustomFieldType, CustomFieldDTO> customFieldDtoMapper,
     IJobIndexRepository jobIndexRep
     )
 {
     this.jobIndexService           = jobIndexService;
     this.customFieldRep            = customFieldRep;
     this.jobIndexMapper            = jobIndexMapper;
     this.jobIndexWithActionsMapper = jobIndexWithActionsMapper;
     this.customFieldDtoMapper      = customFieldDtoMapper;
     this.jobIndexRep = jobIndexRep;
 }
Example #19
0
 public UnitIndexFacadeService(
     IUnitIndexService unitIndexService,
     ICustomFieldRepository customFieldRep,
     IMapper <AbstractUnitIndex, AbstractIndex> unitIndexMapper,
     IMapper <AbstractUnitIndex, AbstractUnitIndexDTOWithActions> unitIndexWithActionsMapper,
     IMapper <CustomFieldType, CustomFieldDTO> customFieldDtoMapper,
     IUnitIndexRepository unitIndexRep
     )
 {
     this.unitIndexService           = unitIndexService;
     this.customFieldRep             = customFieldRep;
     this.unitIndexMapper            = unitIndexMapper;
     this.unitIndexWithActionsMapper = unitIndexWithActionsMapper;
     this.customFieldDtoMapper       = customFieldDtoMapper;
     this.unitIndexRep = unitIndexRep;
 }
 public RegisterController(IGroupRepository groupRepository, IEventRepository eventRepository,
                           ICamperRepository camperRepository, ICouponRepository couponRepository,
                           IRegistrationRepository registrationRepository, IRedeemedCouponRepository redeemedCouponRepository,
                           IPaymentDonationRepository paymentDonationRepository, ICustomFieldRepository customFieldRepository,
                           ICamperCustomFieldRepository camperCustomFieldRepository)
 {
     _groupRepository             = groupRepository;
     _eventRepository             = eventRepository;
     _camperRepository            = camperRepository;
     _couponRepository            = couponRepository;
     _customFieldRepository       = customFieldRepository;
     _registrationRepository      = registrationRepository;
     _redeemedCouponRepository    = redeemedCouponRepository;
     _paymentDonationRepository   = paymentDonationRepository;
     _camperCustomFieldRepository = camperCustomFieldRepository;
 }
 public AutomationCampaignJob(
     ICampaignService campaignService,
     ICommunicationService communicationService,
     ICustomFieldRepository customFieldRepository,
     IContactRepository contactRepository,
     IAccountService accountService,
     MailService mailService,
     JobServiceConfiguration jobConfig)
 {
     _campaignService       = campaignService;
     _communicationService  = communicationService;
     _customFieldRepository = customFieldRepository;
     _contactRepository     = contactRepository;
     _accountService        = accountService;
     _mailService           = mailService;
     _jobConfig             = jobConfig;
 }
Example #22
0
        public DataService(
            AppDbContext db,
            IPostRepository postRepository,
            IAuthorRepository authorRepository,
            INotificationRepository notificationRepository,
            IHtmlWidgetRepository htmlWidgetRepository,
            ICustomFieldRepository customFieldRepository,
            INewsletterRepository newsletterRepository)
        {
            _db = db;

            BlogPosts     = postRepository;
            Authors       = authorRepository;
            Notifications = notificationRepository;
            HtmlWidgets   = htmlWidgetRepository;
            CustomFields  = customFieldRepository;
            Newsletters   = newsletterRepository;
        }
Example #23
0
 public CampaignJob(
     ICampaignService campaignService,
     ICommunicationService communicationService,
     ICustomFieldRepository customFieldRepository,
     ISocialIntegrationService socialIntegrationService,
     IAccountService accountService,
     EmailValidator emailValidator,
     MailService mailService,
     JobServiceConfiguration jobConfig)
 {
     _campaignService          = campaignService;
     _communicationService     = communicationService;
     _accountService           = accountService;
     _emailValidator           = emailValidator;
     _customFieldRepository    = customFieldRepository;
     _socialIntegrationService = socialIntegrationService;
     _mailService = mailService;
     _jobConfig   = jobConfig;
 }
Example #24
0
 public DropDownController(IIconRepository iconRepository, IProductRepository productRepository, IProductCategoryRepository productCategoryRepository, IUserService userService,
                           IDepartmentRoleRepository departmentRoleRepository, IDatabaseRepository databaseRepository, ICustomFieldRepository customFieldRepository, IDepartmentRepository departmentRepository,
                           IIssueTypeRepository issueTypeRepository, ITicketTypeRepository ticketTypeRepository, IEmailTemplateRepository emailTemplateRepository,
                           ICustomerPriorityRepository customerPriorityRepository, ITicketStatusRepository ticketStatusRepository, ITicketRepository ticketRepository)
 {
     _iconRepository           = iconRepository;
     _productRepository        = productRepository;
     _departmentRoleRepository = departmentRoleRepository;
     _userService = userService;
     _productCategoryRepository  = productCategoryRepository;
     _databaseRepository         = databaseRepository;
     _customFieldRepository      = customFieldRepository;
     _departmentRepository       = departmentRepository;
     _issueTypeRepository        = issueTypeRepository;
     _ticketTypeRepository       = ticketTypeRepository;
     _emailTemplateRepository    = emailTemplateRepository;
     _customerPriorityRepository = customerPriorityRepository;
     _ticketStatusRepository     = ticketStatusRepository;
     _ticketRepository           = ticketRepository;
 }
Example #25
0
 public LeadAdapterService(ILeadAdaptersRepository leadAdaptersRepository,
                           ILeadAdaptersJobLogsRepository leadAdaptersJobLogsRepository, ITagRepository tagRepository,
                           IUnitOfWork unitOfWork, ICustomFieldService customfieldService, ICustomFieldRepository customfieldRepository, IAccountRepository accountRepository)
 {
     if (leadAdaptersRepository == null)
     {
         throw new ArgumentNullException("leadAdapterRepository");
     }
     if (unitOfWork == null)
     {
         throw new ArgumentNullException("unitOfWork");
     }
     this.indexingService               = new IndexingService();
     this.leadAdaptersRepository        = leadAdaptersRepository;
     this.leadAdaptersJobLogsRepository = leadAdaptersJobLogsRepository;
     this.tagRepository         = tagRepository;
     this.customfieldService    = customfieldService;
     this.customfieldRepository = customfieldRepository;
     this.accountRepository     = accountRepository;
     this.unitOfWork            = unitOfWork;
 }
Example #26
0
 public CustomFieldService(ICustomFieldRepository customFieldRep)
 {
     this.customFieldRep = customFieldRep;
 }
 public CustomFieldsController(ICustomFieldRepository repository)
 {
     this.repository = repository;
 }
Example #28
0
 public CustomFieldController(ICustomFieldRepository customeFieldRepository)
 {
     _customeFieldRepository = customeFieldRepository;
 }
Example #29
0
 public PostRepository(AppDbContext db, ICustomFieldRepository customFieldRepository) : base(db)
 {
     _db = db;
     _customFieldRepository = customFieldRepository;
 }
 public CustomFieldService(ICustomFieldRepository customFieldRepository, IUnitOfWork unitOfWork, ITagRepository tagRepository)
 {
     this.customFieldRepository = customFieldRepository;
     this.unitOfWork            = unitOfWork;
     this.tagRepository         = tagRepository;
 }
Example #31
0
 public UnitIndexService(IUnitIndexRepository unitIndexRep
                         , ICustomFieldRepository customFieldRep)
 {
     this.unitIndexRep   = unitIndexRep;
     this.customFieldRep = customFieldRep;
 }
Example #32
0
 public JobIndexService(IJobIndexRepository jobIndexRep
                        , ICustomFieldRepository customFieldRep)
 {
     this.jobIndexRep    = jobIndexRep;
     this.customFieldRep = customFieldRep;
 }
 public CustomFieldsController(ICustomFieldRepository repository)
 {
     this.repository = repository;
 }
Example #34
0
 public CustomFieldService(ICustomFieldRepository customFieldRepository)
 {
     this.customFieldRepository = customFieldRepository;
 }