Exemple #1
0
 public NotificationService(IDataAccessRepository <Notification> dal, IDataAccessRepository <PersonnelNotification> dalPersonnelNotify, IMapper mapper, IDataAccessRepository <Personnel> dalPersonnel)
 {
     _dal = dal;
     _dalPersonnelNotify = dalPersonnelNotify;
     _mapper             = mapper;
     _dalPersonnel       = dalPersonnel;
 }
 protected BusinessLogicService(IDataAccessRepository <TDA> repository, IMapper mapper)
 {
     _repository = repository ??
                   throw new ArgumentNullException(nameof(repository));
     _mapper = mapper ??
               throw new ArgumentNullException(nameof(mapper));
 }
 //Inject the DataAccessRepository using Construction Injection
 public trxDetailPekerjaanTMPController(IDataAccessRepository <trxDetailPekerjaanTMP, int> r, TrxDetailPekerjaanTMPRep repDetailPek, MstTypeOfRegionRep repRegion, MstSegmentasiRep repSegmen)
 {
     _repository   = r;
     _repDetailPek = repDetailPek;
     _repRegion    = repRegion;
     _repSegmen    = repSegmen;
 }
Exemple #4
0
 //Inject the DataAccessRepository using Construction Injection
 public TrxManagementController(IDataAccessRepository <trxManagement, int> r, TrxManagementRep repManagement
                                , TrxManagementBLHistRep repManagementBLHistory)
 {
     _repository          = r;
     _repManagement       = repManagement;
     _repManagementBLHist = repManagementBLHistory;
 }
 //Inject the DataAccessRepository using Construction Injection
 public TrxBranchOfficeController(IDataAccessRepository <trxBranchOffice, int> r, TrxBranchOfficeRep repBranch, MstWilayahRep rTWilayah, MstKecamatanRep rTKecamatan)
 {
     _repository   = r;
     _repBranch    = repBranch;
     _repWilayah   = rTWilayah;
     _repKecamatan = rTKecamatan;
 }
        public PersonnelNotificationService(IDataAccessRepository <PersonnelNotification> dal, IUserService userService, IMapper mapper)
        {
            _dal = dal;

            _userService = userService;

            _mapper = mapper;
        }
Exemple #7
0
 //Inject the DataAccessRepository using Construction Injection
 public TrxDocMandatoryDetailController(IDataAccessRepository <trxDocMandatoryDetail, int> r, MstRekananRep repRekanan
                                        , TrxDocMandatoryDetailRep repDocDetail, MstTypeOfDocumentRep repTipeDoc)
 {
     _repository   = r;
     _repRekanan   = repRekanan;
     _repDocDetail = repDocDetail;
     _repTipeDoc   = repTipeDoc;
 }
Exemple #8
0
 //Inject the DataAccessRepository using Construction Injection
 public TrxBranchOfficeHeaderController(IDataAccessRepository <trxBranchOfficeHeader, int> r, TrxBranchOfficeHeaderRep repBranchHeader, MstWilayahRep rTWilayah, MstKecamatanRep rTKecamatan, TrxBranchOfficeRep repBranch)
 {
     _repository      = r;
     _repBranchHeader = repBranchHeader;
     _repWilayah      = rTWilayah;
     _repKecamatan    = rTKecamatan;
     _repBranch       = repBranch;
 }
 //Inject the DataAccessRepository using Construction Injection
 public TrxNotificationHeaderController(IDataAccessRepository <trxNotificationHeader, int> r, TrxNotificationHeaderRep repHeader
                                        , MstRekananRep repRekanan, TrxNotificationDetailRep repDetail, TrxNotificationContentRep repContent)
 {
     _repository = r;
     _repHeader  = repHeader;
     _repDetail  = repDetail;
     _repContent = repContent;
     _repRekanan = repRekanan;
 }
 //Inject the DataAccessRepository using Construction Injection
 public TrxDetailPekerjaanAS_3MController(IDataAccessRepository <trxDetailPekerjaanAS_3M, int> r, TrxDetailPekerjaanAS_3MRep repDetailPek, MstTypeOfRegionRep repRegion
                                          , MstSegmentasiRep repSegmen, MstReferenceRep repReff, MstSubRegionRep repSubRegion)
 {
     _repository   = r;
     _repDetailPek = repDetailPek;
     _repRegion    = repRegion;
     _repSegmen    = repSegmen;
     _repReff      = repReff;
     _repSubRegion = repSubRegion;
 }
