private async void btnFlashFiltrClick(object sender, RoutedEventArgs e) { ClearFiltr(); // dateBirthDayDateePicker.Text = ""; await FViewDataContext.SetDefaultCardsViewSource(); }
private async void Window_Loaded(object sender, RoutedEventArgs e) { var RVDataContext = new RealVisionDataContext(); FDataHelper = new DataHelper(); //var xPtntQuery = RVDataContext.tblPatients.Include("tblDocumentCommons").Where(ptnt => ptnt is tblPatientInfo).Take(10); //var xDocQuery = RVDataContext.tblDocumentCommons.Where(doc => ((doc.DateDelete == null) && (!doc.Printed))).OrderByDescending(doc => doc.DateCreate); //xPtntQuery.ToList(); //xDocQuery.ToList(); // TODO : загрузить последние карточки, в фоновом потоке FViewDataContext = ViewDataContext.Instance; //await FViewDataContext.SetDefaultDocsViewSource(); await FViewDataContext.SetDefaultCardsViewSource(); CollectionViewSource tblDefaultOfferViewSource = ((CollectionViewSource)(this.FindResource("tblDefaultOfferViewSource"))); tblDefaultOfferViewSource.Source = FViewDataContext.DictDefaultOffers; CollectionViewSource tblEmployeeViewSource = ((CollectionViewSource)(FindResource("tblEmployeeViewSource"))); tblEmployeeViewSource.Source = FViewDataContext.DictEmployees; pnlMainPanient.DateTimeLostEvent += pnlMainPanient_DateTimeLostEvent; }