예제 #1
0
 public CustomerDao(MardisContext mardisContext)
     : base(mardisContext)
 {
     _channelBusiness         = new ChannelDao(mardisContext);
     _typeBusinessBusiness    = new TypeBusinessDao(mardisContext);
     _productCategoryBusiness = new ProductCategoryDao(mardisContext);
 }
예제 #2
0
 public CampaignController(
     UserManager <ApplicationUser> userManager,
     IHttpContextAccessor httpContextAccessor,
     MardisContext mardisContext,
     ILogger <CampaignController> logger,
     ILogger <ServicesFilterController> loggeFilter,
     IDataProtectionProvider protectorProvider,
     IMemoryCache memoryCache,
     IHostingEnvironment hostingEnvironment,
     RedisCache distributedCache) :
     base(userManager, httpContextAccessor, mardisContext, logger)
 {
     Protector                         = protectorProvider.CreateProtector(GetType().FullName);
     _campaignBusiness                 = new CampaignBusiness(mardisContext);
     TableName                         = CCampaign.TableName;
     ControllerName                    = CCampaign.Controller;
     _taskCampaignBusiness             = new TaskCampaignBusiness(mardisContext, distributedCache);
     _commonBusiness                   = new CommonBusiness(mardisContext);
     _customerBusiness                 = new CustomerBusiness(mardisContext);
     _statusCampaignBusiness           = new StatusCampaignBusiness(mardisContext, memoryCache);
     _userBusiness                     = new UserBusiness(mardisContext);
     _channelBusiness                  = new ChannelBusiness(mardisContext);
     _serviceBusiness                  = new ServiceBusiness(mardisContext, distributedCache);
     _statusTaskBusiness               = new StatusTaskBusiness(mardisContext, distributedCache);
     _taskNotImplementedReasonBusiness = new TaskNotImplementedReasonBusiness(mardisContext);
     _hostingEnv                       = hostingEnvironment;
     _profileBusiness                  = new ProfileBusiness(mardisContext);
     if (ApplicationUserCurrent.UserId != null)
     {
         _userId   = new Guid(ApplicationUserCurrent.UserId);
         _Profile  = ApplicationUserCurrent.ProfileId;
         _typeuser = _profileBusiness.GetById(_Profile).IdTypeUser;
     }
 }
 public BranchCustomerDao(MardisContext mardisContext)
     : base(mardisContext)
 {
     _channelDao      = new ChannelDao(mardisContext);
     _typeBusinessDao = new TypeBusinessDao(mardisContext);
     _customerDao     = new CustomerDao(mardisContext);
 }
        public TaskController(UserManager <ApplicationUser> userManager,
                              IHttpContextAccessor httpContextAccessor,
                              MardisContext mardisContext,
                              ILogger <TaskController> logger,
                              ILogger <ServicesFilterController> loggeFilter,
                              IDataProtectionProvider protectorProvider,
                              IMemoryCache memoryCache,
                              RedisCache distributedCache, IHostingEnvironment envrnmt)
            : base(userManager, httpContextAccessor, mardisContext, logger)
        {
            _protector                        = protectorProvider.CreateProtector(GetType().FullName);
            _logger                           = logger;
            ControllerName                    = CTask.Controller;
            TableName                         = CTask.TableName;
            _taskCampaignBusiness             = new TaskCampaignBusiness(mardisContext, distributedCache);
            _statusTaskBusiness               = new StatusTaskBusiness(mardisContext, distributedCache);
            _taskNotImplementedReasonBusiness = new TaskNotImplementedReasonBusiness(mardisContext);
            _branchImageBusiness              = new BranchImageBusiness(mardisContext);
            _userBusiness                     = new UserBusiness(mardisContext);
            _questionBusiness                 = new QuestionBusiness(mardisContext);
            _questionDetailBusiness           = new QuestionDetailBusiness(mardisContext);
            _cache           = memoryCache;
            _serviceBusiness = new ServiceBusiness(mardisContext);
            _Env             = envrnmt;
            if (ApplicationUserCurrent.UserId != null)
            {
                _userId          = new Guid(ApplicationUserCurrent.UserId);
                Global.UserID    = _userId;
                Global.AccountId = ApplicationUserCurrent.AccountId;
                Global.ProfileId = ApplicationUserCurrent.ProfileId;
                Global.PersonId  = ApplicationUserCurrent.PersonId;
            }

            _idAccount = ApplicationUserCurrent.AccountId;
        }
