public AnwesenheitSchulStartLinePrint(Organisation SchulEntry)
			{
			Klasse = SchulEntry.CodeName;
			Schule = SchulEntry.Ort.Bezeichnung;
			PageBreakBeforeRequested = true;
			TypeOfElement = TypeOfPrintElement.StartNewGroup;
			HeadLineText = Schule;
			Level = "Main";
			}
Exemplo n.º 2
0
		public AnwesenheitEntryPrint(Organisation schulenEntry,
				Organisation klassenEntry, PersonZuWordUpID personenEntry)
			{
			FamilienName = personenEntry.Person.FamilienName;
			VorName = personenEntry.Person.VorName;
			Klasse = klassenEntry.CodeName.Substring(4);
			Schule = schulenEntry.NameId;
			Funktion = personenEntry.Typ.TypNameId;
			Geschlecht = personenEntry.Person.Sex;
			TelefonNr = personenEntry.Person.Telefon;
			CodeName = schulenEntry.CodeName;
			PLZ = personenEntry.Person.PLZ;
			Ort = personenEntry.Person.Ort;
			Adresse = personenEntry.Person.Adresse;
			}
Exemplo n.º 3
0
		public GutscheinEntryPrint(Organisation schulenEntry,
				Organisation klassenEntry, PersonZuWordUpID personenEntry,
				String AktuellerFixTextParameter)
			{
			if ((schulenEntry != null)
			    && (klassenEntry != null)
			    && (personenEntry != null))
				{
				FamilienName = personenEntry.Person.FamilienName;
				VorName = personenEntry.Person.VorName;
				Klasse = klassenEntry.CodeName.Substring(4, 2);
				Schule = schulenEntry.Beschreibung;
				Funktion = personenEntry.Typ.TypNameId;
				Geschlecht = personenEntry.Person.Sex;
				}
			AktuellerFixText = AktuellerFixTextParameter;
			PageBreakAllowedBefore = true;
			}
Exemplo n.º 4
0
		public String PlakatPictureFileName (Organisation SelectedOrganisation,
				String VertreterListNumber)
			{
				return WordUpBasics.VertreterImageFileName(Data.DbServer3.WordUp.Organisationen.FindOrLoad
					(SelectedOrganisation.ParentOrganisationsId).MaterialRoot,
							SelectedOrganisation.CodeName, VertreterListNumber);
			}
Exemplo n.º 5
0
        public Organisation[] GetKlassen(Organisation SchulEntry)
            {
            return Data.DbServer3.WordUp.Organisationen.Find_ChildrenOrganisationenWithSpecialTypes
				(SchulEntry.Id, new List<Guid>( ) {OrganisationenTypen.Klasse});
            }
Exemplo n.º 6
0
		public ContractCollection<WSPlakat> GetContract_PlakateProKlasse(Organisation SelectedOrganisation,
            String PlakatNumberItem, bool AllOrOnlyUnassigned = true)
            {
            String SelectStatement = String.Empty;
            if (AllOrOnlyUnassigned)
                SelectStatement = $"Select * from {NativeName} where "
                                     + $"{OrganisationenIdCol} = '{SelectedOrganisation.Id.ToString()}'"
                                     + $" and {ErfassungsIdCol} > '{PlakatNumberItem}' and "
                                     + $" {ErfassungsIdCol} < '{PlakatNumberItem}9' "
                                     + $" order by {ErfassungsIdCol}";
            else
                SelectStatement = $"Select * from {NativeName} where "
                                     + $"{OrganisationenIdCol} = '{SelectedOrganisation.Id.ToString()}'"
                                     + $" and {ErfassungsIdCol} > '{PlakatNumberItem}' and "
                                     + $" {ErfassungsIdCol} < '{PlakatNumberItem}9' and "
                                     + $" ({ProjektIdCol} is NULL or {ProjektIdCol} = '{Guid.Empty.ToString( )}') "
                                     + $" order by {ErfassungsIdCol}";

			DownloadRows(SelectStatement, false);
            ContractCollection<WSPlakat> contract;
            if (AllOrOnlyUnassigned)
                contract = CreateContractCollection( 
							wsplakat => wsplakat.OrganisationenId == SelectedOrganisation.Id &&
                           wsplakat.ErfassungsId.StartsWith(PlakatNumberItem));
                   
            else
                contract = CreateContractCollection(
					wsplakat => wsplakat.OrganisationenId == SelectedOrganisation.Id &&
                           wsplakat.ErfassungsId.StartsWith(PlakatNumberItem) &&
                           ((wsplakat.ProjektId == null) || (wsplakat.ProjektId == Guid.Empty)));
            contract.Sort(wsplakat => wsplakat.ErfassungsId);
            return contract;
            }
