public pEditBooking(Booking booking) { if (booking == null) { throw new Exception("Booking cannot be null."); } InitializeComponent(); this.validator = new ValidationTools(); this.currentBooking = booking; // Fülle Felder fillFieldsWithSavedData(booking); }
public pNewBooking() { InitializeComponent(); this.validator = new ValidationTools(); // Generiere Menüeinträge List<Account> accounts = Account.GetAccounts().ToList(); cbSourceAccount.ItemsSource = accounts; cbTargetAccount.ItemsSource = accounts; cbTargetAccount.SelectionChanged -= cbTargetAccount_SelectionChanged; cbSourceAccount.SelectionChanged -= cbSourceAccount_SelectionChanged; cbSourceAccount.SelectedItem = null; cbTargetAccount.SelectedItem = null; cbTargetAccount.SelectionChanged += cbTargetAccount_SelectionChanged; cbSourceAccount.SelectionChanged += cbSourceAccount_SelectionChanged; }
public pNewAccount() { InitializeComponent(); this.validator = new ValidationTools(); lbIsOfficial.Content = IniParser.GetSetting("ACCOUNTING", "lbIsOfficial"); lbIsCapital.Content = IniParser.GetSetting("ACCOUNTING", "lbIsCapital"); lbWhenZeroBilance.Content = IniParser.GetSetting("ACCOUNTING", "lbWhenZeroBilance"); lbFixedAccount.Content = IniParser.GetSetting("ACCOUNTING", "lbFixedAccount"); // Initialisiere ComboBox mit Null-Zeiträumen List<AccountZeroPeriodEnum> zeroPeriods = new List<AccountZeroPeriodEnum>(); zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.EveryCashClosure)); zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Annually)); zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Monthly)); zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Never)); cbZeroPeriod.ItemsSource = zeroPeriods; }
private void Init() { try { this._Validator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } FillComboBoxes(); }
private void Init() { try { _Validator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } this.DataContext = _CurrentTeamMember; FillComboBoxes(); }
/// <summary> /// Initialisiert alle Variablen /// </summary> private void Init() { this.validator = new ValidationTools(); this.DataContext = this.currentAccount; tbAccountName.Text = this.currentAccount.Name; tbAccountDescription.Text = this.currentAccount.Description; chkbIsOfficial.IsChecked = this.currentAccount.IsOfficial; chkbIsCapital.IsChecked = this.currentAccount.IsCapital; chkbIsFixAccount.IsChecked = this.currentAccount.IsFixed; // Initialisiere ComboBox mit Null-Zeiträumen List<AccountZeroPeriodEnum> zeroPeriods = new List<AccountZeroPeriodEnum>(); zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.EveryCashClosure)); zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Annually)); zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Monthly)); zeroPeriods.Add(new AccountZeroPeriodEnum(DataModel.Enums.ZeroPeriod.Never)); cbZeroPeriod.ItemsSource = zeroPeriods; // wähle das richtige aus if (this.currentAccount.ZeroPeriod == (int)DataModel.Enums.ZeroPeriod.EveryCashClosure) cbZeroPeriod.SelectedIndex = 0; if (this.currentAccount.ZeroPeriod == (int)DataModel.Enums.ZeroPeriod.Annually) cbZeroPeriod.SelectedIndex = 1; if (this.currentAccount.ZeroPeriod == (int)DataModel.Enums.ZeroPeriod.Monthly) cbZeroPeriod.SelectedIndex = 2; if (this.currentAccount.ZeroPeriod == (int)DataModel.Enums.ZeroPeriod.Never) cbZeroPeriod.SelectedIndex = 3; }
private void Init() { try { _Validator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } gbCompanySponsor.Visibility = System.Windows.Visibility.Collapsed; gbCompanySponsor.IsEnabled = false; this.DataContext = this._CurrentSponsor; // Title ComboBox var titles = DB.Title.GetTitles(); cbTitle.ItemsSource = titles; cbTitle.SelectedItem = titles.SingleOrDefault(t => t.TitleID == _CurrentSponsor.Title.TitleID); // FundingType ComboBox var fundingTypes = DB.FundingType.GetFundingTypes(); cBFundType.ItemsSource = fundingTypes; cBFundType.SelectedItem = fundingTypes.SingleOrDefault(ft => ft.FundingTypeID == _CurrentSponsor.FundingType.FundingTypeID); }
private void Init() { try { this._PersonValidator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } this._Childs = new List<DB.Child>(); // Jeder neue Kunde bekommt zunächst eine TafelNummer this._TableNo = DB.Person.GetNewIdentityNo(); txtTableNo.Text = this._TableNo.ToString(); // Title ComboBox cbTitle.ItemsSource = DB.Title.GetTitles(); // FamilyState ComboBox cbFamilyState.ItemsSource = DB.FamilyState.GetFamilyStates(); // Gültig von/bis -> Personalien dpStartDate.SelectedDate = DateTime.Now; dpEndDate.SelectedDate = DateTime.Now.AddMonths(6); // 6 Monate gültig // Gruppen ComboBox befüllen cbGroup.Items.Add("1"); cbGroup.Items.Add("2"); this._IsInitialized = true; }
public pNewUser() { InitializeComponent(); this.validator = new ValidationTools(); }
private void Init() { try { this._PartnerChildValidator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } this._Childs = new List<ChildModel>(); this._ValidChilds = new List<ChildModel>(); personLastName = ""; // Title ComboBox cbTitle1.ItemsSource = DB.Title.GetTitles(); }
/// <summary> /// Initialisiert alle Variablen /// </summary> private void Init() { this.validator = new ValidationTools(); this.DataContext = this.currentUserAccount; tbBenutzername.Text = this.currentUserAccount.Username; tbPasswort.Password = this.currentUserAccount.Password; tbPasswortConfirmation.Password = this.currentUserAccount.Password; chkbIsAdmin.IsChecked = this.currentUserAccount.IsAdmin; tbImage.Text = this.currentUserAccount.ImageName; this.fileName = this.currentUserAccount.ImageName; string image = IniParser.GetSetting("SETTINGS", "imagePath") + "/" + this.currentUserAccount.ImageName; if (File.Exists(image)) userImage.Source = BitmapFrame.Create(new Uri(image, UriKind.Relative)); }
private void Init() { try { this._RevenuesValidator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } this._Revenues = new List<RevenueModel>(); this._ValidRevenues = new List<RevenueModel>(); }
private void Init() { this.deletedChilds = new List<int>(); try { this._PartnerChildValidator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } this._Childs = new List<ChildModel>(); this._ValidChilds = new List<ChildModel>(); this.DataContext = _currentPerson; }
private void Init() { try { _Validator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } // Title ComboBox cbTitle.ItemsSource = DataModel.Title.GetTitles(); // FundingType ComboBox cBFundingTyp.ItemsSource = FundingType.GetFundingTypes(); gbCompanySponsor.Visibility = System.Windows.Visibility.Collapsed; gbCompanySponsor.IsEnabled = false; }
private void Init() { try { this._PersonValidator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } this._Childs = new List<ChildModel>(); //Datenkontext für die Seite festlegen this.DataContext = _currentPerson; // Title ComboBox var titles = DataModel.Title.GetTitles().ToList(); cbTitle.ItemsSource = titles; if (_currentPerson.Title != null) { cbTitle.SelectedIndex = titles.FindIndex(t => t.TitleID == _currentPerson.Title.TitleID); } // FamilyState ComboBox var familyStates = DB.FamilyState.GetFamilyStates().ToList(); cbFamilyState.ItemsSource = familyStates; if (_currentPerson.FamilyState != null) { cbFamilyState.SelectedIndex = familyStates.FindIndex(f => f.FamilyStateID == _currentPerson.FamilyState.FamilyStateID); } // Gültig von/bis -> Personalien dpStartDate.SelectedDate = _currentPerson.ValidityStart; dpEndDate.SelectedDate = _currentPerson.ValidityEnd; // Gruppen ComboBox befüllen cbGroup.Items.Add("1"); cbGroup.Items.Add("2"); //Richtige Gruppe auswählen if (_currentPerson.Group == 1) cbGroup.SelectedIndex = 0; else cbGroup.SelectedIndex = 1; setNumberOfChild(_currentPerson.NumberOfChildren.ToString()); this._IsInitialized = true; }