private void btnAdd_Click(object sender, RoutedEventArgs e) { CityViewModel city = new CityViewModel(); city.Identifier = Guid.NewGuid(); CityAddEdit addEditForm = new CityAddEdit(city, true); addEditForm.CityCreatedUpdated += new CityHandler(SyncData); FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_gradovima")), 95, addEditForm); }
private void btnAddCity_Click(object sender, RoutedEventArgs e) { CityViewModel City = new CityViewModel(); City.Code = new CitySQLiteRepository().GetNewCodeValue().ToString(); City.Identifier = Guid.NewGuid(); CityAddEdit CityAddEditForm = new CityAddEdit(City, true); CityAddEditForm.CityCreatedUpdated += new CityHandler(DisplayData); FlyoutHelper.OpenFlyout(this, "Grad", 95, CityAddEditForm); }
private void btnEditCity_Click(object sender, RoutedEventArgs e) { if (CurrentCity == null) { MainWindow.WarningMessage = "Morate odabrati grad za izmenu!"; return; } CityAddEdit CityAddEditForm = new CityAddEdit(CurrentCity, false); CityAddEditForm.CityCreatedUpdated += new CityHandler(DisplayData); FlyoutHelper.OpenFlyout(this, "Depo", 95, CityAddEditForm); }
private void btnEdit_Click(object sender, RoutedEventArgs e) { if (CurrentCity == null) { MainWindow.WarningMessage = ((string)Application.Current.FindResource("Morate_odabrati_grad_za_izmenuUzvičnik")); return; } CityAddEdit addEditForm = new CityAddEdit(CurrentCity, false); addEditForm.CityCreatedUpdated += new CityHandler(SyncData); FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Podaci_o_gradovima")), 95, addEditForm); }