public CustomersView() { InitializeComponent(); NotVisibleColumns.Add(nameof(Customer.Address)); NotVisibleColumns.Add(nameof(Customer.AdditionalInfo)); NotVisibleColumns.Add(nameof(Customer.GoogleDriveFolderName)); NotVisibleColumns.Add(nameof(Customer.Administrator)); dgCustomers.Tag = NotVisibleColumns; BindingControl(dgCustomers, () => CustomersVM.Customers); txtExpanderHeader.Text = new CategoryViewModel().Categories.Where(c => c.MangementType == Helper.Helper.TTypeMangement.Customer).Select(c => c.Name).FirstOrDefault(); expanderCustomers.Expanded += ExpanderCustomers_Expanded; expanderCustomers.Collapsed += ExpanderCustomers_Collapsed; }
public LocationsView() { InitializeComponent(); //Task.Factory.StartNew(() => //{ // LocationsVM.Refresh(); //}); LocationsVM.Refresh(); NotVisibleColumns.Add(nameof(Location.GoogleDriveFolderName)); dgLocations.Tag = NotVisibleColumns; BindingControl(dgLocations, () => LocationsVM.Locations); //txtExpanderHeader.Text = new CategoryViewModel().Categories.Where(c => c.MangementType == Helper.Helper.TTypeMangement.Location).Select(c => c.Name).FirstOrDefault(); txtExpanderHeader.Text = "Standorte"; expanderLocations.Expanded += ExpanderLocations_Expanded; expanderLocations.Collapsed += ExpanderLocations_Collapsed; }
public ManagementView(DataGrid dgCategory) { InitializeComponent(); LoadingIndicatorPanel.Visibility = Visibility.Visible; MainContent.IsEnabled = false; Task.Factory.StartNew(() => { Task.Factory.StartNew(() => ManagementVM.Refresh()); var result = Application.Current.Dispatcher.BeginInvoke( DispatcherPriority.Background, new Action(() => { recordsView = new RecordsView(); frameRecords.Content = recordsView; recordsView.dgRecords.SelectionChanged += DgRecords_SelectionChanged; dgCategory.SelectionChanged += DgCategory_SelectionChanged; //ManagementVM.Refresh(); cbAdministrators.SelectionChanged += CbAdministrators_SelectionChanged; cbCustomers.SelectionChanged += CbCustomers_SelectionChanged; cbLocations.SelectionChanged += CbLocations_SelectionChanged; cbMachineInformations.SelectionChanged += CbMachineInformations_SelectionChanged; dgContactPersons.ToolTipOpening += DgContactPersons_ToolTipOpening; dgContactPersons.LoadingRow += DgContactPersons_LoadingRow; dgOthers.SelectionChanged += DgOthers_SelectionChanged; dgOthers.PreviewKeyDown += DgOthers_PreviewKeyDown; NotVisibleColumns.Add(nameof(ContactPartner.PhoneWork)); NotVisibleColumns.Add(nameof(ContactPartner.Mobile)); NotVisibleColumns.Add(nameof(ContactPartner.EMail)); NotVisibleColumns.Add(nameof(ContactPartner.ContactByDefect)); dgContactPersons.Tag = NotVisibleColumns; //this.Loaded += ManagementView_Loaded; InitOverviewFilterView(); overviewFilterView.SetDoubleClickEventHandler(Row_DoubleClick); InitRecordView(); btnSearch.Click += BtnSearch_Click; txtSearch.KeyUp += TxtSearch_KeyUp; //TODO dgOthers cell make vertical scrollabl //TODO Keyordnavigation AssigneValuesToControl(); this.Dispatcher.ShutdownStarted += Dispatcher_ShutdownStarted; spRecordBtns.IsEnabled = false; dgOthers.IsEnabled = false; })); }).ContinueWith((task) => { LoadingIndicatorPanel.Visibility = Visibility.Collapsed; MainContent.IsEnabled = true; }, TaskScheduler.FromCurrentSynchronizationContext()); }
public EmergencyAgreementView() { InitializeComponent(); AssignSelectAllForTextBoxes(); LoadingIndicatorPanel.Visibility = Visibility.Visible; gridResizableEmergencyAgreements.IsEnabled = false; Task.Factory.StartNew(() => { var customersVM = new CustomersViewModel(); customersVM.RefreshOnlyCustomers(); var result = Application.Current.Dispatcher.BeginInvoke( DispatcherPriority.Background, new Action(() => { customersView = new CustomersView(); customersView.CustomersVM = customersVM; frameCustomers.Content = customersView; locationsView = new LocationsView(); frameLocations.Content = locationsView; var machineInformationsView = new MachineInformationsView(); machineInformationsView.NotVisibleColumns.Add(nameof(MachineInformation.GoogleDriveFolderName)); machineInformationsView.NotVisibleColumns.Add(nameof(MachineInformation.ContactPerson)); machineInformationsView.NotVisibleColumns.Add(nameof(MachineInformation.Description)); machineInformationsView.NotVisibleColumns.Add(nameof(MachineInformation.Payload)); machineInformationsView.NotVisibleColumns.Add(nameof(MachineInformation.Entrances)); machineInformationsView.NotVisibleColumns.Add(nameof(MachineInformation.HoldingPositions)); machineInformationsView.NotVisibleColumns.Add(nameof(MachineInformation.HoldingPositions)); frameMachineInformations.Content = machineInformationsView; masterDataInfo = new MasterDataInfoView(Helper.Helper.TTypeMangement.EmergencyAgreement); masterDataInfo.cbMachineInformations.SelectionChanged += CbMachineInformations_SelectionChanged; masterDataInfo.RefreshCustomers(); frameMasterDataInfo.Content = masterDataInfo; customersView.dgCustomers.SelectionChanged += DgCustomers_SelectionChanged; locationsView.dgLocations.SelectionChanged += DgLocations_SelectionChanged; machineInformationsView.dgMachineInformations.SelectionChanged += DgMachineInformations_SelectionChanged; NotVisibleColumns.Add(nameof(EmergencyAgreement.GoogleCalendarEventId)); dgEmergencyAgreements.Tag = NotVisibleColumns; dgEmergencyAgreements.SelectionChanged += DgEmergencyAgreements_SelectionChanged; dgEmergencyAgreements.SelectedIndex = 0; EmergencyAgreementVM.LoadComboboxes(); AssigneValuesToControl(); cbNoticeOfPeriodMonth.ItemsSource = GetMonths(); cbNoticeOfPeriodMonth.SelectedIndex = 2; txtNoticeOfPeriod.Text = "Monate"; EnableContoles(false); })); }).ContinueWith((task) => { LoadingIndicatorPanel.Visibility = Visibility.Collapsed; gridResizableEmergencyAgreements.IsEnabled = true; }, TaskScheduler.FromCurrentSynchronizationContext()); }
public MachineInformationView() { InitializeComponent(); AssignSelectAllForTextBoxes(); //TODO select only Customer //TODO Datetime Validation and format of filed //Task.Factory.StartNew(() => //{ // var customersVM = new CustomersViewModel(); // customersVM.RefreshOnlyCustomers(); // Application.Current.Dispatcher.BeginInvoke( // DispatcherPriority.Background, // new Action(() => // { // customersView = new CustomersView(); // customersView.CustomersVM = customersVM; // frameCustomers.Content = customersView; // var locationsView = new LocationsView(); // frameLocations.Content = locationsView; // customersView.expanderCustomers.Collapsed += ExpanderCustomers_Collapsed; // customersView.dgCustomers.SelectionChanged += DgCustomers_SelectionChanged; // locationsView.expanderLocations.Collapsed += ExpanderLocations_Collapsed; // locationsView.dgLocations.SelectionChanged += DgLocations_SelectionChanged; // })); //}); LoadingIndicatorPanel.Visibility = Visibility.Visible; gridResizableMachineInformation.IsEnabled = false; Task.Factory.StartNew(() => { var customersVM = new CustomersViewModel(); customersVM.RefreshOnlyCustomers(); Application.Current.Dispatcher.BeginInvoke( DispatcherPriority.Background, new Action(() => { customersView = new CustomersView(); customersView.CustomersVM = customersVM; frameCustomers.Content = customersView; var locationsView = new LocationsView(); frameLocations.Content = locationsView; NotVisibleColumns.Add(nameof(MachineInformation.ContactPerson)); dgMachineInformations.SelectionChanged += DgMachineInformations_SelectionChanged; dgMachineInformations.SelectedIndex = 0; AssigneValuesToControl(); customersView.expanderCustomers.Collapsed += ExpanderCustomers_Collapsed; customersView.dgCustomers.SelectionChanged += DgCustomers_SelectionChanged; locationsView.expanderLocations.Collapsed += ExpanderLocations_Collapsed; locationsView.dgLocations.SelectionChanged += DgLocations_SelectionChanged; masterDataInfo = new MasterDataInfoView(Helper.Helper.TTypeMangement.MachineInformation); masterDataInfo.cbLocations.SelectionChanged += CbLocations_SelectionChanged; masterDataInfo.RefreshCustomers(); frameMasterDataInfo.Content = masterDataInfo; })); }).ContinueWith((task) => { LoadingIndicatorPanel.Visibility = Visibility.Collapsed; gridResizableMachineInformation.IsEnabled = true; }, TaskScheduler.FromCurrentSynchronizationContext()); EnableContoles(false); }