private void Dodaj_Click(object sender, RoutedEventArgs e) { ViewBase vb = new ViewBase(1); vb.AddItemCallback = new AddItemDelegate(this.AddItemCallbackFn); vb.ShowDialog(); }
private void button1_Click(object sender, RoutedEventArgs e) { AptekaDataDataContext con = new AptekaDataDataContext(); ViewBase viewbase = new ViewBase(); List<Lek> lek = (from l in con.Leks where l.Nazwa.StartsWith(textBox1.Text) || l.M_nazwa.StartsWith(textBox2.Text) select l).ToList(); viewbase.LekGird.ItemsSource = lek; viewbase.search = 1; viewbase.ShowDialog(); }
//Przycisk Menu->Przyglądaj bazę private void MenuItem_Click_5(object sender, RoutedEventArgs e) { //Tworze okno "Przyglądaj bazę" ViewBase viewbase = new ViewBase(); viewbase.ShowDialog(); }