예제 #5
0
 public ProvinceController(MardisContext mardisContext,
                           IMemoryCache distributedCache,
                           ILoggerFactory _loggerFactory)
 {
     _provinceBusiness = new ProvinceBusiness(mardisContext, distributedCache);
     _logger           = _loggerFactory.CreateLogger("Mardis.Engine.Services");
 }
예제 #6
0
 public ServiceDetailDao(MardisContext mardisContext)
     : base(mardisContext)
 {
     _questionDetailDao = new QuestionDetailDao(mardisContext);
     _questionDao       = new QuestionDao(mardisContext);
     _answerDao         = new AnswerDao(mardisContext);
 }
예제 #7
0
 public DistrictController(MardisContext mardisContext,
                           IMemoryCache distributedCache,
                           ILoggerFactory _loggerFactory)
 {
     _districtBusiness = new DistrictBusiness(mardisContext);
     _logger           = _loggerFactory.CreateLogger("Mardis.Engine.Services");
 }
        public QuestionController(UserManager <ApplicationUser> userManager,
                                  IHttpContextAccessor httpContextAccessor,
                                  MardisContext mardisContext,
                                  ILogger <QuestionController> logger,
                                  ILogger <ServicesFilterController> loggeFilter,
                                  IDataProtectionProvider protectorProvider,
                                  IMemoryCache memoryCache,
                                  RedisCache distributedCache)
            : base(userManager, httpContextAccessor, mardisContext, logger)
        {
            _cache                            = distributedCache;
            _protector                        = protectorProvider.CreateProtector(GetType().FullName);
            _logger                           = logger;
            ControllerName                    = CTask.Controller;
            TableName                         = CTask.TableName;
            _taskCampaignBusiness             = new TaskCampaignBusiness(mardisContext, distributedCache);
            _taskNotImplementedReasonBusiness = new TaskNotImplementedReasonBusiness(mardisContext);
            _branchImageBusiness              = new BranchImageBusiness(mardisContext);
            _userBusiness                     = new UserBusiness(mardisContext);
            _questionBusiness                 = new QuestionBusiness(mardisContext);

            if (ApplicationUserCurrent.UserId != null)
            {
                _userId = new Guid(ApplicationUserCurrent.UserId);
            }

            _idAccount = ApplicationUserCurrent.AccountId;
        }
 public QuestionBusiness(MardisContext mardisContext) : base(mardisContext)
 {
     _typePollDao     = new TypePollDao(mardisContext);
     _questionDao     = new QuestionDao(mardisContext);
     _answerDao       = new AnswerDao(mardisContext);
     _answerDetailDao = new AnswerDetailDao(mardisContext);
 }
예제 #10
0
 public AnswerBusiness(MardisContext mardisContext) : base(mardisContext)
 {
     _answerDao = new AnswerDao(mardisContext);
     Mapper.Initialize(cfg => cfg.CreateMap <AnswerDetail, OneAnswerViewModel>());
     Mapper.Initialize(cfg => cfg.CreateMap <AnswerDetail, ManyAnswerViewModel>());
     Mapper.Initialize(cfg => cfg.CreateMap <AnswerDetail, OpenAnswerViewModel>());
 }
 public MenuService(MardisContext mardisContext, IHttpContextAccessor httpContextAccessor, UserManager <ApplicationUser> userManager)
 {
     _menuBusiness        = new MenuBusiness(mardisContext);
     _httpContextAccessor = httpContextAccessor;
     _userManager         = userManager;
     SetCurrentUser();
 }
