Пример #1
0
 public ManagerCategory(IHttpContextAccessor httpContextAccessor,
                        ILoggerFactory logger,
                        RepositoryRole repositoryRole,
                        RepositoryUser repositoryUser,
                        ManagerUser managerUser,
                        IMapper mapper,
                        IRepositoryCategory repositoryCategory) : base(httpContextAccessor, logger, repositoryRole, repositoryUser, managerUser, mapper)
 {
     _repositoryCategory = repositoryCategory;
 }
Пример #2
0
 public ManagerLanguage(IHttpContextAccessor httpContextAccessor,
                        ILoggerFactory logger,
                        RepositoryRole repositoryRole,
                        RepositoryUser repositoryUser,
                        ManagerUser managerUser,
                        IMapper mapper,
                        IRepositoryLanguage repositoryLanguage) : base(httpContextAccessor, logger, repositoryRole, repositoryUser, managerUser, mapper)
 {
     _repositoryLanguage = repositoryLanguage;
 }
Пример #3
0
 public ManagerImage(IHttpContextAccessor httpContextAccessor,
                     ILoggerFactory logger,
                     RepositoryRole repositoryRole,
                     RepositoryUser repositoryUser,
                     ManagerUser managerUser,
                     IMapper mapper,
                     ConnectorBucketImageD bucketImageD,
                     ConnectorBucketImageR bucketImageR) : base(httpContextAccessor, logger, repositoryRole, repositoryUser, managerUser, mapper)
 {
     _bucketImageD = bucketImageD;
     _bucketImageR = bucketImageR;
 }
Пример #4
0
 public Manager(IHttpContextAccessor httpContextAccessor,
                ILoggerFactory logger,
                RepositoryRole repositoryRole,
                RepositoryUser repositoryUser,
                ManagerUser managerUser,
                IMapper mapper) : base(httpContextAccessor)
 {
     _logger         = logger.CreateLogger(GetType());
     _repositoryRole = repositoryRole;
     _repositoryUser = repositoryUser;
     _managerUser    = managerUser;
     _mapper         = mapper;
 }
