示例#1
0
		public static DataBaseMirrorRuntime LoadOrCreateMirrorStatus ()
			{

			try
				{
				if (!System.IO.File.Exists(MBRWahl.MBRWahlDataWrapper.Instance.SerializingMirror))
					{
					DataBaseMirrorRuntime NewMirror = new DataBaseMirrorRuntime();
					NewMirror.FillDefaultSettings();
					WMB.Basics.SerializeObjectToFile(MBRWahl.MBRWahlDataWrapper.Instance.SerializingMirror,
						NewMirror);
					return NewMirror;
					}
				return (DataBaseMirrorRuntime)WMB.Basics.DeSerializeObjectFromFile
								(MBRWahl.MBRWahlDataWrapper.Instance.SerializingMirror);

				}
			catch (Exception Excp)
				{
				MessageBox.Show("Fehler mit dem File \""
					+ MBRWahl.MBRWahlDataWrapper.Instance.SerializingMirror + "\"\r\n" + Excp.ToString());
				WMB.Basics.ReportErrorToEventViewer ("Fehler mit dem File \""
					+ MBRWahl.MBRWahlDataWrapper.Instance.SerializingMirror + "\"\r\n" + Excp.ToString ());
				return null;
				}
			}
示例#2
0
		public static bool FirstTimeVerwaltungLoad ()
			{
			DataBaseMirrorRuntime RuntimeToUse = new DataBaseMirrorRuntime ();
			RuntimeToUse.FillDefaultSettings();
			try
				{
				RuntimeToUse.MirrorEntries[0].ProcessMirrorActivity();
				}
			catch (Exception Excp)
				{
				WMB.Basics.ReportErrorToEventViewer("Fehler beim FirstTimeVeraltungLoad "
					+ RuntimeToUse.MirrorEntries[0].TableName + "\r\nvon " + RuntimeToUse.MirrorEntries[0].SourceConnection
					+ "\r\nnach " + RuntimeToUse.MirrorEntries[0].TargetConnection + "\r\n" + Excp.ToString());
				return false;
				}
			return true;
			}
示例#3
0
		private void ProcessMirrorActivities (DataBaseMirrorRuntime StartClass)
			{
			foreach (DataBaseMirrorEntry Entry in StartClass.MirrorEntries)
				{
				try
					{
					Entry.ProcessMirrorActivity();
					}
				catch (Exception Excp)
					{
					WMB.Basics.ReportErrorToEventViewer ("Fehler beim Entry " + Entry.TableName + "\r\nvon " + Entry.SourceConnection
						+ "\r\nnach " + Entry.TargetConnection + "\r\n" + Excp.ToString ());
					}
				}

			}