private void WindowBindingProcedure_Loaded(object sender, RoutedEventArgs e) { var list = logic.Read(new ProcedureBindingModel { ClientId = clientId }); if (list != null) { ComboBoxProcedures.ItemsSource = list; } }
private void LoadData() { var list = logic.Read(new ProcedureBindingModel { ClientId = id }); if (list != null) { dataGridProcedures.ItemsSource = list; dataGridProcedures.Columns[0].Visibility = Visibility.Hidden; dataGridProcedures.Columns[1].Visibility = Visibility.Hidden; } }
private void WindowProcedure_Loaded(object sender, RoutedEventArgs e) { if (id.HasValue) { try { var view = logic.Read(new ProcedureBindingModel { Id = id })?[0]; if (view != null) { textBoxName.Text = view.ProcedureName; textBoxPrice.Text = view.Price.ToString(); textBoxDuration.Text = view.Duration.ToString(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error); } } }