private void TxtTimKiem_TextChanged(object sender, TextChangedEventArgs e) { DataTable dataTable = new DataTable(); if (txtTimKiem.Text.Length >= 1 && txtTimKiem.Text != "Tìm Kiếm...") { switch (type_timkiem) { case 0: { dataTable = PhimBUS.TimTheoMaP(txtTimKiem.Text.ToString()); } break; case 1: { dataTable = PhimBUS.TimTheoTenPhim(txtTimKiem.Text.ToString()); } break; } } else if (txtTimKiem.Text.Length == 0) { dataTable = PhimBUS.LoadDSPhim(); } Load_Data(dataTable); }
private void GridfrmThongTinPhim_Loaded(object sender, RoutedEventArgs e) { // carBitmap = new BitmapImage(new Uri("pack://application:,,,/Resources/cuong-phong.jpg", UriKind.Absolute)); carBitmap = new BitmapImage(new Uri(DiaChi, UriKind.Absolute)); DispatcherTimer timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += timer_Tick; timer.Start(); if (txtND.Text == "") { carImg.Width = 165; carImg.Height = 230; carImg.Source = carBitmap; canvas1.Children.Add(carImg); } DataTable dataTable = new DataTable(); dataTable = PhimBUS.TimTheoMaP(MaPhim); Load_Data(dataTable); }
private void GridfrmThongTinPhim_Loaded(object sender, RoutedEventArgs e) { Image carImg = new Image(); BitmapImage carBitmap = new BitmapImage(new Uri(DiaChi, UriKind.Absolute)); carImg.Width = 165; carImg.Height = 260; carImg.Source = carBitmap; carImg.Stretch = Stretch.Fill; canvas1.Children.Add(carImg); ImageBrush myBrush = new ImageBrush(); Image image = new Image(); image.Source = new BitmapImage(new Uri(DiaChi)); myBrush.ImageSource = image.Source; myBrush.Opacity = 0.4; GridfrmThongTinPhim.Background = myBrush; DataTable dataTable = new DataTable(); dataTable = PhimBUS.TimTheoMaP(MaPhim); Load_Data(dataTable); }
public DataTable SearchByID(string ID) { return(bus.TimTheoMaP(ID)); }