Example #1
0
        public ChackWindow()
        {
            InitializeComponent();

            dal = new DAL_imp();
            //MyProperty = new NotifyTaskCompletion<Currencies>(ab2());
            this.DataContext = this;
        }
Example #2
0
        private async void dfgdf()
        {
            DAL_imp dAL = new DAL_imp();
            // var co = await dAL.getCountries();
            var co1 = await dAL.getRTRatesAsync();

            //    var co2 = await dAL.getHRates();
        }
Example #3
0
        public async Task <List <HistoryDTO> > getHRatesAsync(string sourceCountryCode, string targetCountryCode = "USD")
        {
            IDAL dal = new DAL_imp();
            List <HistoryDTO> listSource = await dal.getHRatesAsync(sourceCountryCode);

            if (!String.Equals(targetCountryCode, "USD"))
            {
                List <HistoryDTO> listTarget = await dal.getHRatesAsync(targetCountryCode);

                for (int i = 0; i < listSource.Count; i++)
                {
                    listSource[i].Currency.Value /= listTarget[i].Currency.Value;
                }
            }
            return(listSource);
        }
Example #4
0
        public bool setWorker(Worker worker)
        {
            IDAL dal = new DAL_imp();

            return(dal.storeWorker(worker));
        }
Example #5
0
        public List <Worker> getWorker()
        {
            IDAL dal = new DAL_imp();

            return(dal.loadWorkers());
        }
Example #6
0
        public List <Worker> findWorker(string lastName)
        {
            IDAL dal = new DAL_imp();

            return(dal.loadWorkers().FindAll(worker => lastName.ToUpper().StartsWith(worker.lastName.ToUpper())));
        }