public bool IsScriptValid() { bool IsValid = true; if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetGlobalEventById(GlobalEvent)) == false) { GlobalEvent = Guid.Empty; IsValid = false; } return(IsValid); }
public bool IsScriptValid() { bool IsValid = true; if (Character != new Guid(GlobalConstants.CURRENT_PLAYER_ID) && ValidationTools.CheckObjectExistence(GameCore.Instance.GetPlayableCharacterById(Character)) == false) { Character = Guid.Empty; IsValid = false; } return(IsValid); }
public bool IsScriptValid() { bool IsValid = true; if (ValidationTools.CheckObjectExistence(Coords) == false || ValidationTools.CheckMapExistence(Coords) == false) { Coords.Map = Guid.Empty; IsValid = false; } return(IsValid); }
public bool IsScriptValid() { bool IsValid = true; if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetTriggerById(Button)) == false) { Button = Guid.Empty; IsValid = false; } return(IsValid); }
protected override void OnBefore(IInvocation invocation) { var validator = (IValidator)Activator.CreateInstance(_validatorType); var entityType = _validatorType.BaseType.GetGenericArguments()[0]; var entities = invocation.Arguments.Where(t => t.GetType() == entityType); foreach (var entity in entities) { ValidationTools.Validate(validator, entity); } }
public bool IsScriptValid() { bool IsValid = true; if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetVariableById(Variable)) == false) { Variable = Guid.Empty; IsValid = false; } return(IsValid); }
public bool IsScriptValid() { bool IsValid = true; if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetStageCharacter(Character)) == false) { Character = Guid.Empty; IsValid = false; } return(IsValid); }
protected override void OnBefore(IInvocation invocation) { var validator = (IValidator)Activator.CreateInstance(_validatorType); var entityType = _validatorType.BaseType.GetGenericArguments()[0];//0.prop u ifade eder, yani PRODUCT ı çeker //invocation method , bu methodun argumanlarına bak var entities = invocation.Arguments.Where(t => t.GetType() == entityType); foreach (var entity in entities) { ValidationTools.Validate(validator, entity); } }
private void Init() { try { this._Validator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } FillComboBoxes(); }
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>(); }
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); }
/// <summary> /// Récupère une nouvelle instance d'un objet /// </summary> /// <param name="pId"></param> /// <returns></returns> public VO_Animation GetCharAnimationById(Guid idChar, Guid idAnim) { VO_Character character = GameCore.Instance.GetCharacterById(idChar); if (character.Id != Guid.Empty) { VO_Animation charAnimation = character.Animations.Find(p => p.Id == idAnim); if (charAnimation != null) { return(charAnimation); } } return((VO_Animation)ValidationTools.CreateEmptyRessource(new VO_Animation())); }
public VO_StageAnimation GetStageAnimation(Guid animation) { foreach (VO_Stage item in Game.Stages) { foreach (VO_Layer layer in item.ListLayers) { VO_StageAnimation stageAnimation = layer.ListAnimations.Find(i => i.Id == animation); if (stageAnimation != null) { return(stageAnimation); } } } return((VO_StageAnimation)ValidationTools.CreateEmptyRessource(new VO_StageAnimation())); }
public bool IsScriptValid() { bool IsValid = true; if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetPlayableCharacterById(Character)) == false) { Character = Guid.Empty; IsValid = false; } else if (UseOldCoords == false && (ValidationTools.CheckObjectExistence(Coords) == false || ValidationTools.CheckMapExistence(Coords) == false)) { Coords.Map = Guid.Empty; IsValid = false; } return(IsValid); }
private bool validation() { BulletedList_InfoFeedBack.Items.Clear(); if (!ValidationTools.chequeDestination(TextBox_Destination.Text)) { BulletedList_InfoFeedBack.Items.Add("Invalid Destination"); return(false); } if (!ValidationTools.chequeTime(TextBox_Hour.Text, TextBox_Minute.Text)) { BulletedList_InfoFeedBack.Items.Add("Invalid Time"); return(false); } return(true); }
private void Init() { try { _Validator = new ValidationTools(); } catch (Exception ex) { MessageBoxEnhanced.Error(ex.Message); return; } this.DataContext = _CurrentTeamMember; FillComboBoxes(); }
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; }
public bool IsScriptValid() { VO_PlayableCharacter playableCharacter = GameCore.Instance.GetPlayableCharacterById(Character); bool IsValid = true; if (ValidationTools.CheckObjectExistence(playableCharacter) == false) { Character = Guid.Empty; IsValid = false; } if (ValidationTools.CheckObjectExistence(GameCore.Instance.GetCharAnimationById(playableCharacter.CharacterId, Animation)) == false) { Animation = Guid.Empty; IsValid = false; } return(IsValid); }
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; }
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)); } }
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 { _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; }
/// <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; } }
public void Update(Product product) { ValidationTools.Validata(new ProoductValidator(), product); this._productDal.Update(product); }
public void Add(Product product) { ValidationTools.Validata(new ProoductValidator(), product); this._productDal.Add(product); }
public void Add(Arac entity) { ValidationTools.Validate(new AracValidator(), entity); _dal.Add(entity); }
public void CreateOrder(Order order) { ValidationTools.FluentValidate(new OrderValidator(), order); order.OrderPlaced = DateTime.Now; _orderDal.Add(order); }
public void Update(Arac entity) { ValidationTools.Validate(new AracValidator(), entity); _dal.Update(entity); }
public void Update(Fatura entity) { ValidationTools.Validate(new FaturaValidator(), entity); _dal.Update(entity); }