Exemple #1
0
		public ErgebnisSummen(MBRWahlDataModell ParentParameter, DataRow ParentRow, DataTable ErgebnisProKommissionsIDProStiege = null)
			: base(ParentRow, "MBRConnectionString")
			{
			Parent = ParentParameter;
			if (ErgebnisProKommissionsIDProStiege != null)
				LoadStiegenErgebnisse(ErgebnisProKommissionsIDProStiege);
			}
Exemple #2
0
		private void MainWindow_OnLoaded(object Sender, RoutedEventArgs E)
			{
			if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
				return;

			if (WMB.Basics.IAmActiveBefore())
				Close();

			String m_UserName = String.Empty;

			String[] Rollen = CVM.LoginHandler.CheckUser("Heinz", "monika");
			if (Rollen == null)
				Rollen = CVM.LoginHandler.CheckUser(ref m_UserName);
			if (Rollen == null)
				{
				Close();
				return;
				}
			WMB.WPMediaApplicationState.Instance.Properties["UserName"] = m_UserName.ToUpper();
			WMB.WPMediaApplicationState.Instance.Properties["Rollen"] = Rollen;
			DataModell = new MBRWahlDataModell ();
			DataContext = DataModell;

			string resolution = String.Join(", ", new String[] { System.Windows.SystemParameters.VirtualScreenLeft.ToString(),
			System.Windows.SystemParameters.VirtualScreenTop.ToString(), 
			System.Windows.SystemParameters.VirtualScreenWidth.ToString(), 
			System.Windows.SystemParameters.VirtualScreenHeight.ToString(), });
			}
