public void update_datagrid() { ParserJSON pj = new ParserJSON(); string result = pj.GetJournal(); RadixObject ro = JsonConvert.DeserializeObject <RadixObject>(result); JournalGrid.ItemsSource = ro.journal; this.Title = DataValue.Position; }
private void textBoxName_TextChanged_1(object sender, TextChangedEventArgs e) { try { ParserJSON pj = new ParserJSON(); string result = pj.GetJournal(); RadixObject ro = JsonConvert.DeserializeObject <RadixObject>(result); JournalGrid.ItemsSource = ro.journal; var oc = ro.journal; DataValue.TextSearch = textBoxName.Text; var filter_col = oc.Where(itemF => itemF.search == textBoxName.Text); JournalGrid.ItemsSource = filter_col; if (textBoxName.Text == "") { update_datagrid(); } } catch (Exception ex) { }; }
private void Window_Loaded(object sender, RoutedEventArgs e) { try { string result_doc = pj.GetDoctors(); string result_jour = pj.GetAllJournal(); RootObject ro_doc = JsonConvert.DeserializeObject <RootObject>(result_doc); RadixObject ro_jour = JsonConvert.DeserializeObject <RadixObject>(result_jour); JournalGrid.ItemsSource = ro_jour.journal; UserGrid.ItemsSource = ro_doc.doctors; var timer = new System.Windows.Threading.DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 1); timer.IsEnabled = true; timer.Tick += (o, t) => { TimeCurrent.Text = DateTime.Now.ToString(); }; timer.Start(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }