Ejemplo n.º 1
0
        public string AbstractFactoryDependencyInjection(int type)
        {
            var builder = new ContainerBuilder();

            if (type == 1)
            {
                builder.RegisterType <SqlServerFactory>().As <IDbFactory>();
            }
            else
            {
                builder.RegisterType <AccessFactory>().As <IDbFactory>();
            }
            var       container = builder.Build();
            var       dbFactory = container.Resolve <IDbFactory>();
            IUserRepo userRepo  = dbFactory.CreateUserRepo();

            userRepo.Insert(null);
            userRepo.GetUser(0);

            IDepartmentRepo departmentRepo = dbFactory.CreateDepartmentRepo();

            departmentRepo.CreateDepartment(null);

            return("Ok DependencyInjection");
        }
        public EmployeeController(IEmployeeRepo repo, IDepartmentRepo department, ICountryRepo country, ICityRepo city)
        {
            this.repo = repo;

            this.department = department;
            this.city       = city;
            this.country    = country;
        }
 public TimeSheetController(IWorkDayRepo timeSheetService, IDepartmentRepo departmentRepo, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, ISupervisorRepo supervisorRepo)
 {
     _userManager      = userManager;
     _roleManager      = roleManager;
     _supervisorRepo   = supervisorRepo;
     _timeSheetService = timeSheetService;
     _departmentRepo   = departmentRepo;
 }
Ejemplo n.º 4
0
 public DefaultValuesService(
     IDefaultValuesRepo defaultValuesRepo,
     IDepartmentRepo departmentRepo,
     IEmployeeRepo employeeRepo)
 {
     _repository     = defaultValuesRepo;
     _departmentRepo = departmentRepo;
     _employeeRepo   = employeeRepo;
 }
Ejemplo n.º 5
0
 public EmployeeService(
     IEmployeeRepo employeeRepo,
     IDepartmentRepo departmentRepo,
     IPositionRepo positionRepo)
 {
     _repository     = employeeRepo;
     _departmentRepo = departmentRepo;
     _positionRepo   = positionRepo;
 }
Ejemplo n.º 6
0
 /// <summary>UnitOfWorkPerson Constructor</summary>
 public UnitOfWorkPerson(IPersonRepo personRepo, IScheduleRepo scheduleRepo, IClassRepo classRepo, ISemesterRepo semesterRepo, IDepartmentRepo departmentRepo, IBannerService bannerApi)
 {
     this.personRepo     = personRepo;
     this.scheduleRepo   = scheduleRepo;
     this.classRepo      = classRepo;
     this.semesterRepo   = semesterRepo;
     this.departmentRepo = departmentRepo;
     this.bannerApi      = bannerApi;
 }
Ejemplo n.º 7
0
        public string AbstractFactoryReflection(string dbName)
        {
            IUserRepo userRepo = DataAccess.CreateUserRepo(dbName);

            userRepo.Insert(null);
            IDepartmentRepo departmentRepo = DataAccess.CreateDepartmentRepo(dbName);

            departmentRepo.CreateDepartment(null);
            return("Ok Reflection");
        }
Ejemplo n.º 8
0
 public RegisterModel(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     ILogger <RegisterModel> logger,
     IEmailSender emailSender, IDepartmentRepo departmentRepo)
 {
     _userManager         = userManager;
     _signInManager       = signInManager;
     _logger              = logger;
     _emailSender         = emailSender;
     this.iDepartmentRepo = departmentRepo;
 }
Ejemplo n.º 9
0
 public ReportsViewModel(
     IGoalRepo repo,
     IDepartmentRepo deporepo)
 {
     _repo            = repo;
     _deporepo        = deporepo;
     _goals           = _repo.GetAllGoals();
     _departments     = _deporepo.GetAllDepartments();
     _repo.NewData   += OnNewRepoData;
     LevelOneReport   = GenerateLevelOneReport();
     LevelTwoReport   = GenerateLevelTwoReport();
     LevelThreeReport = GenerateLevelThreeReport();
 }
Ejemplo n.º 10
0
        public MarkService(
            IMarkRepo markRepo,
            ISubnodeRepo subnodeRepo,
            IDepartmentRepo departmentRepo,
            IEmployeeRepo employeeRepo,
            ISpecificationService specificationService)
        {
            _repository     = markRepo;
            _subnodeRepo    = subnodeRepo;
            _departmentRepo = departmentRepo;
            _employeeRepo   = employeeRepo;

            _specificationService = specificationService;
        }
