private void zipCode_Validate(object sender, ValidationEventArgs e)
 {
     validatorClass.GetType().GetProperty(GetSenderName(sender)).SetValue(validatorClass, false, null);
     if (e.Value == null)
     {
         e.SetError("A mező kitöltése kötelező", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
         PatientDetailsVM.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);
         PatientDetailsVM.ItemSourceSearcher("zipCode", "false");
     }
     else if (!PatientDetailsVM.ListChecker(e.Value.ToString(), typeof(zipcode_fx)))
     {
         e.SetError("A mező tartalma nem megfelelő", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
         PatientDetailsVM.ItemSourceSearcher("zipCode", "false");
     }
     else
     {
         e.SetError("A mező tartalma megfelelő", DevExpress.XtraEditors.DXErrorProvider.ErrorType.User1);
         PatientDetailsVM.From = (sender as ComboBoxEdit).Name == "zipCode";
         PatientDetailsVM.ItemSourceSearcher("zipCode", e.Value.ToString());
         validatorClass.GetType().GetProperty(GetSenderName(sender)).SetValue(validatorClass, true, null);
     }
     ForceBinding(sender, e);
 }
 private void settlement_Validate(object sender, ValidationEventArgs e)
 {
     validatorClass.GetType().GetProperty(GetSenderName(sender)).SetValue(validatorClass, false, null);
     if (string.IsNullOrEmpty(e.Value as string))
     {
         e.SetError("A mező kitöltése kötelező", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
         PatientDetailsVM.ItemSourceSearcher("settlement", null);
     }
     else if (!PatientDetailsVM.ListChecker(e.Value.ToString(), typeof(settlement_fx)))
     {
         e.SetError("A mező tartalma nem megfelelő", DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical);
         PatientDetailsVM.ItemSourceSearcher("settlement", "false");
     }
     else
     {
         e.SetError("A mező tartalma megfelelő", DevExpress.XtraEditors.DXErrorProvider.ErrorType.User1);
         PatientDetailsVM.From = (sender as ComboBoxEdit).Name == "settlement";
         PatientDetailsVM.ItemSourceSearcher("settlement", e.Value.ToString());
         validatorClass.GetType().GetProperty(GetSenderName(sender)).SetValue(validatorClass, true, null);
     }
     ForceBinding(sender, e);
 }
 private void billingSettlementErase(object sender, RoutedEventArgs e)
 {
     billingSettlement.Clear();
     PatientDetailsVM.ItemSourceSearcher("settlement", null);
 }
 private void billingZipCodeErase(object sender, RoutedEventArgs e)
 {
     billingZipCode.Clear();
     PatientDetailsVM.ItemSourceSearcher("zipCode", null);
 }