public Module() { View = new CustomersView(); }
public void UpdateCustomersView() { CustomersView.ClearValue(ListView.ItemsSourceProperty); CustomersView.ItemsSource = displayList; }
private void btnCustomer_Click(object sender, EventArgs e) { CustomersView c = new CustomersView(employee); ChangeLayout(c); }
/// <summary> /// Открывает окно с клиентами /// </summary> /// <param name="obj"></param> private static void CustomOpen(object obj) { CustomersView customersView = new CustomersView(); customersView.ShowDialog(); }
private void btnDelete_ItemClick(object sender, ItemClickEventArgs e) { object toDelete = CustomersView.GetFocusedRow(); Session.Delete(toDelete); }
public App() { InitializeComponent(); MainPage = new CustomersView(); }
private void Export() { AllowInput = false; try { SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "JSON|*.json"; sfd.DefaultExt = "json"; if (sfd.ShowDialog() == true) { FileExporter.FileExporter.ExportCustomer(sfd.FileName, Customers.Where(c => CustomersView.Filter(c)).ToList()); } } catch (IOException e) { MessageBox.Show("Unexpected error occurred while loading JSON file. Details:/n" + e.ToString(), "Error", MessageBoxButton.OK, MessageBoxImage.Error); } catch (Exception) { MessageBox.Show("Unexpected error occurred while importing", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } finally { AllowInput = true; } }