Exemple #11
0
 //Inject the DataAccessRepository using Construction Injection
 public TrxTenagaAhliHeaderController(IDataAccessRepository <trxTenagaAhliHeader, int> r, TrxTenagaAhliHeaderRep repTAhliHeader, TrxTenagaAhliRep repTAhli
                                      , TrxTenagaPendukungRep repTPendukung, MstRekananRep repRekanan, TrxTenagaAhliUploadRep repTAUpload)
 {
     _repository     = r;
     _repTAhliHeader = repTAhliHeader;
     _repTAhli       = repTAhli;
     _repTPendukung  = repTPendukung;
     _repRekanan     = repRekanan;
     _repTAUpload    = repTAUpload;
 }
 //Inject the DataAccessRepository using Construction Injection
 public TrxDetailPekerjaanHeaderController(IDataAccessRepository <trxDetailPekerjaanHeader, int> r, TrxDetailPekerjaanHeaderRep repDetailPek
                                           , TrxDetailPekerjaanRep repDetail, TrxDetailPekerjaanAS_1MRep repDetailAS_1M, MstSegmentasiRep repSegmen, MstSubRegionRep repSubRegion)
 {
     _repository     = r;
     _repDetailPek   = repDetailPek;
     _repDetail      = repDetail;
     _repDetailAS_1M = repDetailAS_1M;
     _repSegmen      = repSegmen;
     _repSubRegion   = repSubRegion;
 }
        public AssigmentService(IDataAccessRepository <Assigment> dal, IUserService userService, IMapper mapper, IDataAccessRepository <Notification> dalNotify, IDataAccessRepository <PersonnelNotification> dalPersonnelNotify)
        {
            _dal                = dal;
            _dalNotify          = dalNotify;
            _dalPersonnelNotify = dalPersonnelNotify;

            _userService = userService;

            _mapper = mapper;
        }
Exemple #14
0
        public AuthService(IDataAccessRepository <Account> dal, IMapper mapper, ITokenHelper tokenHelper, IUserService userService, LoggedInUsers loggedInUsers, JwtOptions jwtOptions)
        {
            _dal = dal;

            _tokenHelper   = tokenHelper;
            _userService   = userService;
            _loggedInUsers = loggedInUsers;
            _jwtOptions    = jwtOptions;
            _mapper        = mapper;
        }
Exemple #15
0
        public AuthService(IDataAccessRepository <Personnel> dal, IDataAccessRepository <Rule> dalRule, ITokenHelper tokenHelper, IUserService userService, LoggedInUsers loggedInUsers, JwtOptions jwtOptions)
        {
            _dal     = dal;
            _dalRule = dalRule;

            _tokenHelper   = tokenHelper;
            _userService   = userService;
            _loggedInUsers = loggedInUsers;
            _jwtOptions    = jwtOptions;
        }
Exemple #16
0
        public PersonnelService(IDataAccessRepository <Personnel> dal, IMapper mapper, IEmailTemplateService emailTemplateService, IEmailService emailService, IUserService userService)
        {
            _dal = dal;

            _emailService         = emailService;
            _emailTemplateService = emailTemplateService;
            _userService          = userService;

            _mapper = mapper;
        }
