private void btnAdd_Click(object sender, RoutedEventArgs e) { BusinessPartnerTypeViewModel businessPartnerType = new BusinessPartnerTypeViewModel(); businessPartnerType.Identifier = Guid.NewGuid(); BusinessPartner_Type_AddEdit addEditForm = new BusinessPartner_Type_AddEdit(businessPartnerType, true); addEditForm.BusinessPartnerTypeCreatedUpdated += new BusinessPartnerTypeHandler(SyncData); FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_vrsti")), 95, addEditForm); }
private void btnEdit_Click(object sender, RoutedEventArgs e) { if (CurrentBusinessPartnerType == null) { MainWindow.WarningMessage = ((string)Application.Current.FindResource("Morate_odabrati_vrstu_za_izmenuUzvičnik")); return; } BusinessPartner_Type_AddEdit addEditForm = new BusinessPartner_Type_AddEdit(CurrentBusinessPartnerType, false); addEditForm.BusinessPartnerTypeCreatedUpdated += new BusinessPartnerTypeHandler(SyncData); FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_vrsti")), 95, addEditForm); }