Exemplo n.º 7
0
 public WSPlakat[] Find_PlakateProKlasse(Organisation OrganisationWhereTheWSPlakatComesFrom)
     {
     return Collection.Where(pla => pla.WordUpRootId == DataSet.WordUpIDGuid
                                    && pla.OrganisationenId == OrganisationWhereTheWSPlakatComesFrom.Id).ToArray();
     }
		public AnwesenheitKlassenEndeLinePrint(Organisation SchulEntry, Organisation KlassenEntry)
			{
			Klasse = KlassenEntry.CodeName;
			Schule = SchulEntry.Ort.Bezeichnung;
			}
Exemplo n.º 9
0
		private List<Marker> CreateMarkerForOrteWithMissingPictures(Organisation[] SchulListen,
			LogicalAreaType PhaseToProduce)
			{
			List<Marker> Result = new List<Marker>();
			foreach (Ort OrtEntry in Data.DbServer3.WordUp.Orte
						.Find_AktuelleOrteForProjektPhase (DataWrapper.Instance.WordUpPhase.ToString()))
				{
				if (OrtEntry.WLaenge == double.NaN)
					{
					continue;
					}
				Dictionary<String, String> OrteMaterialien = DataWrapper.Instance.GetMaterialien(OrtEntry,
					"Orte");
				if (OrteMaterialien.Keys.Count > 0)
					continue;
				if (IfExistsBefore(Result, OrtEntry) == null)
					{
					Marker DrawingMarker = new Marker()
						{
						Tag = OrtEntry,
						Lon = (double) OrtEntry.WLaenge,
						Lat = (double) OrtEntry.WBreite,
						TypeToDraw = LogicalAreaType.Text,
						TextToDraw = OrtEntry.NameId
						};
					Result.Add(DrawingMarker);
					}
				}
			return Result;
			}
Exemplo n.º 10
0
		private List<Marker> CreateMarkerForProjekteWithMissingPictures(Organisation[] SchulListen,
			LogicalAreaType typeToDraw)
			{
			List<Marker> Result = new List<Marker>();
			foreach (Projekt ProjektEntry in Data.DbServer3.WordUp.Projekte
					.Find_PhasenCorrectProjekte (DataWrapper.Instance.WordUpPhase.ToString()))
				{
				if (ProjektEntry.Ort?.WLaenge == double.NaN)
					{
					continue;
					}
				Dictionary<String, String> ProjektMaterialien = DataWrapper.Instance.GetMaterialien(ProjektEntry,
					"Projekte");
				if (ProjektMaterialien.Keys.Count > 0)
					continue;
				if (IfExistsBefore(Result, ProjektEntry) == null)
					{
					Marker DrawingMarker = new Marker()
						{
						Tag = ProjektEntry,
						Lon = (double)ProjektEntry.Ort?.WLaenge,
						Lat = (double) ProjektEntry.Ort?.WBreite,
						TypeToDraw = typeToDraw
						};
					Result.Add(DrawingMarker);
					}
				}
				
			return Result;
			}
