private void zipCode_Validate(object sender, ValidationEventArgs e)
 {
     facilityDataValid.zipCode = false;
     if (e.Value == null)
     {
         e.SetError("A mező kitöltése kötelező", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
         FacilityDataVM.ItemSourceSearcher("zipCode", null);
     }
     else if (!e.Value.ToString().Where(char.IsNumber).Count().Equals(e.Value.ToString().Length))
     {
         e.SetError("A mező csak számokat tartalmazhat", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
         FacilityDataVM.ItemSourceSearcher("zipCode", "false");
     }
     else if (!FacilityDataVM.ListChecker(e.Value.ToString(), typeof(zipcode_fx)))
     {
         e.SetError("A mező tartalma nem megfelelő", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
         FacilityDataVM.ItemSourceSearcher("zipCode", "false");
     }
     else
     {
         e.SetError("A mező tartalma megfelelő", DevExpress.XtraEditors.DXErrorProvider.ErrorType.User1);
         facilityDataValid.zipCode = true;
         FacilityDataVM.ItemSourceSearcher("zipCode", e.Value.ToString());
     }
     ForceBinding(sender, e);
 }
 private void settlement_Validate(object sender, ValidationEventArgs e)
 {
     facilityDataValid.settlement = false;
     if (string.IsNullOrEmpty(e.Value as string))
     {
         e.SetError("A mező kitöltése nem kötelező", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
         FacilityDataVM.ItemSourceSearcher("settlement", null);
     }
     else if (!FacilityDataVM.ListChecker(e.Value.ToString(), typeof(settlement_fx)))
     {
         e.SetError("A mező tartalma nem megfelelő", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
         FacilityDataVM.ItemSourceSearcher("settlement", "false");
     }
     else
     {
         e.SetError("A mező tartalma megfelelő", DevExpress.XtraEditors.DXErrorProvider.ErrorType.User1);
         facilityDataValid.settlement = true;
         FacilityDataVM.ItemSourceSearcher("settlement", e.Value.ToString());
     }
     ForceBinding(sender, e);
 }
 private void zipCodeErase(object sender, RoutedEventArgs e)
 {
     zipCode.Clear();
     FacilityDataVM.ItemSourceSearcher("zipCode", null);
 }
 private void settlementErase(object sender, RoutedEventArgs e)
 {
     settlement.Clear();
     FacilityDataVM.ItemSourceSearcher("settlement", null);
 }