예제 #1
0
 public void update_datagrid()
 {
     ParserJSON pj = new ParserJSON();
     string result = pj.GetPatient();
     RadicalObject ro = JsonConvert.DeserializeObject<RadicalObject>(result);
     RegistryGrid.ItemsSource = ro.patients;
 }
예제 #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                ParserJSON pj = new ParserJSON();
                //Cвязывание ComboBox c Position
                string         resultPosition = pj.GetPosition();
                PositionObject po             = JsonConvert.DeserializeObject <PositionObject>(resultPosition);
                Cb_Position.ItemsSource       = po.positions;
                Cb_Position.DisplayMemberPath = "position_name";

                string        resultPatient = pj.GetPatient();
                RadicalObject ro            = JsonConvert.DeserializeObject <RadicalObject>(resultPatient);
                Cb_Patient.ItemsSource       = ro.patients;
                Cb_Patient.DisplayMemberPath = "fio";
            }
            catch (Exception) { }
        }
예제 #3
0
        private void textBoxName_TextChanged_1(object sender, TextChangedEventArgs e)
        {
            try
            {
                ParserJSON pj = new ParserJSON();
                string result = pj.GetPatient();
                RadicalObject ro = JsonConvert.DeserializeObject<RadicalObject>(result);
                RegistryGrid.ItemsSource = ro.patients;

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

                RegistryGrid.ItemsSource = filter_col;

                if (textBoxName.Text == "")
                {
                    update_datagrid();
                }
            }
            catch (Exception ex) { };

        }