Exemplo n.º 11
0
		private List<Marker> CreateMarkerForCombined(Organisation[] SchulListen,
			LogicalAreaType PhaseToProduce)
			{
			List<Marker> Result = new List<Marker>();
			foreach (Organisation Schule in SchulListen)
				{
				if (Schule.Ort.WLaenge == double.NaN)
					{
					continue;
					}
				if (IfExistsBefore(Result, Schule) == null)
					{
					Marker SchoolMarker = new Marker()
						{
						Tag = Schule,
						Lon = Convert.ToDouble(Schule.Ort.WLaenge),
						Lat = Convert.ToDouble(Schule.Ort.WBreite),
						TypeToDraw = LogicalAreaType.Schule
						};
					Result.Add(SchoolMarker);
					}
				Organisation [] KlassenListe = WordUp23.DataWrapper.Instance.GetKlassen(Schule);

				List<Guid> FunktionsPersonen = Data.DbServer3.WordUp.Typen.AllTypIDsForVertreter;

                if (PhaseToProduce == LogicalAreaType.Combined)
					{
					List<DataRow> Schueler = WordUp23.DataWrapper.Instance.GetSchueler(null);	//KlassenListe);
					foreach (Organisation organisation in KlassenListe)
						{
						foreach (PersonZuWordUpID SchuelerEntry in Data.DbServer3.WordUp.PersonenZuWordUpID
								.Find_TypedPersonenInOrganisationsID(FunktionsPersonen, organisation.Id))
							{
							if (SchuelerEntry.Person.WLaenge == double.NaN)
								{
								continue;
								}
							if (IfExistsBefore(Result, SchuelerEntry) == null)
								{
								Marker PupilMarker = new Marker()
									{
									Tag = SchuelerEntry,
									Lon = SchuelerEntry.Person.WLaenge.Value,
									Lat = SchuelerEntry.Person.WBreite.Value,
									TypeToDraw = (SchuelerEntry.Person.Sex == "M")
										? LogicalAreaType.SchuelerM
										: LogicalAreaType.SchuelerW
									};
								Result.Add(PupilMarker);
								}
							}
						}

					}

				List<LogicalAreaType> PhasenToCreate = new List<LogicalAreaType>()
					{
					LogicalAreaType.Wunsch,
					LogicalAreaType.Planung,
					LogicalAreaType.Projekt,
					LogicalAreaType.Realisierung,
					LogicalAreaType.Fertig
					};

				foreach (LogicalAreaType PhaseToCreate in PhasenToCreate)
					{
					DbEntities.dbserver3.wordup.rows.ProjektUebersicht[] DataToDraw = Data.DbServer3.WordUp
						.ProjektUebersichten
						.Find_PhasenRelatedProjektUebersichten(PhaseToCreate.ToString());
					foreach (DbEntities.dbserver3.wordup.rows.ProjektUebersicht DataEntryToDraw in DataToDraw)
						{
						if (DataEntryToDraw.WLaenge == null)
							{
							continue;
							}
						Marker OldMarker = IfExistsBefore(Result, DataEntryToDraw);
						if (OldMarker == null)
							{
							Marker DrawingMarker = new Marker()
								{
								Tag = DataEntryToDraw,
								Lon = (double)DataEntryToDraw.WLaenge,
								Lat = (double)DataEntryToDraw.WBreite,
								TypeToDraw = PhaseToCreate
								};
							Result.Add(DrawingMarker);
							}
						else
							{
							OldMarker.TypeToDraw = PhaseToCreate;
							}
						}
					}
				}
			return Result;
			}
