Exemple #1
0
		private void ModifyAdresseButton_Click (object sender, RoutedEventArgs e)
			{
			if (AdressenListBox.SelectedIndex == -1)
				return;
			this.Cursor = Cursors.Wait;
			String AdressenIDToModify = ((ListBoxItem)AdressenListBox.Items
							[AdressenListBox.SelectedIndex]).Tag.ToString ();
			String AdressenTextToModify = ((ListBoxItem)AdressenListBox.Items
							[AdressenListBox.SelectedIndex]).Content.ToString ();
			ListBoxItem SelectedItem = AdressenListBox.SelectedItem as ListBoxItem;
			AdressenListBox.ScrollIntoView(AdressenListBox.SelectedItem);
			WPMediaOrganisationenWartung.FastTextEditWindow TextWindow = new FastTextEditWindow();
			TextWindow.SetValues (SelectedItem, AdressenTextToModify, AdressenIDToModify);
			TextWindow.SetHeadLine (GetAdressBezeichnungHelpText ());
			if (TextWindow.ShowDialog () == true)
				{
				String ModifiedText = TextWindow.TextAfterModify;
				String UpdateCommand = GetUpdateTextFromAdressText (TextWindow.TextAfterModify)
						+ " where ID = '" + AdressenIDToModify + "'";
				DataBase.RunSQLBatch (UpdateCommand);
				ShowAdressenAdressenInHaeuser (AdressenIDToModify);
				}
			this.Cursor = Cursors.Arrow;

			}
Exemple #2
0
		private void ModifySchreibweiseButton_Click (object sender, RoutedEventArgs e)
			{
			if (SchreibweisenListBox.SelectedIndex == -1)
				return;
			this.Cursor = Cursors.Wait;
			String SchreibweisenIDToModify = ((ListBoxItem)SchreibweisenListBox.Items
							[SchreibweisenListBox.SelectedIndex]).Tag.ToString ();
			String SchreibweisenTextToModify = ((ListBoxItem)SchreibweisenListBox.Items
							[SchreibweisenListBox.SelectedIndex]).Content.ToString ();
			ListBoxItem SelectedItem = SchreibweisenListBox.SelectedItem as ListBoxItem;
			SchreibweisenListBox.ScrollIntoView(SchreibweisenListBox.SelectedItem);
			WPMediaOrganisationenWartung.FastTextEditWindow TextWindow = new FastTextEditWindow();
			TextWindow.SetValues (SelectedItem, SchreibweisenTextToModify, SchreibweisenIDToModify);
			if (TextWindow.ShowDialog () == true)
				{
				String ModifiedText = TextWindow.TextAfterModify;
				String UpdateCommand = "Update [StrassenSchreibweisen] set [SchreibWeise] = '"
						+ ModifiedText + "' where [ID] = '" + SchreibweisenIDToModify + "'";
				DataBase.RunSQLBatch (UpdateCommand);
				ClearSchreibweisenTable ();
				ShowSchreibweisen (m_SchreibweisenIDToModify);
				}
			this.Cursor = Cursors.Arrow;

			}