Exemplo n.º 1
0
        protected override void InitializationComplete()
        {
            // init
            _moneyTransferEventService = ServiceManager.ConfigureService <MoneyTransferEventService>();
            _repayDebtEventService     = ServiceManager.ConfigureService <RepayDebtEventService>();
            _simpleEventService        = ServiceManager.ConfigureService <SimpleEventService>();
            _limitService         = ServiceManager.ConfigureService <LimitService>();
            _recordService        = ServiceManager.ConfigureService <RecordService>();
            _moneyTransferService = ServiceManager.ConfigureService <MoneyTransferService>();

            InitializeViewModel();
            _areLimitsLoaded = false;
        }
        public MoneyTransferEventDetailsView(IMoneyTransferEventService service, MoneyTransferEventModel entity, bool isNew)
            : base(service, entity, isNew)
        {
            InitializeComponent();

            // init
            eventService = ServiceManager.ConfigureService <EventService>();

            // load storages
            IStorageService storageService = ServiceManager.ConfigureService <StorageService>();

            _storages = storageService.GetVisible(GlobalVariables.UserId, entity.StorageFromId, entity.StorageToId);

            comboFromStorage.ItemsSource = _storages;
            comboToStorage.ItemsSource   = _storages;

            // set currencies list
            compCurrencyExchangeRate.CurrencyIds = _storages.Select(_ => _.CurrencyId).Distinct().ToList();

            // set header and commands panel context
            LabelHeader.Content       = ViewHeader;
            CommandsPanel.DataContext = Commands;
        }
Exemplo n.º 3
0
 public EventService(ApplicationDbContext context) : base(context)
 {
     _simpleEventService        = new SimpleEventService(context);
     _repayDebtEventService     = new RepayDebtEventService(context);
     _moneyTransferEventService = new MoneyTransferEventService(context);
 }