Exemplo n.º 12
0
		private List<Marker> CreateMarkerForProjektPhasenDaten(Organisation[] SchulListen,
			LogicalAreaType PhaseToProduce)
			{
			List<Marker> Result = new List<Marker>();
			foreach (Organisation schulEntry in SchulListen)
				{
				if (schulEntry.Ort.WLaenge == null)
					{
					continue;
					}
				if (IfExistsBefore(Result, schulEntry) == null)
					{
					Marker SchoolMarker = new Marker()
						{
						Tag = schulEntry,
						Lon = (double)schulEntry.Ort.WLaenge,
						Lat = (double)schulEntry.Ort.WBreite,
						TypeToDraw = LogicalAreaType.Schule
						};
					Result.Add(SchoolMarker);
					}
				List<Organisation> KlassenListe = Data.DbServer3.WordUp.Organisationen
					.Find_ChildrenOrganisationenWithSpecialTypes
					(schulEntry.Id, new List<Guid>() { OrganisationenTypen.Klasse }).ToList();
				List<Guid> KlassenIDs = KlassenListe.Select(sel => sel.Id).ToList();
				DataRowCollection DataToDraw = null;
				DbEntities.dbserver3.wordup.rows.ProjektUebersicht[] ElementsToDraw = null;

				ElementsToDraw = Data.DbServer3.WordUp.ProjektUebersichten
					.Find_OrganisationenRelatedProjektUebersichten(KlassenIDs, PhaseToProduce.ToString());

				if (ElementsToDraw == null)
					{
					foreach (DataRow RowToDraw in DataToDraw)
						{
						if (RowToDraw["WLaenge"] == Convert.DBNull)
							{
							continue;
							}
						Marker OldMarker = IfExistsBefore(Result, RowToDraw);
						if (OldMarker == null)
							{
							Marker DrawingMarker = new Marker()
								{
								Tag = RowToDraw,
								Lon = Convert.ToDouble(RowToDraw["WLaenge"]),
								Lat = Convert.ToDouble(RowToDraw["WBreite"]),
								TypeToDraw = PhaseToProduce
								};
							Result.Add(DrawingMarker);
							}
						else
							{
							OldMarker.TypeToDraw = PhaseToProduce;
							}
						}
					}
				else
					{
					foreach (DbEntities.dbserver3.wordup.rows.ProjektUebersicht ELementToDraw in ElementsToDraw)
						{
						if (ELementToDraw.WLaenge == null)
							{
							continue;
							}
						Marker OldMarker = IfExistsBefore(Result, ELementToDraw.Id);
						if (OldMarker == null)
							{
							Marker DrawingMarker = new Marker()
								{
								Tag = ELementToDraw,
								Lon = (double)ELementToDraw.WLaenge,
								Lat = (double)ELementToDraw.WBreite,
								TypeToDraw = PhaseToProduce
								};
							Result.Add(DrawingMarker);
							}
						else
							{
							OldMarker.TypeToDraw = PhaseToProduce;
							}
						}
					}
				}
			return Result;
			}
Exemplo n.º 13
0
		private List<Marker> CreateMarkerForSchueler(Organisation[] SchulListen, LogicalAreaType PhaseToProduce)
			{
			List<Marker> Result = new List<Marker>();
			foreach (Organisation schulEntry in SchulListen)
				{
				if (schulEntry.Ort.WLaenge == null)
					{
					continue;
					}
				if (IfExistsBefore(Result, schulEntry.Id) == null)
					{
					Marker SchoolMarker = new Marker()
						{
						Tag = schulEntry,
						Lon = (double)schulEntry.Ort.WLaenge,
						Lat = (double)schulEntry.Ort.WBreite,
						TypeToDraw = LogicalAreaType.Schule
						};
					Result.Add(SchoolMarker);
					}

				Organisation[] KlassenListe = Data.DbServer3.WordUp.Organisationen
					.Find_ChildrenOrganisationenWithSpecialTypes
					(schulEntry.Id, new List<Guid>() { OrganisationenTypen.Klasse });
				Person[] Schueler = Data.DbServer3.WordUp.Personen.Find_VertreterPersonenProSchule(schulEntry.Id);

				foreach (Person SchuelerEntry in Schueler)
					{
					if (SchuelerEntry.WLaenge == null)
						{
						continue;
						}
					if (IfExistsBefore(Result, SchuelerEntry.Id) == null)
						{
						Marker PupilMarker = new Marker()
							{
							Tag = SchuelerEntry,
							Lon = (double)SchuelerEntry.WLaenge,
							Lat = (double)SchuelerEntry.WBreite,
							TypeToDraw = (SchuelerEntry.Sex == "M")
								? LogicalAreaType.SchuelerM
								: LogicalAreaType.SchuelerW
							};
						Result.Add(PupilMarker);
						}
					}
				}
			return Result;
			}
