public void LoadDataGridlike(string like)
 {
     try
     {
         courseImpl           = new CourseImpl();
         dgvDatos.ItemsSource = null;
         dgvDatos.ItemsSource = courseImpl.Selectlike(like).DefaultView;
     }
     catch (Exception ex) { MessageBox.Show(ex.Message); }
 }
        private void DgvDatos_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
        {
            if (dgvDatos.Items.Count > 0 && dgvDatos.SelectedItem != null)
            {
                try
                {
                    DataRowView dataRow = (DataRowView)dgvDatos.SelectedItem;
                    int         id      = int.Parse(dataRow.Row.ItemArray[0].ToString());

                    courseImpl         = new CourseImpl();
                    course             = courseImpl.Get(id);
                    lblcourse.Content  = "" + course.Number;
                    lblletter.Content  = course.Letter;
                    lblsection.Content = course.Section;
                    btnStu.IsEnabled   = true;
                    btnSubs.IsEnabled  = true;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }