private void getDS()
        {
            clearControl();
            dg.ItemsSource = xl.getDSLapLich(xl.getDSLichKham()).ToList();

            cboNhanVien.ItemsSource       = xl.getDSNhanVienFirstNull();
            cboNhanVien.SelectedValuePath = "IDNhanVien";
            cboNhanVien.DisplayMemberPath = "HoTen";

            cboPhongKham.ItemsSource       = xl.getDSPhongKhamFirstNull();
            cboPhongKham.DisplayMemberPath = "TenPhongKham";
            cboPhongKham.SelectedValuePath = "IDPhongKham";
            cboPhongKham.SelectedIndex     = 0;

            cboCaTruc.ItemsSource       = xl.getDSCaTrucFirstNull();
            cboCaTruc.DisplayMemberPath = "TenCaTruc";
            cboCaTruc.SelectedValuePath = "IDCaTruc";
            cboCaTruc.SelectedIndex     = 0;

            txtMaLK.Text = xl.taoMaPK().ToString();
        }
Beispiel #2
0
 //private void CommandBinding_Executed_ThemPSDDV(object sender, ExecutedRoutedEventArgs e)
 //{
 //    Common.maPhieuDDK = txtMaPDDK.Text.ToString();
 //    QLPhieuSDDV f = new QLPhieuSDDV();
 //    f.ShowDialog();
 //    dgSDDV.ItemsSource = xlPDDK.getDSCTPhieuSDDV(txtMaPDDK.Text.ToString()).ToList();
 //}
 //private void CommandBinding_CanExecute_SuaPSDDV(object sender, CanExecuteRoutedEventArgs e)
 //{
 //    e.CanExecute = true;
 //}
 private void btnTraCuuLK_Click(object sender, RoutedEventArgs e)
 {
     dgLK.ItemsSource = xlLL.getDSLichKhamByDS(xlLL.getDSLichKham(dpNgayLap.SelectedDate.Value));
     //dgLK.ItemsSource = xlLL.getDSLichKhamByDS(xlLL.getDSLichKham());
 }