Exemplo n.º 14
0
		private List<Marker> CreateMarkerForSchulen(Organisation[] SchulListen, LogicalAreaType PhaseToProduce)
			{
			List<Marker> Result = new List<Marker>();
			foreach (Organisation schulEntry in SchulListen)
				{
				if (schulEntry.Ort.WLaenge == null)
					{
					continue;
					}
				if (IfExistsBefore(Result, schulEntry.Id) == null)
					{
					Marker SchoolMarker = new Marker()
						{
						Tag = schulEntry,
						Lon = (double)schulEntry.Ort.WLaenge,
						Lat = (double)schulEntry.Ort.WBreite,
						TextToDraw = schulEntry.CodeName,
						TypeToDraw = LogicalAreaType.Schule
						};
					Result.Add(SchoolMarker);
					}
				}
			return Result;
			}
Exemplo n.º 15
0
		private void LoadAvailablePlakatJPG(Organisation SelectedOrganisation,
			String PlakatNumberItem)
			{
			String PlakatFileName = WordUpBasics.PlakatImageFileName(Data.DbServer3.WordUp.Organisationen.FindOrLoad
					(SelectedOrganisation.ParentOrganisationsId).MaterialRoot,
					SelectedOrganisation.CodeName, PlakatNumberItem);
			if (!File.Exists(PlakatFileName))
				{
				MessageBox.Show("Der Plakat File mit dem Namen\r\n\""
				                + PlakatFileName + "\"\r\nexistiert nicht");
				return;
				}
			WMB.Basics.StartExternalAssoziation(PlakatFileName,
				"Open");
			}
Exemplo n.º 16
0
		private bool FillKlassenEntryStatus(Organisation Schule, String OrgOrder, DataTable DataEntryStatus)
			{
			int KlassenLevelConter = 100;
			foreach (Organisation Klasse in Data.DbServer3.WordUp.Organisationen.AktuelleKlassen)
				{
				if (Klasse.ParentOrganisationsId != Schule.Id)
					continue;
				String commonSchoolMaterialRoot = WordUpBasics.SchulDatenRootPath;
				String localSchulDatenRoot = Path.Combine(commonSchoolMaterialRoot, Schule.MaterialRoot);
				String KlassenOrganisationsID = Klasse.Id.ToString();
				DataRow KlassenDataRow = DataEntryStatus.NewRow();
				DateTime Von = DateTime.MinValue;
				foreach (OrganisationZuTermin TerminConnector in Klasse.OrganisationenZuTerminen.Where
					(element => element.Termin.TermineTypId == TermineTypen.WS
								|| element.Termin.TermineTypId == TermineTypen.OeffWS))
					{
					KlassenDataRow["ID"] = System.Guid.NewGuid().ToString();
					KlassenDataRow["OrgOrder"] = OrgOrder + Convert.ToString(++KlassenLevelConter).Substring(1, 2);
					KlassenDataRow["Typ"] = Klasse.Typ.TypNameId;
					KlassenDataRow["CodeName"] = Klasse.CodeName;
					KlassenDataRow["Datum"] = (DateTime) TerminConnector.Termin.Von;

					String KlassenName = (Klasse.CodeName + "      ").Substring(4, 2);
					if (KlassenName.Substring(0, 1) == "4")
						{
						if (Directory.Exists(Path.Combine(localSchulDatenRoot, KlassenName + "\\WSPersonen")))
							KlassenDataRow["Kopien"] = Convert.ToString(WMB.Basics.GetFilesFromDirectory
								(Path.Combine(localSchulDatenRoot, KlassenName + "\\WSPersonen"), new String[] {"*.JPG"},
									-1).Count);
						int VorsteherCount = 0;
						int StellVertreterCount = 0;
						int RatCount = 0;
						foreach (PersonZuWordUpID personZuWordUpId in Data.DbServer3.WordUp.PersonenZuWordUpID
							.Where(Per => Per.OrganisationenId == Klasse.Id))
							{
							if (personZuWordUpId.PersonenTypId == PersonenTypen.Vorsteher)
								VorsteherCount++;
							if (personZuWordUpId.PersonenTypId == PersonenTypen.Stellvertreter)
								StellVertreterCount++;
							if (personZuWordUpId.PersonenTypId == PersonenTypen.Rat)
								RatCount++;
							}
						KlassenDataRow["Vorst"] = VorsteherCount;
						KlassenDataRow["Stv"] = StellVertreterCount;
						KlassenDataRow["Rat"] = RatCount;
						if (Directory.Exists(Path.Combine(localSchulDatenRoot, KlassenName + "\\WSPlakate")))
							KlassenDataRow["PlakatFotos"] = Convert.ToString(WMB.Basics.GetFilesFromDirectory
								(Path.Combine(localSchulDatenRoot, KlassenName + "\\WSPlakate"), new String[] {"*.JPG"},
									-1).Count);
						int PlakateCounter = 0;
						int ZeilenCounter = 0;
						int NotAssignedCounter = 0;
						foreach (WSPlakat wsPlakat in Data.DbServer3.WordUp.WSPlakate.Where(wsp =>
							wsp.WordUpRootId == Guid.Parse(WordUpID)
							&& wsp.OrganisationenId == Klasse.Id))
							{
							if (wsPlakat.ErfassungsId.Substring(0, 2) == KlassenName)
								PlakateCounter++;
							ZeilenCounter++;
							if ((wsPlakat.ProjektId == null)
							    || (wsPlakat.ProjektId == Guid.Empty))
								NotAssignedCounter++;
							}
						KlassenDataRow["PlakateErf"] = PlakateCounter;
						KlassenDataRow["Zeilen"] = ZeilenCounter;
						KlassenDataRow["NichtZugeordnet"] = NotAssignedCounter;
						}
					}
				DataEntryStatus.Rows.Add(KlassenDataRow);
				}
			return true;
			}
Exemplo n.º 17
0
		private List<Marker> CreateMarkerForDefinedOrteWherePicturesShouldProduced(Organisation[] SchulListen,
			LogicalAreaType PhaseToProduce)
			{
			List<Marker> Result = new List<Marker>();
			Dictionary<string, List<DataRow>> Projekte = WordUp23.DataWrapper.Instance.GetSortedProjektSelection
				(DataWrapper.SortOrder.ArbeitsGruppen, DataWrapper.Instance.WordUpPhase,
					" and ID in (Select ProjektID from Aktivitaeten where AktivitaetsTypenID = 'EB6C4BAF-2A4C-4A81-81AB-296EDCEE1CFA') ");
			foreach (List<DataRow> ProjekteRows in Projekte.Values)
				{
				foreach (DataRow ProjekteRow in ProjekteRows)
					{
					if (ProjekteRow["WLaenge"] == Convert.DBNull)
						{
						continue;
						}
					Dictionary<String, String> ProjektMaterialien = DataWrapper.Instance.GetMaterialien(ProjekteRow,
						"Projekte");
					if (ProjektMaterialien.Keys.Count > 0)
						continue;
					String NumericProjektID = ProjekteRow["NumericProjektID"].ToString().Substring(3);
					if (IfExistsBefore(Result, ProjekteRow) == null)
						{
						Marker DrawingMarker = new Marker()
							{
							Tag = ProjekteRow,
							Lon = Convert.ToDouble(ProjekteRow["WLaenge"]),
							Lat = Convert.ToDouble(ProjekteRow["WBreite"]),
							TypeToDraw = LogicalAreaType.Text,
							TextToDraw = NumericProjektID
							};
						Result.Add(DrawingMarker);
						}
					}
				}
			return Result;
			}
Exemplo n.º 18
0
		public void SetInvolvedSchule(Organisation Schule)
			{
			if (!InvolvedSchulen.ContainsKey(Schule))
				{
				InvolvedSchulen[Schule] = 0;
				}
			InvolvedSchulen[Schule]++;
			}
