private void MMSenderManagementModellInstanceChanged(MMSenderManagementModell OldValue,
		    MMSenderManagementModell NewValue)
		    {
		    if (NewValue != null)
			    {
			    MMProgrammBlockManagementModellInstance = NewValue.MMProgrammBlockManagementModellInstance;
			    MMSlotManagementModellInstance = NewValue.MMSlotManagementModellInstance;
			    }
		    }
Exemple #2
0
		private void MMSenderManagementModellInstanceChanged(MMSenderManagementModell OldValue,
			MMSenderManagementModell NewValue)
			{
			}
Exemple #3
0
		public MainWindow()
			{

#region (WPClientStartup) Standard RichClient Security and DataBase Startup

			String UserName = String.Empty;
#if DEBUG
			String[] Rollen = LoginHandler.SetDataAccessSecurity("Heinz", "monika");
#else
			String[] Rollen = LoginHandler.CheckUser(ref UserName);
#endif
			if (Rollen == null)
				{
				Close();
				return;
				}
			WPMediaApplicationState.Instance.Properties["Rollen"] = Rollen;
			WPMediaApplicationState.Instance.Properties["UserName"] = UserName;
			if (Directory.Exists("\\\\Webserver2\\WPMediaSender"))
				{
				Data.DbServer3_Connect_Direct();
				Application.Current.Properties["WPMediaNetworkEnvironment"] = true;
				}
			else
				{
				Data.DbServer3_Connect_OldWebService();
				Application.Current.Properties["WPMediaNetworkEnvironment"] = false;
				}


			if (!(WMB.WPMediaApplicationState.Instance.Properties["Rollen"] as String[]).Contains("Management"))
				return;
			#endregion

			DoDataStartup();
			if (ProgrammSchemaModellInstance != null)
				return;
			ProgrammSchemaModell programmSchemaModellHelper = new ProgrammSchemaModell();
			programmSchemaModellHelper.InitializeMe();
			programmSchemaModellHelper.dataContext.DefaultRangeFrom = DateTime.Now.Date;
			programmSchemaModellHelper.dataContext.DefaultRangeTo = DateTime.Now.Date.AddMinutes(1439);
			ProgrammSchemaModellInstance = programmSchemaModellHelper;
			SenderManagementModellInstance = new SenderManagementModell();
			MMSenderManagementModellInstance = new MMSenderManagementModell();
			MMUnitsManagementModellInstance = new MMUnitsManagementModell();
			InitializeComponent();
			}
	    void PrepareEnvironment()
		    {
			if (MMSenderManagementModellInstance == null)
			    {
				MMSenderManagementModellInstance = new MMSenderManagementModell();
			    MMSenderManagementModellInstance.InitializeMe();
			    MMSlotManagementModellInstance
				    = MMSenderManagementModellInstance.MMSlotManagementModellInstance;
			    MMProgrammBlockManagementModellInstance
				    = MMSenderManagementModellInstance.MMProgrammBlockManagementModellInstance;
			    return;
			    }
		    if (MMSenderManagementModellInstance.MMProgrammBlockManagementModellInstance == null)
			    MMSenderManagementModellInstance.MMProgrammBlockManagementModellInstance
				    = MMProgrammBlockManagementModellInstance = new MMProgrammBlockManagementModell();
		    else
			    {
			    if (MMProgrammBlockManagementModellInstance != null)
				    MMSenderManagementModellInstance.MMProgrammBlockManagementModellInstance
					    = MMProgrammBlockManagementModellInstance;
			    else
				    MMSenderManagementModellInstance.MMProgrammBlockManagementModellInstance
					    = MMProgrammBlockManagementModellInstance = new MMProgrammBlockManagementModell();


			    }

		    }