Example #1
0
        private void BtnSua_Click(object sender, RoutedEventArgs e)
        {
            CauHoi temp = ((Button)sender).DataContext as CauHoi;
            Sua    sua  = new Sua(temp);

            sua.ShowDialog();
            if (sua.isChange())
            {
                lsvCauHoi.ItemsSource = DataProvider.Instance.GetLstCauHoi();
            }
        }
Example #2
0
 public Sua(CauHoi Cauhoi)
 {
     InitializeComponent();
     this.Cauhoi           = Cauhoi;
     cbTheLoai.ItemsSource = DataProvider.Instance.GetTheLoai();
     //cbTheLoai.DisplayMemberPath = "TheLoai";
     //cbTheLoai.SelectedValuePath = "TheLoai";
     cbTheLoai.SelectedValue = Cauhoi.MaTheLoai;
     txbCauHoi.Text          = Cauhoi.NoiDung;
     txbDapAnA.Text          = Cauhoi.DapAnA;
     txbDapAnB.Text          = Cauhoi.DapAnB;
     txbDapAnC.Text          = Cauhoi.DapAnC;
     txbDapAnD.Text          = Cauhoi.DapAnD;
 }