Esempio n. 1
0
        private void WindowSelectionCosmetics_Loaded(object sender, RoutedEventArgs e)
        {
            var list = logic.Read(new CosmeticBindingModel {
                EmployeeId = employeeId
            });

            if (list != null)
            {
                ComboBoxCosmeticName.ItemsSource = list;
            }
        }
Esempio n. 2
0
        private void WindowSelectionCosmeticsForPurchaseList_Loaded(object sender, RoutedEventArgs e)
        {
            var list = logic.Read(new CosmeticBindingModel {
                EmployeeId = employeeId
            });

            if (list != null)
            {
                ComboBoxCosmeticName.ItemsSource = list;
            }
            if (id != null)
            {
                ComboBoxCosmeticName.SelectedItem = SetValue(id.Value);
            }
        }
 private void LoadData()
 {
     try
     {
         var list = logic.Read(new CosmeticBindingModel {
             EmployeeId = id
         });
         if (list != null)
         {
             dataGrid.ItemsSource           = list;
             dataGrid.Columns[0].Visibility = Visibility.Hidden;
             dataGrid.Columns[1].Visibility = Visibility.Hidden;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Esempio n. 4
0
 private void WindowCosmetic_Loaded(object sender, RoutedEventArgs e)
 {
     if (id.HasValue)
     {
         try
         {
             var view = logic.Read(new CosmeticBindingModel {
                 Id = id
             })?[0];
             if (view != null)
             {
                 TextBoxName.Text  = view.CosmeticName;
                 TextBoxPrice.Text = view.Price.ToString();
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
 }