Exemplo n.º 19
0
		private List<Marker> CreateMarkerForOrteWithMoreProjects(Organisation[] SchulListen,
			LogicalAreaType PhaseToProduce)
			{
			List<Marker> Result = new List<Marker>();
			Dictionary<int, int> Haeufigkeiten = new Dictionary<int, int>();
			int ModuloValue = 5;

			foreach (Guid OrtsGuid in Data.DbServer3.WordUp.Projekte.CounterProProjektOrt.Keys)
				{
				ElementProOrt CounterEnry =
					Data.DbServer3.WordUp.Projekte.CounterProProjektOrt[OrtsGuid];
				int Haeufigkeit = CounterEnry.Count / ModuloValue;
				if (!Haeufigkeiten.ContainsKey(Haeufigkeit))
					Haeufigkeiten[Haeufigkeit] = 0;
				Haeufigkeiten[Haeufigkeit]++;
				}

			foreach (Guid OrtsGuid in Data.DbServer3.WordUp.Projekte.CounterProProjektOrt.Keys)
				{
				ElementProOrt CounterEnry =
					Data.DbServer3.WordUp.Projekte.CounterProProjektOrt[OrtsGuid];
				if ((!CounterEnry.CounterProZustaendig.ContainsKey(Zustaendig.Bezirk))
					|| (CounterEnry.CounterProZustaendig[Zustaendig.Bezirk] < 3))
					continue;
				DbEntities.dbserver3.wordup.rows.Ort CountedOrt = Data.DbServer3.WordUp.Orte.Find(OrtsGuid);
				if (CountedOrt.WLaenge == null)
					continue;
				if (IfExistsBefore(Result, OrtsGuid) == null)
					{
					int Haeufigkeit = CounterEnry.Count / ModuloValue;
					int Importance = -1;
					foreach (int Key in Haeufigkeiten.Keys)
						{
						if (Haeufigkeiten[Key] == Haeufigkeit)
							{
							Importance = Key + 1;
							break;
							}
						}
					Marker OrtMarker = new Marker()
						{
						Tag = CountedOrt,
						Lon = (double)CountedOrt.WLaenge,
						Lat = (double)CountedOrt.WBreite,
						TextToDraw = CountedOrt.NameId,
						ImportanceFactor = Importance,
						TypeToDraw = LogicalAreaType.OrteWithMoreProjects
						};
					Result.Add(OrtMarker);
					}
				}
			return Result;
			}
Exemplo n.º 20
0
        public WSPlakat GetLastWSPlakat(Organisation SelectedOrganisation,
            String PlakatNumberItem)
            {
            String SelectStatement = $"Select top (1) * from {NativeName} where "
                                     + $"{OrganisationenIdCol} = '{SelectedOrganisation.Id.ToString()}'"
                                     + $" and {ErfassungsIdCol} > '{PlakatNumberItem}' and "
                                     + $" {ErfassungsIdCol} < '{PlakatNumberItem}9' "
                                     + $" order by {ErfassungsIdCol} desc";


            WSPlakat[] plakate = DownloadRows(SelectStatement);
            return plakate.Length == 0?null: plakate[0];
            }
Exemplo n.º 21
0
		private List<Marker> CreateMarkerForTypen(Organisation[] SchulListen, LogicalAreaType PhaseToProduce)
			{
			List<Marker> Result = new List<Marker>();
			foreach (DataRow Schule in SchulListen)
				{
				if (Schule["WLaenge"] == Convert.DBNull)
					{
					continue;
					}
				if (IfExistsBefore(Result, Schule) == null)
					{
					Marker SchoolMarker = new Marker()
						{
						Tag = Schule,
						Lon = Convert.ToDouble(Schule["WLaenge"]),
						Lat = Convert.ToDouble(Schule["WBreite"]),
						TypeToDraw = LogicalAreaType.Schule
						};
					Result.Add(SchoolMarker);
					}
				Organisation[] KlassenListe = WordUp23.DataWrapper.Instance.GetKlassen(null); //Schule);
				}
			return Result;
			}