Пример #5
0
        private static void InitialSeed(ProcurementContext db, UnitOfWorkProcurement unit)
        {
            var roles = new List <Role>()
            {
                new Role()
                {
                    Name = "Admin"
                },
                new Role()
                {
                    Name = "Custumer"
                },
                new Role()
                {
                    Name = "Supplier"
                }
            };
            IRepositoryRole repRole = new RepositoryRole(db, unit);

            repRole.InsertRange(roles);
            unit.SaveChanges();

            User admin = new User()
            {
                Name     = "Admin",
                UserType = Model.Enums.UserType.Admin,
                Password = "******",
                Email    = "*****@*****.**",
                Login    = "******"
            };
            IRepositoryUser repUser = new RepositoryUser(db, unit);

            repUser.Insert(admin);
            AdminInfo adminInfo = new AdminInfo()
            {
                User = admin
            };
            IRepositoryAdminInfo repAdminInfo = new RepositoryAdminInfo(db, unit);

            repAdminInfo.Insert(adminInfo);

            unit.SaveChanges();

            Role roleAdmin = repRole.Queryable().Where(r => r.Name == "Admin").FirstOrDefault();

            roleAdmin.Users.Add(admin);
            repRole.Update(roleAdmin);


            unit.SaveChanges();
        }
        /// <summary>  </summary>
        public static void Init(DBCfgViewModel dBConfig)
        {
            _DBCfgViewModel = dBConfig;
            RepositorySystem               repositorySystem               = new RepositorySystem(dBConfig);
            RepositoryOrganizationType     repositoryOrganizationType     = new RepositoryOrganizationType(dBConfig);
            RepositoryAttributionType      repositoryAttributionType      = new RepositoryAttributionType(dBConfig);
            RepositoryOrganization         repositoryOrganization         = new RepositoryOrganization(dBConfig);
            RepositoryPrivilegeGroup       repositoryPrivilegeGroup       = new RepositoryPrivilegeGroup(dBConfig);
            RepositoryPrivilege            repositoryPrivilege            = new RepositoryPrivilege(dBConfig);
            RepositoryRelationPositionRole repositoryRelationPositionRole = new RepositoryRelationPositionRole(dBConfig);
            RepositoryUser repositoryUser = new RepositoryUser(dBConfig);

            IocUnity.AddTransient <BusinessSystem>();
            IocUnity.AddTransient <BusinessUser>();
            IocUnity.AddTransient <BusinessRole>();
            IocUnity.AddTransient <BusinessPrivilege>();
            IocUnity.AddTransient <BusinessOrganization>();
            IocUnity.AddTransient <BusinessItem>();
            RepositoryRelationUserOrganization repositoryRelationUserOrganization = new RepositoryRelationUserOrganization(dBConfig);
            RepositoryRole repositoryRole = new RepositoryRole(dBConfig);
            RepositoryRelationRolePrivilege        repositoryRelationRolePrivilege        = new RepositoryRelationRolePrivilege(dBConfig);
            RepositoryRelationUserPrivilege        repositoryRelationUserPrivilege        = new RepositoryRelationUserPrivilege(dBConfig);
            RepositoryRelationUserRole             repositoryRelationUserRole             = new RepositoryRelationUserRole(dBConfig);
            RepositoryRelationOrganization         repositoryRelationOrganization         = new RepositoryRelationOrganization(dBConfig);
            RepositioryRelationOrganizationForeign repositioryRelationOrganizationForeign = new RepositioryRelationOrganizationForeign(dBConfig);
            RepositoryItem               repositoryItem        = new RepositoryItem(dBConfig);
            RepositoryItemContent        repositoryItemContent = new RepositoryItemContent(dBConfig);
            BaseData <TRelationRoleItem> rBaseData             = new BaseData <TRelationRoleItem>(dBConfig);

            IocUnity.AddSingleton(rBaseData);
            IocUnity.AddSingleton(repositoryItem);
            IocUnity.AddSingleton(repositoryItemContent);
            IocUnity.AddSingleton(repositoryRelationOrganization);
            IocUnity.AddSingleton(repositoryRelationUserRole);
            IocUnity.AddSingleton(repositoryRelationUserOrganization);
            IocUnity.AddSingleton(repositorySystem);
            IocUnity.AddSingleton(repositoryOrganizationType);
            IocUnity.AddSingleton(repositoryAttributionType);
            IocUnity.AddSingleton(repositoryOrganization);
            IocUnity.AddSingleton(repositoryPrivilegeGroup);
            IocUnity.AddSingleton(repositoryPrivilege);
            IocUnity.AddSingleton(repositoryRelationPositionRole);
            IocUnity.AddSingleton(repositoryUser);
            IocUnity.AddSingleton(repositoryRole);
            IocUnity.AddSingleton(repositoryRelationRolePrivilege);
            IocUnity.AddSingleton(repositoryRelationUserPrivilege);
            IocUnity.AddSingleton(repositioryRelationOrganizationForeign);
        }
 public ManagerProvider(IHttpContextAccessor httpContextAccessor,
                        ILoggerFactory logger,
                        RepositoryRole repositoryRole,
                        RepositoryUser repositoryUser,
                        ManagerUser managerUser,
                        IMapper mapper,
                        IRepositoryCategory repositoryCategory,
                        IRepositoryProvider repositoryProvider,
                        ConnectorBucketImageR connectorBucketImageR,
                        ConnectorBucketImageD connectorBucketImageD,
                        IRepositoryEmailChangeUnit repositoryEmailChangeUnit) : base(httpContextAccessor, logger, repositoryRole, repositoryUser, managerUser, mapper)
 {
     _repositoryProvider        = repositoryProvider;
     _repositoryCategory        = repositoryCategory;
     _connectorBucketImageR     = connectorBucketImageR;
     _connectorBucketImageD     = connectorBucketImageD;
     _repositoryEmailChangeUnit = repositoryEmailChangeUnit;
 }
 public ManagerUserControl(IHttpContextAccessor httpContextAccessor,
                           ILoggerFactory logger,
                           RepositoryRole repositoryRole,
                           RepositoryUser repositoryUser,
                           MRTokenService serviceToken,
                           IOptions <MRTokenOptions> tokenOptions,
                           ManagerUser managerUser,
                           IMapper mapper,
                           IRepositoryLanguage repositoryLanguage,
                           IRepositoryProvider repositoryProvider,
                           ConnectorBucketImageD bucketD,
                           ConnectorBucketImageR bucketR,
                           IRepositoryEmailChangeUnit repositoryEmailChangeUnit) : base(httpContextAccessor, logger, repositoryRole, repositoryUser, managerUser, mapper)
 {
     _repositoryProvider        = repositoryProvider;
     _serviceToken              = serviceToken;
     _tokenOptions              = tokenOptions.Value;
     _repositoryLanguage        = repositoryLanguage;
     _bucketD                   = bucketD;
     _bucketR                   = bucketR;
     _repositoryEmailChangeUnit = repositoryEmailChangeUnit;
 }
 public async Task <List <Repository> > GetRepositories(string workspace, RepositoryRole repositoryRole)
 {
     return(await GetListOfElement <Repository>(string.Format(@"https://api.bitbucket.org/2.0/repositories/{0}?{1}", workspace, repositoryRole)).ConfigureAwait(false));
 }