Ejemplo n.º 11
0
 public ChartService()
 {
     stationeryRepo              = StationeryRepo.Instance;
     categoryRepo                = CategoryRepo.Instance;
     supplierTenderRepo          = SupplierTenderRepo.Instance;
     supplierRepo                = SupplierRepo.Instance;
     adjustmentVoucherRepo       = AdjustmentVoucherRepo.Instance;
     adjustmentVoucherDetailRepo = AdjustmentVoucherDetailRepo.Instance;
     requisitionRepo             = RequisitionRepo.Instance;
     requisitionDetailRepo       = RequisitionDetailRepo.Instance;
     disbursementRepo            = DisbursementRepo.Instance;
     employeeRepo                = EmployeeRepo.Instance;
     departmentRepo              = DepartmentRepo.Instance;
     purchaseOrderRepo           = PurchaseOrderRepo.Instance;
     purchaseOrderDetailRepo     = PurchaseOrderDetailRepo.Instance;
 }
Ejemplo n.º 12
0
 private RetrievalService()
 {
     stationeryRepo              = StationeryRepo.Instance;
     categoryRepo                = CategoryRepo.Instance;
     requisitionRepo             = RequisitionRepo.Instance;
     requisitionDetailRepo       = RequisitionDetailRepo.Instance;
     disbursementRepo            = DisbursementRepo.Instance;
     employeeRepo                = EmployeeRepo.Instance;
     departmentRepo              = DepartmentRepo.Instance;
     purchaseOrderRepo           = PurchaseOrderRepo.Instance;
     collectionPointRepo         = CollectionPointRepo.Instance;
     adjustmentVoucherRepo       = AdjustmentVoucherRepo.Instance;
     adjustmentVoucherDetailRepo = AdjustmentVoucherDetailRepo.Instance;
     requisitionCatalogueService = RequisitionCatalogueService.Instance;
     purchaseOrderDetailRepo     = PurchaseOrderDetailRepo.Instance;
     publicHolidayRepo           = PublicHolidayRepo.Instance;
 }
Ejemplo n.º 13
0
 public MarkService(
     IMarkRepo markRepo,
     ISubnodeRepo subnodeRepo,
     IDepartmentRepo departmentRepo,
     IEmployeeRepo employeeRepo,
     IEstimateTaskRepo estimateTaskRepo,
     ISpecificationService specificationService,
     IMarkGeneralDataPointService markGeneralDataPointService)
 {
     _repository                  = markRepo;
     _subnodeRepo                 = subnodeRepo;
     _departmentRepo              = departmentRepo;
     _employeeRepo                = employeeRepo;
     _estimateTaskRepo            = estimateTaskRepo;
     _specificationService        = specificationService;
     _markGeneralDataPointService = markGeneralDataPointService;
 }