Exemple #17
0
        public AuthService(IDataAccessRepository <User> dalUser, IDataAccessRepository <UserRole> dalUserRole, ITokenHelper tokenHelper, IActiveUserService activeUserService, LoggedInUsers loggedInUsers, JwtOptions jwtOptions)
        {
            _dalUser     = dalUser;
            _dalUserRole = dalUserRole;

            _tokenHelper       = tokenHelper;
            _activeUserService = activeUserService;
            _loggedInUsers     = loggedInUsers;
            _jwtOptions        = jwtOptions;
        }
 //Inject the DataAccessRepository using Construction Injection
 public MstRekananController(IDataAccessRepository <mstRekanan, System.Guid> r, MstTypeOfRegionRep rRegion
                             , MstTypeOfRekananRep rTRekanan, MstTypeOfBadanUsahaRep rTBadan, MstWilayahRep rTWilayah, MstKecamatanRep rTKecamatan
                             , MstRekananRep rRekanan)
 {
     _repository          = r;
     _repRegion           = rRegion;
     _repTypeOfRekanan    = rTRekanan;
     _repTypeOfBadanUsaha = rTBadan;
     _repWilayah          = rTWilayah;
     _repKecamatan        = rTKecamatan;
     _repRekanan          = rRekanan;
 }
 //private MstRekananRep _repRekanan;
 //Inject the DataAccessRepository using Construction Injection
 public TrxRekananDocumentController(IDataAccessRepository <trxRekananDocument, int> r, TrxRekananDocumentRep repRekDoc
                                     , MstTypeOfDocumentRep repTipeDoc, TrxDocMandatoryDetailRep repDocDetail, TrxDocMandatoryFileRep repDocFile
                                     //, MstRekananRep repRekanan
                                     )
 {
     _repository   = r;
     _repRekDoc    = repRekDoc;
     _repTipeDoc   = repTipeDoc;
     _repDocDetail = repDocDetail;
     _repDocFile   = repDocFile;
     //_repRekanan = repRekanan;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="TodoListPageViewModel"/> class.
        /// </summary>
        public TodoListPageViewModel()
        {
            this.dataAccess = new SQLiteRepository();
            this.dataAccess.Create <TaskItem>();

            this.InitializeTodoLists();

            this.SubscribeToTaskItemPropertyChanged(this.PendingTodoListControlViewModel.TaskItem);
            this.SubscribeToTaskItemPropertyChanged(this.CompletedTodoListControlViewModel.TaskItem);

            this.PendingTodoListControlViewModel.ShowDetailsCalled   += TodoListControlViewModel_ShowDetailsCalled;
            this.CompletedTodoListControlViewModel.ShowDetailsCalled += TodoListControlViewModel_ShowDetailsCalled;
        }
Exemple #21
0
 //Inject the DataAccessRepository using Construction Injection
 public MstRekananController(IDataAccessRepository <mstRekanan, System.Guid> r, MstTypeOfRegionRep rRegion
                             , MstTypeOfRekananRep rTRekanan, MstTypeOfBadanUsahaRep rTBadan, MstWilayahRep rTWilayah, MstKecamatanRep rTKecamatan
                             , MstRekananRep rRekanan, MstContactRep rContact, mstEmailPoolRep repEmailPool, TrxRegistrationRequestRep repRegRequest)
 {
     _repository          = r;
     _repRegion           = rRegion;
     _repTypeOfRekanan    = rTRekanan;
     _repTypeOfBadanUsaha = rTBadan;
     _repWilayah          = rTWilayah;
     _repKecamatan        = rTKecamatan;
     _repRekanan          = rRekanan;
     _repContact          = rContact;
     _repEmailPool        = repEmailPool;
 }
        internal UnitOfWorkScope(UnitOfWorkScopeType scopeType)
        {
            _scopeType = scopeType;
            _units = new List<UnitOfWork>();
            _postCommitActions = new List<Action>();
            _postRollbackActions = new List<Action>();

            var repositoryHelper = IoC.Resolve<IDataRepositoryManager>();
            switch (scopeType)
            {
                case UnitOfWorkScopeType.New:
                    _repository = repositoryHelper.GetNewRepository();
                    break;
                default:
                    _repository = repositoryHelper.GetCurrentRepository();
                    break;
            }
            _repository.Transaction.Initialize();
            _transactionId = Transaction.Current.TransactionInformation.LocalIdentifier;
            UnitOfWorkManager.Instance.AddUnitOfWorkScope(_transactionId, this);
        }
        internal UnitOfWorkScope(UnitOfWorkScopeType scopeType)
        {
            _scopeType           = scopeType;
            _units               = new List <UnitOfWork>();
            _postCommitActions   = new List <Action>();
            _postRollbackActions = new List <Action>();

            var repositoryHelper = IoC.Resolve <IDataRepositoryManager>();

            switch (scopeType)
            {
            case UnitOfWorkScopeType.New:
                _repository = repositoryHelper.GetNewRepository();
                break;

            default:
                _repository = repositoryHelper.GetCurrentRepository();
                break;
            }
            _repository.Transaction.Initialize();
            _transactionId = Transaction.Current.TransactionInformation.LocalIdentifier;
            UnitOfWorkManager.Instance.AddUnitOfWorkScope(_transactionId, this);
        }
Exemple #24
0
        public Login ActivateUser(string guid, string token, IDataAccessRepository <Models.DTO.User, int> userRepository)
        {
            var login = new Login();

            var user = _context.Users.Where(x => x.Guid == new Guid(guid)).FirstOrDefault();

            if (user == null)
            {
                login.errors.Add("User does not exist!");
                return(login);
            }

            //if (user.IS_LOCKED)
            //{
            //    login.errors.Add("User is locked!");
            //    return login;
            //}

            if (user.IsEmailVerified)
            {
                login.errors.Add("User has already been approved!");
                return(login);
            }


            if (!token.Equals(user.Token))
            {
                login.errors.Add("Incorrect security token is specified!");
                return(login);
            }

            user.IsEmailVerified = true;
            //  userRepository.Put(user.Id, user);

            login.username = user.FirstName;
            return(login);
        }
 public StocksaledisputeController(IDataAccessRepository <Stocksaledispute, int> repository)
 {
     _repository = repository;
 }
 public EmployeeInfoAPIController(IDataAccessRepository<EmployeeInfo, int> repository)
 {
     _repository = repository;
 }
Exemple #27
0
 //Inject the DataAccessReposity using Contruction Injection
 public OrderDetailController(IDataAccessRepository <OrderDetail, int> r)
 {
     _repository = r;
 }
 //Inject the DataAccessRepository using Construction Injection
 public MstTypeOfDocumentController(IDataAccessRepository <mstTypeOfDocument, int> r)
 {
     _repository = r;
 }
Exemple #29
0
 public AccountRepository(IDataAccessRepository <AccountEntity> repo)
 {
     _dataAccess = repo;
     _dataAccess.CollectionId = "accounts";
     _dataAccess.DatabaseId   = "accountdb";
 }
 //Inject the DataAccessRepository using Construction Injection
 public TrxTenagaAhliTMPController(IDataAccessRepository <trxTenagaAhliTMP, int> r, TrxTenagaAhliTMPRep repTAhli)
 {
     _repository = r;
     _repTAhli   = repTAhli;
 }
Exemple #31
0
 public AdminPanelApiController(IDataAccessRepository <AdminPanel> dataRepository)
 {
     _dataRepository = dataRepository;
 }
 //Inject the DataAccessRepository using Construction Injection
 public TrxMonitoringFeeBased_ARCController(IDataAccessRepository <trxMonitoringFeeBased_ARC, int> r)
 {
     _repository = r;
 }