예제 #12
0
 public BulkLoadBusiness(MardisContext mardisContext, string connectionString)
     : base(mardisContext)
 {
     _bulkLoadDao        = new BulkLoadDao(mardisContext);
     _bulkLoadCatalogDao = new BulkLoadCatalogDao(mardisContext);
     _bulkLoadStatusDao  = new BulkLoadStatusDao(mardisContext);
     _connectionString   = connectionString;
 }
 public TypePersonController(UserManager<ApplicationUser> userManager, 
                             IHttpContextAccessor httpContextAccessor, 
                             MardisContext mardisContext, 
                             ILogger<TypePersonController> logger,
                             ILogger<ServicesFilterController> loggeFilter) : base(userManager, httpContextAccessor, mardisContext, logger)
 {
     _typePersonBusiness = new TypePersonBusiness(mardisContext);
 }
예제 #14
0
 public BranchBusiness(MardisContext mardisContext) : base(mardisContext)
 {
     _branchDao         = new BranchDao(mardisContext);
     _sequenceBusiness  = new SequenceBusiness(mardisContext);
     _personDao         = new PersonDao(mardisContext);
     _branchCustomerDao = new BranchCustomerDao(mardisContext);
     _taskCampaignDao   = new TaskCampaignDao(mardisContext);
 }
예제 #15
0
 public BranchMigrateDao(MardisContext mardisContext) :
     base(mardisContext)
 {
     _personDao          = new PersonDao(mardisContext);
     _userDao            = new UserDao(mardisContext);
     _brachDao           = new BranchDao(mardisContext);
     CoreFilterDao       = new CoreFilterDao(mardisContext);
     CoreFilterDetailDao = new CoreFilterDetailDao(mardisContext);
 }
예제 #16
0
 public HomeBusiness(MardisContext mardisContext) : base(mardisContext)
 {
     _campaignBusiness    = new CampaignBusiness(mardisContext);
     _userBusiness        = new UserBusiness(mardisContext);
     _taskCampaignDao     = new TaskCampaignDao(mardisContext);
     _profileBusiness     = new ProfileBusiness(mardisContext);
     _coreFilterDetailDao = new CoreFilterDetailDao(mardisContext);
     _coreFilterDao       = new CoreFilterDao(mardisContext);
 }
예제 #17
0
 public AnswerController(
     UserManager <ApplicationUser> userManager,
     IHttpContextAccessor httpContextAccessor,
     MardisContext mardisContext,
     ILogger <AnswerController> logger)
     : base(userManager, httpContextAccessor, mardisContext, logger)
 {
     _answerBusiness = new AnswerBusiness(mardisContext);
 }
예제 #18
0
 public CountryBusiness(MardisContext mardisContext, IMemoryCache memoryCache)
 {
     _myCache    = memoryCache;
     _countryDao = new CountryDao(mardisContext);
     if (_myCache.Get(CacheName) == null)
     {
         _myCache.Set(CacheName, _countryDao.GetCountries());
     }
 }
 public CodigosController(MardisContext mardisContext,
                          RedisCache distributedCache,
                          ILoggerFactory _loggerFactory)
 {
     _taskCampaignBusiness     = new TaskCampaignBusiness(mardisContext, distributedCache);
     _BranchBusiness           = new BranchBusiness(mardisContext);
     _CodigoReservadosBusiness = new CodigoReservadosBusiness(mardisContext);
     _logger = _loggerFactory.CreateLogger("Mardis.Engine.Services");
 }
