Пример #1
0
		public void ShowData ()
			{
			IsManuallyUpdated = false;
			m_PropertiesGrid = new DataGrid ();
			RootGrid.Children.Add (m_PropertiesGrid);
			Grid.SetColumn (m_PropertiesGrid, 0);
			Grid.SetRow (m_PropertiesGrid, 0);
			PropertiesData = new ManagedPropertiesFunctions ("WPMediaBeitragsProperties");
			PropertiesData.LoadProperties (OptionStorage);
			m_PropertiesGrid.ItemsSource = PropertiesData.m_Properties.DefaultView;
			m_PropertiesGrid.AutoGeneratedColumns += new EventHandler (m_PropertiesGrid_AutoGeneratedColumns);
			ContextMenu ValueSelectionMenu = new ContextMenu ();
			m_PropertiesGrid.ContextMenu = ValueSelectionMenu;
			m_PropertiesGrid.ContextMenuOpening +=
					new ContextMenuEventHandler (m_PropertiesGrid_ContextMenuOpening);
			}
Пример #2
0
		void m_NewBeitragButton_Click (object sender, RoutedEventArgs e)
			{
			Cursor = Cursors.Wait;
			String OutSideDefinedBeitragID = System.Guid.NewGuid ().ToString ();
			DataBase.GetAllForBeitrag (ActuallSenderName, OutSideDefinedBeitragID, false, true, false);
			if (m_PropertiesFunctions == null)
				m_PropertiesFunctions = new ManagedPropertiesFunctions ("WPMediaBeitragsProperties");
			m_PropertiesFunctions.LoadProperties ("");
			String DefaultProperties = m_PropertiesFunctions.FillTextFromProperties ();
			String UpdateStatement = "Update Beitraege set BeitragProperties = '"
			                         + m_PropertiesFunctions.FillTextFromProperties ()
			                         + "', BeitragsReihenfolgeInSendung = " + WMB.Basics.GetSQLFormattedDateTime (DateTime.Now)
			                         + " where BeitragID = '" +
			                         OutSideDefinedBeitragID + "'";
			DataBase.RunSQLBatch (UpdateStatement);
			m_TimingsControl.DoNotExternalDataAccess = false;
			m_TimingsControl.m_TimingsTypenDataSet = m_ProgrammIndependentDataSet;
			m_TimingsControl.ConnectedType = "Beitrag";
			m_TimingsControl.ZuordnungsID = ActuallSenderID;
			m_TimingsControl.InsertNewDefaultTiming (OutSideDefinedBeitragID);
			FillBeitraegeTree ();
			SelectBeitragInBeitraegeTree (OutSideDefinedBeitragID);
			Cursor = Cursors.Arrow;
			}