예제 #1
0
        public void update_datagrid()
        {
            ParserJSON pj     = new ParserJSON();
            string     result = pj.GetDoctors();
            RootObject ro     = JsonConvert.DeserializeObject <RootObject>(result);

            DoctorsGrid.ItemsSource = ro.doctors;
        }
예제 #2
0
        private void LoadForm()
        {
            ParserJSON           pj  = new ParserJSON();
            HeadPhysicianWindows hpw = new HeadPhysicianWindows();

            hpw.DoctorsGrid.ItemsSource = null;
            string     result = pj.GetDoctors();
            RootObject ro     = JsonConvert.DeserializeObject <RootObject>(result);

            hpw.DoctorsGrid.ItemsSource = ro.doctors;
        }
예제 #3
0
        private void textBoxName_TextChanged_1(object sender, TextChangedEventArgs e)
        {
            try
            {
                ParserJSON pj     = new ParserJSON();
                string     result = pj.GetDoctors();
                RootObject ro     = JsonConvert.DeserializeObject <RootObject>(result);
                DoctorsGrid.ItemsSource = ro.doctors;

                var oc = ro.doctors;
                DataValue.TextSearch = textBoxName.Text;
                var filter_col = oc.Where(itemF => itemF.search == textBoxName.Text);

                DoctorsGrid.ItemsSource = filter_col;

                if (textBoxName.Text == "")
                {
                    update_datagrid();
                }
            }
            catch (Exception ex) { };
        }
예제 #4
0
        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);
            }
        }