private void ValidateEvent(Validator <CustomerViewmodel> sender, CustomerViewmodel viewmodel, ValidateEventArgs <CustomerViewmodel> e) { if (e.IsProperty(vm => vm.CountryCode)) { CountryCodeHelper.Validate(e, viewmodel.CountryCode); } }
private async void Edit_Click(object sender, RoutedEventArgs e) { GetAll_Customers_Record record = _CustomersRS.CurrentRecord; var vm = new CustomerViewmodel(); vm.ModelMode = CustomerViewmodel.ModeKind.Edit; vm.CustomerID = record.CustomerID; object retvar = await this.OpenModal($"Edit Customer {record.CustomerID}", new CustomerPage(vm)); }
public CustomerPage(CustomerViewmodel view_model) { if (view_model == null) { throw new ArgumentNullException(); } Viewmodel = view_model; this.InitializeComponent(); }