예제 #20
0
 public ProvinceBusiness(MardisContext mardisContext, IMemoryCache memoryCache)
 {
     _provinceDao = new ProvinceDao(mardisContext);
     var myCache = memoryCache;
     if (myCache.Get(CacheName) == null)
     {
         myCache.Set(CacheName, _provinceDao.GetAll());
     }
 }
 public BulkLoadController(UserManager <ApplicationUser> userManager,
                           IHttpContextAccessor httpContextAccessor,
                           MardisContext mardisContext,
                           ILogger <BulkLoadController> logger)
     : base(userManager, httpContextAccessor, mardisContext, logger)
 {
     _bulkLoadBusiness        = new BulkLoadBusiness(mardisContext, Startup.Configuration.GetConnectionString("DefaultConnection"));
     _bulkLoadCatalogBusiness = new BulkLoadCatalogBusiness(mardisContext);
 }
 public ChannelController(
     UserManager <ApplicationUser> userManager,
     IHttpContextAccessor httpContextAccessor,
     MardisContext mardisContext,
     ILogger <ChannelController> logger)
     : base(userManager, httpContextAccessor, mardisContext, logger)
 {
     _channelBusiness = new ChannelBusiness(mardisContext);
 }
        public StatusTaskBusiness(MardisContext mardisContext, RedisCache cache) : base(mardisContext)
        {
            var statusTaskDao = new StatusTaskDao(mardisContext);

            _myCache = cache;
            if (_myCache.Get <List <StatusTask> >(CacheName) == null)
            {
                _myCache.Set(CacheName, statusTaskDao.GetAllStatusTasks());
            }
        }
        public StatusCampaignBusiness(MardisContext mardisContext, IMemoryCache memoryCache)
        {
            var statusCampaignDao = new StatusCampaignDao(mardisContext);

            _myCache = memoryCache;
            if (_myCache.Get(CacheName) == null)
            {
                _myCache.Set(CacheName, statusCampaignDao.GetStatusCampaigns());
            }
        }
예제 #25
0
 public TypeUserBusiness(MardisContext mardisContext, RedisCache memoryCache)
     : base(mardisContext)
 {
     _myCache = memoryCache;
     if (_myCache.Get <List <TypeUser> >(CacheName) == null)
     {
         var typeUserDao = new TypeUserDao(mardisContext);
         _myCache.Set(CacheName, typeUserDao.GetAll());
     }
 }
예제 #26
0
        public RoleStore(string conn)
        {
            var optionsBuilder = new DbContextOptionsBuilder <MardisContext>();

            optionsBuilder.UseSqlServer(conn);

            var mardisContext = new MardisContext(optionsBuilder.Options);

            _profileBusiness = new ProfileBusiness(mardisContext);
        }
예제 #27
0
        public UserStore(string conn)
        {
            var optionsBuilder = new DbContextOptionsBuilder <MardisContext>();

            optionsBuilder.UseSqlServer(conn);

            var mardisContext = new MardisContext(optionsBuilder.Options);

            _userBusiness = new UserBusiness(mardisContext);
        }
 public ServicesDetailController(MardisContext mardisContext,
                                 ILoggerFactory _loggerFactory,
                                 RedisCache distributedCache)
 {
     _serviceDetailBusiness = new ServiceDetailBusiness(mardisContext);
     _questionBusiness      = new QuestionBusiness(mardisContext);
     _qestionDetailBusiness = new QuestionDetailBusiness(mardisContext);
     _taskCampaignBusiness  = new TaskCampaignBusiness(mardisContext, distributedCache);
     _logger = _loggerFactory.CreateLogger("Mardis.Engine.Services");
 }
예제 #29
0
 public CustomerBusiness(MardisContext mardisContext) : base(mardisContext)
 {
     _customerDao        = new CustomerDao(mardisContext);
     _sequenceBusiness   = new SequenceBusiness(mardisContext);
     _channelDao         = new ChannelDao(mardisContext);
     _typeBusinessDao    = new TypeBusinessDao(mardisContext);
     _productCategoryDao = new ProductCategoryDao(mardisContext);
     _statusCustomerDao  = new StatusCustomerDao(mardisContext);
     _typeCustomerDao    = new TypeCustomerDao(mardisContext);
 }
예제 #30
0
 public ServiceBusiness(MardisContext mardisContext) : base(mardisContext)
 {
     _serviceDao        = new ServiceDao(mardisContext);
     _serviceDetailDao  = new ServiceDetailDao(mardisContext);
     _questionDao       = new QuestionDao(mardisContext);
     _questionDetailDao = new QuestionDetailDao(mardisContext);
     _typePollDao       = new TypePollDao(mardisContext);
     _sequenceBusiness  = new SequenceBusiness(mardisContext);
     _typeServiceDao    = new TypeServiceDao(mardisContext);
     _customerDao       = new CustomerDao(mardisContext);
 }