Exemple #3
0
		public static DataCollection<Kandidat> LoadKandidaten(MBRWahlDataModell Parent)
			{
			DataCollection<Kandidat> KandidatenEntries = new DataCollection<Kandidat>();
			foreach (DataRow Entry in MBRWahlDataWrapper.Instance.StaticDataSetForInternet.Tables ["Kandidaten"].Rows)
				{
				KandidatenEntries.Add (new Kandidat (Entry) {Parent = Parent});
				}
			return KandidatenEntries;
			}
		private void FillKommissionenToCreate
			(MBRWahlDataModell.WahlCreationEnum TypeToCreate)
			{
			TimeSpan InternetStartingHour = TimeSpan.FromHours(7);
			TimeSpan InternetDuration = TimeSpan.FromDays(11) + TimeSpan.FromHours(20);

			TimeSpan KPInfoStartingHour = TimeSpan.FromHours(7);
			TimeSpan KPInfoDuration = TimeSpan.FromHours(12);
			TimeSpan KPInfoLastDayDuration = TimeSpan.FromHours(7);
			TimeSpan KPInfoNextStart = TimeSpan.FromDays(1);

			TimeSpan BlockStart = TimeSpan.FromDays(7);
			TimeSpan BlockStartingHour = TimeSpan.FromHours(15);
			TimeSpan BlockDuration = TimeSpan.FromHours(5);
			TimeSpan BlockNextStart = TimeSpan.FromDays(1);
			TimeSpan BlockStartTimeDifferenz = TimeSpan.Zero;

			TimeSpan MallFrStart = TimeSpan.FromDays(11); ;
			TimeSpan MallFrStartingHour = TimeSpan.FromHours(15); ;
			TimeSpan MallFrDuration = TimeSpan.FromHours(5);

			TimeSpan MallSaStart = TimeSpan.FromDays(12); ;
			TimeSpan MallSaStartingHour = TimeSpan.FromHours(8); ;
			TimeSpan MallSaDuration = TimeSpan.FromHours(6);

			String KPInfoMaschine = "KPINFO01";
			String BlockAMaschine = "MBR01";
			String BlockBMaschine = "MBR02";
			String BlockCMaschine = "MBR03";
			String MallFrMaschine = "MBR01";
			String MallSaMaschine = "MBR01";
			String InternetMaschine = "Internet";

			switch (TypeToCreate)
				{
				case MBRWahlDataModell.WahlCreationEnum.EchtWahlZyklus:
					{
					WahlBeginnTime = WahlBeginnTime.Date;

					break;
					}
				case MBRWahlDataModell.WahlCreationEnum.TestWahlZyklus:
					{

					WahlBeginnTime = DateTime.Now.AddMinutes(1);
					WahlBeginnTime = WahlBeginnTime.AddSeconds(-WahlBeginnTime.Second);
					KPInfoStartingHour = TimeSpan.FromMinutes(1);
					KPInfoDuration = TimeSpan.FromMinutes(4);
					KPInfoLastDayDuration = TimeSpan.FromMinutes(2);
					KPInfoNextStart = TimeSpan.FromMinutes(6);

					BlockStart = TimeSpan.FromMinutes(36);
					BlockStartingHour = TimeSpan.FromMinutes(1);
					BlockDuration = TimeSpan.FromMinutes(4);
					BlockNextStart = TimeSpan.FromMinutes(18);
					BlockStartTimeDifferenz = TimeSpan.FromMinutes(6);

					MallFrStart = TimeSpan.FromMinutes(110); ;
					MallFrStartingHour = TimeSpan.FromMinutes(1); ;
					MallFrDuration = TimeSpan.FromMinutes(5);

					MallSaStart = TimeSpan.FromMinutes(117); ;
					MallSaStartingHour = TimeSpan.FromMinutes(1); ;
					MallSaDuration = TimeSpan.FromMinutes(6);

					KPInfoMaschine = "Heinz64";
					BlockAMaschine = "Heinz64";
					BlockBMaschine = "Heinz64";
					BlockCMaschine = "Heinz64";
					MallFrMaschine = "Heinz64";
					MallSaMaschine = "Heinz64";

					break;
					}
				}
			OverallIndex = 1;
			int KommissionsIDIndex = Parent.KPInfoStartIndex;
			int RunningIndex = 0;

			while (KommissionsIDIndex < Parent.KPInfoStartIndex + 6)
				{
				TimeSpan NextStart = TimeSpan.Zero;
				int Helper = 0;
				while (Helper < RunningIndex)
					{
					NextStart += KPInfoNextStart;
					Helper++;
					}
				if (KommissionsIDIndex != 17)
					GenerateNewVerwaltungEntry(Parent.PossibleKommissionsID[KommissionsIDIndex], KPInfoMaschine,
						"KaufPark Info",
						WahlBeginnTime + NextStart + KPInfoStartingHour,
						WahlBeginnTime + NextStart + KPInfoStartingHour + KPInfoDuration);
				else
					GenerateNewVerwaltungEntry(Parent.PossibleKommissionsID[KommissionsIDIndex], KPInfoMaschine,
						"KaufPark Info",
						WahlBeginnTime + NextStart + KPInfoStartingHour,
						WahlBeginnTime + NextStart + KPInfoStartingHour + KPInfoLastDayDuration);

				KommissionsIDIndex++;
				RunningIndex++;
				}

			KommissionsIDIndex = Parent.BlockStartIndex;
			RunningIndex = 0;
			int HelperOverallIndex = OverallIndex;
			while (KommissionsIDIndex < 4)
				{
				TimeSpan NextStart = TimeSpan.Zero;
				int Helper = 0;
				while (Helper < RunningIndex)
					{
					NextStart += BlockNextStart;
					Helper++;
					}
				TimeSpan ZeitPunkt = BlockStart + NextStart + BlockStartingHour;
				TimeSpan FinishZeitPunkt = ZeitPunkt + BlockDuration;
				GenerateNewVerwaltungEntry(Parent.PossibleKommissionsID[KommissionsIDIndex + 0], BlockAMaschine,
					Parent.PossibleLocations[KommissionsIDIndex + 0],
					WahlBeginnTime + ZeitPunkt,
					WahlBeginnTime + FinishZeitPunkt, HelperOverallIndex++);
				GenerateNewVerwaltungEntry(Parent.PossibleKommissionsID[KommissionsIDIndex + 4], BlockBMaschine,
					Parent.PossibleLocations[KommissionsIDIndex + 4],
					WahlBeginnTime + ZeitPunkt + BlockStartTimeDifferenz,
					WahlBeginnTime + FinishZeitPunkt + BlockStartTimeDifferenz, HelperOverallIndex++);
				GenerateNewVerwaltungEntry(Parent.PossibleKommissionsID[KommissionsIDIndex + 8], BlockCMaschine,
					Parent.PossibleLocations[KommissionsIDIndex + 8],
					WahlBeginnTime + ZeitPunkt + BlockStartTimeDifferenz + BlockStartTimeDifferenz,
					WahlBeginnTime + FinishZeitPunkt + BlockStartTimeDifferenz + BlockStartTimeDifferenz, HelperOverallIndex++);
				KommissionsIDIndex++;
				RunningIndex++;
				}

			GenerateNewVerwaltungEntry(Parent.PossibleKommissionsID[Parent.MalFrStartIndex], MallFrMaschine,
				"KaufPark Mall",
				WahlBeginnTime + MallFrStart + MallFrStartingHour,
				WahlBeginnTime + MallFrStart + MallFrStartingHour + MallFrDuration);

			GenerateNewVerwaltungEntry(Parent.PossibleKommissionsID[Parent.MallSaStartIndex], MallSaMaschine,
				"KaufPark Mall",
				WahlBeginnTime + MallSaStart + MallSaStartingHour,
				WahlBeginnTime + MallSaStart + MallSaStartingHour + MallSaDuration);

			GenerateNewVerwaltungEntry(Parent.PossibleKommissionsID[Parent.InternetStartIndex], InternetMaschine,
				"Internet",
				WahlBeginnTime + InternetStartingHour,
				WahlBeginnTime + InternetStartingHour + InternetDuration);


			}