示例#1
0
 private void Refresh()
 {
     PartListGlobal = PartSystem.PartList();
     this.ExistingPartsDataGrid.ItemsSource = PartListGlobal;
     ExistingPartsDataGrid.Items.Refresh();
     this.Width = 800;
     ItemDetailsGrid.Visibility = Visibility.Hidden;
     PartAddedNotSaved          = false;
 }
示例#2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (PartSystem.TryLogin(LoginBox.Text, PassBox.Password))
         {
             ChooseWindow choosewindow = new ChooseWindow();
             choosewindow.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("Błędne dane");
         }
     }
     catch (Exception ex)
     {
     }
 }
示例#3
0
        private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            ExistingPartsDataGrid.ItemsSource = PartSystem.SearchInList(PartListGlobal, SearchBox.Text, (searchTypeCB.SelectedItem as ComboBoxItem).Content.ToString());

            ExistingPartsDataGrid.Items.Refresh();
        }
示例#4
0
 private void SaveButton_Click(object sender, RoutedEventArgs e)
 {
     PartSystem.AddUpdate(PartIDTB.Text, NameTB.Text, DescriptionTB.Text, (ChangeTypeCB.SelectedItem as ComboBoxItem).Content.ToString(), ExtNameTB.Text, part.id);
     Refresh();
 }