示例#1
0
        public MainWindow()
        {
            InitializeComponent();

            List <Student> st = StudentService.ReadFile(@"C:\Users\meinik\Documents\students.txt");

            DataContext                = st;
            Dropdown.ItemsSource       = st;
            Dropdown.DisplayMemberPath = "ID";
            Dropdown.SelectedValuePath = "ID";
        }
示例#2
0
 private void load_Click(object sender, RoutedEventArgs e)
 {
     st = StudentService.ReadFile(@"C:\Users\meinik\Documents\students.txt");
     DataGrid1.ItemsSource = st;
 }
示例#3
0
 public Window1()
 {
     InitializeComponent();
     st = StudentService.ReadFile(@"C:\Users\meinik\Documents\students.txt");
 }