Exemplo n.º 22
0
		private String GetSchulOSMEntry (Organisation Schule)
			{
			List<String> Klassen = new List<string> ();
			foreach (Organisation Klasse in Data.DbServer3.WordUp.Organisationen
					.Find_ChildrenOrganisationenWithSpecialTypes
					(Schule.Id, new List<Guid>() { OrganisationenTypen.Klasse }))
				{
				Klassen.Add (Klasse.CodeName);
				}
			String BeteiligteKlassen = "</br><small>" + String.Join("</small></br><small>", Klassen) + "</small>";
			String Size = Convert.ToString(15 + (int)(Klassen.Count * 3));
			return GetLatLonString(Schule)
				+ Schule.Beschreibung + "\t"
				+ "<a href=\"" + Schule.Www + "\" target=\"_blank\">Kontakt</a>" + BeteiligteKlassen + "\t"
				+ Size + "," + Size + "\t0,0\t" + WordUp23.Basics.Instance.HTTP_LOCATION_FOR_TECHNIC_PICTURES + "/SchulHaus.png";
			}
Exemplo n.º 23
0
		private void CreateAllForOneOutputGroup(String FileNamePrefixText, Organisation[] SchulenToProcess,
			String MapType, String MapName, List<Basics.ShowDatenTyp> ListOfPictureTypesToProduce)
			{
			if (SchulenToProcess != null)
				{ 
				foreach (Organisation Schule in SchulenToProcess)
					{
					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.Schueler))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForSchueler(SchulenToProcess, LogicalAreaType.Schule),
								DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.Schueler);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.Wuensche))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForProjektPhasenDaten(SchulenToProcess, LogicalAreaType.Wunsch),
								DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.Wuensche);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.Planung))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForProjektPhasenDaten(SchulenToProcess, LogicalAreaType.Planung),
								DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.Planung);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.Projekt))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForProjektPhasenDaten(SchulenToProcess, LogicalAreaType.Projekt),
								DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.Projekt);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.Realisierungen))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForProjektPhasenDaten(SchulenToProcess, LogicalAreaType.Realisierung),
								DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText, Basics.ShowDatenTyp.Realisierungen);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.Fertig))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForProjektPhasenDaten(SchulenToProcess, LogicalAreaType.Fertig),
								DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.Fertig);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.Combined))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForCombined(SchulenToProcess, LogicalAreaType.Combined),
								DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText, Basics.ShowDatenTyp.Combined);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.CombinedButNoPupil))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForCombined(SchulenToProcess, LogicalAreaType.CombinedNoPupil),
								DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.CombinedButNoPupil);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.ProjekteWithMissingPictures))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForProjekteWithMissingPictures(SchulenToProcess,
									LogicalAreaType.MissingProjektPicture), DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.ProjekteWithMissingPictures);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.OrteWithMissingPictures))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForOrteWithMissingPictures(SchulenToProcess,
									LogicalAreaType.MissingOrtPicture), DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.OrteWithMissingPictures);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.DefinedOrteWherePicturesShouldProduced))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForDefinedOrteWherePicturesShouldProduced(SchulenToProcess,
									LogicalAreaType.DefinedProjectsForRSB), DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText, Basics.ShowDatenTyp.DefinedOrteWherePicturesShouldProduced);

					if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.Typen))
						CreatePrintout(
							MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
								MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
								CreateMarkerForTypen(SchulenToProcess, LogicalAreaType.Typen),
								DrawMarkerSymbol, GraphicSizeToCreate),
							FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.OrteWithMoreProjects);
					}
				}

		if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.OrteWithMoreProjects))
				CreatePrintout(
					MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
						MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
						CreateMarkerForOrteWithMoreProjects(SchulenToProcess, LogicalAreaType.OrteWithMoreProjects),
						DrawMarkerSymbol, GraphicSizeToCreate),
					FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.OrteWithMoreProjects);
			if (ListOfPictureTypesToProduce.Contains(Basics.ShowDatenTyp.Schulen))
				CreatePrintout(
					MapBasics.Instance.CreateOSMPictureWithOverLoadsViaKachel(
						MapDataWrapper.Instance.GetKachel(MapType, MapName, GraphicSizeToCreate),
						CreateMarkerForSchulen(Data.DbServer3.WordUp.Organisationen.AktuelleSchulen, LogicalAreaType.Schule),
						DrawMarkerSymbol, GraphicSizeToCreate),
					FileNamePrefixText + "_" + MapType + "_" + MapName, Basics.ShowDatenTyp.Schulen);
			}