Ejemplo n.º 14
0
        public LevelOneMatrixViewModel(
            IDepartmentRepo depoRepo,
            IGoalRepo repo,
            IPersonRepo personRepo,
            ILevelMatrixService levelOneMatrixService,
            ILevelMatrixService leveltwoMatrixService,
            ILevelMatrixService levelTreeMatrixService,
            IidService idService)
        {
            SelectedmatrixLevel = "One";
            _depoRepo           = depoRepo;
            _repo                   = repo;
            _personRepo             = personRepo;
            _levelOneMatrixService  = levelOneMatrixService;
            _leveltwoMatrixService  = leveltwoMatrixService;
            _levelTreeMatrixService = levelTreeMatrixService;
            _repo.NewData          += OnNewRepoData;
            _idService              = idService;
            AddNewGoal              = new DelegateCommand(ExcecuteAddNewGoal, CanExcecuteAddNewGoal);
            AddRelatedGoal          = new DelegateCommand(ExcecuteAddRelatedGoal, CanExcecuteAddRelatedGoal);
            RemoveRelatedGoal       = new DelegateCommand(ExcecuteRemoveRelatedGoal, CanExcecuteRemoveRelatedGoal);
            DeleteGoal              = new DelegateCommand(ExcecuteDeleteGoal, CanExcecuteDeleteGoal);
            //DeletePerson = new DelegateCommand(ExcecuteDeletePerson, CanExcecuteDeletePerson);
            //AddNewPerson = new DelegateCommand(ExcecuteAddNewPerson, CanExcecuteAddNewPerson);
            //AddRelatedPerson = new DelegateCommand(ExcecuteAddRelatedPerson, CanExcecuteAddRelatedPerson);
            GetLevelOneMatrix       = new DelegateCommand(ExcecuteGetLevelOneMatrix);
            GetLevelTwoMatrix       = new DelegateCommand(ExcecuteGetLevelTwoMatrix, CanExcecuteGetLevelTwoMatrix);
            GetLevelThreeMatrix     = new DelegateCommand(ExcecuteGetLevelThreeMatrix, CanExcecuteGetLevelThreeMatrix);
            AddNewDepartment        = new DelegateCommand(ExcecuteAddNewDepartment, CanExcecuteAddNewDepartment);
            RemoveRelatedDepartment = new DelegateCommand(ExcecuteRemoveRelatedDepartment, CanExcecuteRemoveRelatedDepartment);
            AddRelatedDepartment    = new DelegateCommand(ExcecuteAddRelatedDepartment, CanExcecuteAddRelatedDepartment);
            DeleteDepartments       = new DelegateCommand(ExcecuteDeleteDepartments, CanExcecuteDeleteDepartments);
            //RemoveRelatedPerson = new DelegateCommand(ExcecuteRemoveRelatedPerson, CanExcecuteRemoveRelatedPerson);
            UpdateDepartments();
            Goals = _repo.GetAllGoals();
            UpdateGoals();

            //UpdatePeople();
            UpdateCanvas();
        }
Ejemplo n.º 15
0
 public DepartmentsController(IDepartmentRepo repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
 public DepartmentController(IDepartmentRepo departmentRepo, UserManager <ApplicationUser> userManager, ISupervisorRepo supervisorRepo)
 {
     _departmentRepo = departmentRepo;
     _userManager    = userManager;
     _supervisorRepo = supervisorRepo;
 }
Ejemplo n.º 17
0
 public DepartmentsController(IDepartmentRepo context)
 {
     _context = context;
 }
 public DepartmentsAPIController(IDepartmentRepo deptRepo)
 {
     _deptRepo = deptRepo;
 }
 public DepartmentServiceController(IDepartmentServicesRepo departmentService, IDepartmentRepo department)
 {
     this._departmentService = departmentService;
     _department             = department;
 }
 public DepartmentsController(IDepartmentRepo repository)
 {
     _repository = repository;
 }
Ejemplo n.º 21
0
 public DepartmentService(IDepartmentRepo departmentRepo)
 {
     _repository = departmentRepo;
 }
Ejemplo n.º 22
0
 public DepartmentController(IDepartmentRepo department)
 {
     this._department = department;
 }
Ejemplo n.º 23
0
 public DepartmentServices(IDepartmentRepo departmentRepo)
 {
     _departmentRepo = departmentRepo;
 }
 public DepartmentController(IDepartmentRepo departmentRepo)
 {
     this.departmentRepo = departmentRepo;
 }
Ejemplo n.º 25
0
 public DepartmentController(IDepartmentRepo addressRepo)
 {
     _repo = addressRepo;
 }
Ejemplo n.º 26
0
 public DepartmentController(Context context, IDepartmentRepo departmentRepo)
 {
     _context            = context;
     this.departmentRepo = departmentRepo;
 }
 public DepartmentsController(IDepartmentRepo repo)
 {
     this.repo = repo;
 }
Ejemplo n.º 28
0
 public HomeController(IProductRepo ProductRepo, IDepartmentRepo DepartmentRepo)
 {
     _prodData   = ProductRepo;
     _departData = DepartmentRepo;
 }
 public DepartmentEmployeesTagHelper(UserManager <ApplicationUser> userManager, IDepartmentRepo departmentRepo)
 {
     _userManager    = userManager;
     _departmentRepo = departmentRepo;
 }
 public DepartmentController(IMapper mapper, IDepartmentRepo departmentRepo)
 {
     _mapper         = mapper;
     _departmentRepo = departmentRepo;
 }