public VerifyAccountTypeController()
 {
     _nhSessionFactory = NhDatabaseConfiguration.CreateSessionFactory();
     _repository = new AccountTypeRepository(_nhSessionFactory);
     _repositoryAsset = new AssetRepository(_nhSessionFactory);
     _identityService = new PimsIdentityService();
 }
 public AccountTypeController(IGenericRepository<AccountType> repository, IGenericRepository<Asset> repositoryAssets, IPimsIdentityService identityService, IGenericRepository<Investor> repositoryInvestor)
 {
     _repository = repository;
     _repositoryAssets = repositoryAssets;
     _identityService = identityService;
     _repositoryInvestor = repositoryInvestor;
 }
示例#3
0
 public PositionController(IPimsIdentityService identitySvc, IGenericRepository<Asset> repositoryAsset, IGenericRepository<Investor> repositoryInvestor, IGenericRepository<Position> repository, IGenericRepository<AccountType> repositoryAccountType)
 {
     _repositoryAsset = repositoryAsset;
     _identityService = identitySvc;
     _repositoryInvestor = repositoryInvestor;
     _repository = repository;
     _repositoryAccountType = repositoryAccountType;
 }
示例#4
0
 public AssetController(IGenericRepository<Asset> repository, IPimsIdentityService identityService,
                                                              IGenericRepository<Investor> repositoryInvestor,
                                                              IGenericRepository<AssetClass> repositoryAssetClass,
                                                              IGenericRepository<Profile> repositoryProfile,
                                                              IGenericRepository<AccountType> repositoryAccountType,
                                                              IGenericRepository<Position> repositoryPosition,
                                                              IGenericRepository<Income> repositoryIncome )
 {
     _repository = repository;
     _identityService = identityService;
     _repositoryInvestor = repositoryInvestor;
     _repositoryAssetClass = repositoryAssetClass;
     _repositoryProfile = repositoryProfile;
     _repositoryAccountType = repositoryAccountType;
     _repositoryPosition = repositoryPosition;
     _repositoryIncome = repositoryIncome;
 }
 public VerifyAccountTypeController(IPimsIdentityService identityService)
 {
     _identityService = identityService;
 }
示例#6
0
		//const string Culture = "CultureInfo.InvariantCulture";


		#region Development Notes:
			// XLS* = "RevenueAndAverages" "F-Done" = Fiddler tested Ok
			// TODO: - (C)reate   DONE 
			// TODO:   (R)etreive-Search : query conditions:
			//              ------------- existing SQL-based queries -----------------------------------------
			//              1. Show TOTAL revenue for a month, or any timerange, on all Assets - //TODO: F-DONE GetRevenueTotalForAllAssetsByDates()
			//              2. Show all Assets with (Q)uarterly payments - //TODO: RE-EVAL need for this!
			//              3. Show ALL REVENUE by SELECTED ASSET - (yr,month,ticker,amt) to date. - //TODO: F-DONE GetIncomeByAsset()
			//              4. Show assets with highest payments to date.//TODO: replaced by #11
			//              5. Show assets based on yields and frequency. - //TODO: DONE via Profile controller
			//              6. Show total revenue TO DATE, ordered by amount received - //TODO: DONE
			//              7. Show all REVENUE per Asset with payment count, avg.payment, and FREQUENCY
			//              8. Show monthly revenue for each asset by dates (YTD by default). - //TODO: F-DONE GetAssetRevenueHistoryByDates()
			//              9. Show ALL ASSETS and their descriptions - //TODO: DONE via Profile controller
			//             10. Show AVERAGE MONTHLY REVENUE to date  - //TODO: obsolete
			//             11. Show total revenue for each Asset based on any date range; grouped by income frequency &
			//                 ordered by amount received, in descending order. //TODO: F-DONE GetRevenueForAllAssetsByDatesGroupedByFrequency()
			//              ------------- Non-SQL based -------------------------------
			//             12. Show calendar YTD average of all income received (see XLS*)  - //TODO: F-DONE GetYtdAverageRevenue()
			//             13. Show rolling YTD 3-mos average of all income received (see XLS*) - //TODO: F-DONE GetRevenueYtdAndRollingAverages()
			//             14. Show total revenue for last 3 months (see 9/25/14 Activity Summary design)- //TODO: F-DONE GetRevenueTotalForAllAssetsByDates()
			//             15. Show YTD total revenue received (see 9/25/14 Activity Summary design) - //TODO: F-DONE GetRevenueTotalForAllAssetsByDates()
			//              ---------------------------------------------------------------------------------------------------------------------------------
			//             12. Show last 3 months revenue  - //TODO: F-Done GetRevenueLast3Months()
			// TODO:   (U)pdate - DONE
			// TODO:   (D)elete - DONE
			// TODO: ModelState.IsValid checks with Position controller - POSTs  - DONE
			// TODO: Allow for date range as part of (R)etreive query - DONE

		#endregion


		public IncomeController(IPimsIdentityService identitySvc, IGenericRepository<Asset> repositoryAsset, IGenericRepository<Investor> repositoryInvestor, IGenericRepository<Income> repository) {
			_repositoryAsset = repositoryAsset;
			_identityService = identitySvc;
			_repositoryInvestor = repositoryInvestor;
			_repository = repository;
		}
示例#7
0
 public static string GetInvestor(IPimsIdentityService identityService)
 {
     return identityService.CurrentUser ?? "*****@*****.**";
 }