Пример #1
0
		public static List<KalenderSearchClass> ReadAllLastModifiedInformationenData (DateTime StartTime, DateTime StopTime)
			{
			WCFStandards KalenderSearchAccess = new WCFStandards ();
			DataSet SearchDataSet = KalenderSearchAccess.GetCommonDataSet ("Select ID, TypID, NameID, Titel, "
			                                                               + "LastModifiedBy, ModifyTimeStamp, TypID, CreatedBy, AccessRightsID "
			                                                               + "from Informationen "
			                                                               + "where " + Basics.GetSQLFormattedDateTime (StartTime) + " < ModifyTimeStamp and "
			                                                               + Basics.GetSQLFormattedDateTime (StopTime) + " > ModifyTimeStamp order by ModifyTimeStamp desc");
			List<KalenderSearchClass> Result = new List<KalenderSearchClass> ();
			foreach (DataRow KalenderTable in SearchDataSet.Tables ["Informationen"].Rows)
				{
				Result.Add (FillKalenderSearchClass (KalenderTable));
				}
			return Result;
			}
Пример #2
0
		private List<SelectionDataClass> LoadAllSelectionData(InformationenAddOn InfoAddOnParameter, String BereichToUse)
			{

			if (TemplateManagement.TableSelectionCache.ContainsKey (ViewNameForSelection) == false)
				{
				WCFStandardsNS.WCFStandards DataAccess = new WCFStandardsNS.WCFStandards ();
				DataSet PersonenDataSet = DataAccess.GetCommonDataSet ("Select " + String.Join (", ", ItemsToSelectForSelection)
								+ " from " + ViewNameForSelection + " where (" + TemplateManagement.GetWhereClauseFromBereich (BereichToUse)
								+ " ) order by " + String.Join (", ", SortingItemsForSelection));
				List<SelectionDataClass> PersistentResult = GetSelectionDataFormatting (PersonenDataSet.Tables [ViewNameForSelection]);
				TemplateManagement.TableSelectionCache.Add (ViewNameForSelection, PersistentResult);
				}
			List<SelectionDataClass> Result = new List<SelectionDataClass>();
			Result.AddRange (TemplateManagement.TableSelectionCache [ViewNameForSelection]);
			return Result;

			}
Пример #3
0
		void SetBooking(WCFStandards AEAGDataBase, String BookableUnitsID,
					DateTime BookedFor, String SetTo, DateTime BookingDateTime)
			{
			DataSet Bookings = AEAGDataBase.GetCommonDataSet (String.Format
						("Select * from Booking where BookableUnitsID = '{0}' and BookedFor = {1}",
						 BookableUnitsID, TransportData.GetSQLFormattedDateTime(BookedFor)));
			if (String.IsNullOrEmpty (SetTo))
				{
				if (Bookings.Tables ["Booking"].Rows.Count == 0)
					return;
				Bookings.Tables ["Booking"].Rows [0].Delete ();

				}
			else
				{
				DataRow RowToProcess;
				if (Bookings.Tables ["Booking"].Rows.Count == 0)
					{
					RowToProcess = Bookings.Tables ["Booking"].NewRow ();
					RowToProcess ["ID"] = System.Guid.NewGuid ();
					RowToProcess ["BookableUnitsID"] = BookableUnitsID;
					RowToProcess ["BookedFor"] = BookedFor;
					Bookings.Tables ["Booking"].Rows.Add (RowToProcess);
					}
				else
					{
					RowToProcess = Bookings.Tables ["Booking"].Rows [0];
					}
				RowToProcess ["BookingStatus"] = SetTo;
				RowToProcess ["BookingDateTime"] = BookingDateTime;
				}
			AEAGDataBase.SetCommonDataSet (Bookings);
			}
Пример #4
0
		public String GetMaterialLink(String TableName, Guid TableID)
			{
			if ((TableID == null)
				|| ((System.Guid)TableID == System.Guid.Empty))
				return String.Empty;
			WCFStandards Helper = new WCFStandards();
			DataTable MaterialTable = Helper.GetCommonDataSet("Select MaterialConnector from "
				+ TableName + " where ID = '" + TableID.ToString() + "'").Tables[TableName];
			if (MaterialTable.Rows.Count != 1)
				return String.Empty;
			return MaterialTable.Rows[0]["MaterialConnector"].ToString();
			}
Пример #5
0
		public String GetTypeSelectClause(InformationenAddOn InfoAddOn, Guid? TypesToProcess)
			{
			WCFStandards DataAccess = new WCFStandards();
			DataSet TypeInformationenIDs =
					DataAccess.GetCommonDataSet("Select ID from Informationen where TypID ='"
					+ ((Guid)TypesToProcess).ToString() + "'");
			if (TypeInformationenIDs.Tables["Informationen"].Rows.Count == 0)
				return String.Empty;
			List<string> IDsToSearchFor = new List<string>();
			foreach (DataRow IDRow in TypeInformationenIDs.Tables["Informationen"].Rows)
				IDsToSearchFor.Add(IDRow["ID"].ToString());
			String InfoAddOnSelectClause = " (InformationenID = '" + String.Join("' or InformationenID = '", IDsToSearchFor.ToArray()) + "') ";
			DataSet DistinctEntries =
				DataAccess.GetCommonDataSet("Select distinct (TabelleID), count (*) as Occurence from "
					 + " InformationenAddOn where Tabelle = '" + InfoAddOn.Tabelle + "' and " + InfoAddOnSelectClause
					 + " Group By TabelleID order by Occurence");
			if (DistinctEntries.Tables["InformationenAddOn"].Rows.Count == 0)
				return String.Empty;
			List<string> TabelleIDSearchFor = new List<string>();
			foreach (DataRow IDRow in DistinctEntries.Tables["InformationenAddOn"].Rows)
				TabelleIDSearchFor.Add(IDRow["TabelleID"].ToString());
			return " (ID = '" + String.Join("' or ID = '", TabelleIDSearchFor.ToArray()) + "') ";

			}
Пример #6
0
		public static bool DoInformationenUpdate (Informationen ActuallInformation, ITemplateElementeBackgroundFunctions EntryToProcess)
			{
			//if (EntryToProcess.InfoAddOn.Informationen != ActuallInformation)
			//    throw new Exception ("EntryToProcess.InfoAddOn.Informationen != ActuallInformation");
			WCFStandards ExistenceCheck = new WCFStandards ();
			DataTable InformationenTable = ExistenceCheck.GetCommonDataSet ("Select * from Informationen where ID = '"
								 + ActuallInformation.ID.ToString () + "'").Tables ["Informationen"];
			if (InformationenTable.Rows.Count == 0)
				{
				ExistenceCheck.RunSQLBatch ("Insert into Informationen (ID, NameID, TypID, ModifyTimeStamp) values ('"
											+ ActuallInformation.ID.ToString () + "', 'Empty ActiveInformationen', '" 
											+ ActuallInformation.TypID.ToString () + "', '"
											+ DateTime.Now.ToString (WMB.Basics.ISO_DATE_TIME_FORMAT) + "')");
				}
			try
				{
				System.Guid? ProcessedEntityID = InsertOrModifyEntity (EntryToProcess, ActuallInformation);
				if (ProcessedEntityID == null)
					return false;
				return true;
				}
			catch (Exception Excp)
				{
				Basics.ReportErrorToEventViewer ("TemplateManagement.DoInformationenUpdate",
					"Beim Add/Modify für ActuallInformation \"" + ActuallInformation.ID.ToString ()
					+ "\" kam es zu folgendem Problem:\r\n"
					+ Excp.ToString ());
				return false;
				}
			}
Пример #7
0
		public static DataTable GetProcessInfoAddOnWithConnectorDataRows (String InformationenID)
			{
			WCFStandards Helper = new WCFStandards ();
			return Helper.GetCommonDataSet ("Select * from InformationenAddOn where InformationenID = '"
						  + InformationenID + "' and Tabelle = 'ProcessConnector'").Tables ["InformationenAddOn"];
			}
Пример #8
0
		public static int GetNumberOfInformationenUsedThisTableEntry (String Tabelle, String TabelleID)
			{
			WCFStandards DistinctHelper = new WCFStandards ();
			DataSet DistinctTableEntryDataSet =
				DistinctHelper.GetCommonDataSet ("Select count (distinct (InformationenID)) from InformationenAddOn where "
			+ "Tabelle = '" + Tabelle + "' and TabelleID = '" + TabelleID + "'");
			return Convert.ToInt32 (DistinctTableEntryDataSet.Tables [0].Rows [0] [0]);
			}
Пример #9
0
		public static List<Guid> GetInformationenUsedThisTableEntry (String Tabelle, String TabelleID)
			{
			WCFStandards DistinctHelper = new WCFStandards ();
			DataSet DistinctTableEntryDataSet =
				DistinctHelper.GetCommonDataSet ("Select distinct (InformationenID) from InformationenAddOn where "
			+ "Tabelle = '" + Tabelle + "' and TabelleID = '" + TabelleID + "'");
			List<Guid> Result = new List<Guid> ();
			foreach (DataRow InfoIDRow in DistinctTableEntryDataSet.Tables [0].Rows)
				{
				Result.Add ((Guid) InfoIDRow [0]);
				}
			return Result;
		}
Пример #10
0
		public static System.Guid? InsertOrModifyEntity (ITemplateElementeBackgroundFunctions ConnectedITemplateElementeBackgroundFunctions,
			Object EntityToProcess, bool CheckForPreExistence = false)
			{
			if (EntityToProcess == null)
				{
				Basics.ReportErrorToEventViewer ("TemplateManagement.InsertOrModifyEntity",
												 "EntityToProcess == null\r\n"
												 + (new Exception ("EntityToProcess == null")).ToString ());
				return null;
				}
			Type ObjectType = EntityToProcess.GetType ();
			String TableName = ObjectType.Name;
			String IDName = "ID";
			PropertyInfo IDPropInfo = ObjectType.GetProperty (IDName);
			if (IDPropInfo == null)
				{
				IDName = "TimingsID";
				IDPropInfo = ObjectType.GetProperty (IDName);
				}
			if (IDPropInfo == null)
				{
				Basics.ReportErrorToEventViewer ("TemplateManagement.InsertOrModifyEntity",
												 "Keine ID (TimingsID) bei EntityToProcess\r\n"
												 + (new Exception ("Keine ID (TimingsID) bei EntityToProcess")).ToString ());
				return null;
				}
			Object IDValue = IDPropInfo.GetValue (EntityToProcess, null);
			bool InsertIsTrueModifyIsFalse = true;
			if (IDValue != null)
				{
				if (IDValue is System.Guid)
					{
					InsertIsTrueModifyIsFalse = ((Guid) IDValue == Guid.Empty);
					}
				else if (IDValue is System.Guid?)
					InsertIsTrueModifyIsFalse = ((Guid?) IDValue == Guid.Empty);
				}
			DoTabelleDefaultModifications (ConnectedITemplateElementeBackgroundFunctions,
										   EntityToProcess, InsertIsTrueModifyIsFalse);
			WCFStandards DataAccess = new WCFStandards ();
			if ((CheckForPreExistence)
				&& (IDValue != null))
				{
				DataTable CheckTable = DataAccess.GetCommonDataSet ("Select * from " + TableName + " where " + IDName + " = '"
																	+ (Guid) IDValue + "'").Tables [TableName];
				if (CheckTable.Rows.Count == 0)
					InsertIsTrueModifyIsFalse = true;
				}
			String SQLCommand = String.Empty;
			if (InsertIsTrueModifyIsFalse)
				{
				SQLCommand = WMB.Basics.CreateInsertStatement (TableName, EntityToProcess, EntityToProcess.GetType ().GetProperties());
				}
			else
				{
				SQLCommand = WMB.Basics.CreateModifyStatement (TableName, EntityToProcess, EntityToProcess.GetType ().GetProperties ());
				}
			IDValue = IDPropInfo.GetValue (EntityToProcess, null);
			DataAccess.RunSQLBatch (SQLCommand);
			return (System.Guid?) IDValue;
			}
Пример #11
0
		public static List<Guid> GetTableEntriesInInfoAddOn (String Tabelle)
			{
			List<Guid> Result = new List<Guid> ();
			WCFStandards DistinctHelper = new WCFStandards ();
			DataSet TableEntryDataSet =
				DistinctHelper.GetCommonDataSet ("Select distinct (TabelleID) from InformationenAddOn where Tabelle = '" + Tabelle + "'");
			foreach (DataRow EntryRow in TableEntryDataSet.Tables [0].Rows)
				if ((EntryRow [0] != Convert.DBNull)
					&& ((Guid) EntryRow [0] != Guid.Empty))
					Result.Add ((Guid) EntryRow [0]);
				
			return Result;
			}
Пример #12
0
		private DataCollection<SelectionDataClass> LoadAllSelectionData()
			{

			if (TableSelectionCache.ContainsKey(ViewNameForSelection) == false)
				{
				WCFStandardsNS.WCFStandards DataAccess = new WCFStandardsNS.WCFStandards();
				DataSet PersonenDataSet = DataAccess.GetCommonDataSet("Select " + String.Join(", ", ItemsToSelectForSelection)
								+ " from " + ViewNameForSelection + " where (" + DataModell.GetWhereClauseFromBereich(BereichToUse)
								+ " ) order by " + String.Join(", ", SortingItemsForSelection));
				DataCollection<SelectionDataClass> PersistentResult = GetSelectionDataFormatting(PersonenDataSet.Tables[ViewNameForSelection]);
				TableSelectionCache [ViewNameForSelection] = PersistentResult;
				}
			DataCollection<SelectionDataClass> Result = new DataCollection<SelectionDataClass>();
			Result.AddRange(TableSelectionCache[ViewNameForSelection]);
			return Result;

			}
Пример #13
0
		private void SetNumberOfPages (String TableName, String TableID, DataRow UsedTableRow, int NumberOfPages)
			{
			if (UsedTableRow.Table.Columns ["NumberOfPages"] == null)
				return;
			WCFStandardsNS.WCFStandards DataBase = new WCFStandardsNS.WCFStandards ();
			DataBase.DefaultConnectionStringName = "WPMediaAddOnDataConnectionString";
			DataTable ExistingEntryTable =
				DataBase.GetCommonDataSet ("Select * from " + TableName + " where ID = '" + TableID + "'").Tables [TableName];
			UsedTableRow ["NumberOfPages"] = NumberOfPages;
			if (ExistingEntryTable.Rows.Count != 1)
				{
				Basics.ReportErrorToEventViewer ("StandBildRedaktionInstance.SetNumberOfPages",
					TableName + " mit der ID " + TableID + " brachte Rows.Count != 1");
				return;
				}
			String UpdateStatement = "Update " + TableName + " set NumberOfPages = " + Convert.ToString (NumberOfPages) +
			                         " where ID = '" + TableID + "'";
			DataBase.RunSQLBatch (UpdateStatement);
			}
Пример #14
0
		public static List<KalenderSearchClass> ReadAllInformationenData (DateTime StartTime, DateTime StopTime)
			{
			WCFStandards KalenderSearchAccess = new WCFStandards ();
			DataSet SearchDataSet = KalenderSearchAccess.GetCommonDataSet ("Select ID, TypID, NameID, Titel, "
			                                                               + "TimeA, TimeB, LastModifiedBy, ModifyTimeStamp, TypNameID, CreatedBy, AccessRightsID "
			                                                               + "from InformationenWithTimings where TimeA > " + Basics.GetSQLFormattedDateTime (StartTime)
			                                                               + " and TimeA < " + Basics.GetSQLFormattedDateTime (StopTime)
			                                                               + " and TimingTypID = 'EventVonBis' order by ModifyTimeStamp desc");
			List<KalenderSearchClass> Result = new List<KalenderSearchClass> ();
			foreach (DataRow KalenderTable in SearchDataSet.Tables ["InformationenWithTimings"].Rows)
				{
				Result.Add (FillKalenderSearchClass (KalenderTable));
				}
			return Result;
			}
Пример #15
0
		public static DataSet GetAllInformationenAddOns (String InformationenID, String [] DontPresent, String [] PresentOnly)
			{
			WCFStandards Helper = new WCFStandards ();
			String PresentClause = GetPresentDependingSelectClause (DontPresent, PresentOnly);
			DataSet InformationenAddOnsDataSet = Helper.GetCommonDataSet
				("Select * from InformationenAddOn where InformationenID = '" + InformationenID + "' " + PresentClause);
			return InformationenAddOnsDataSet;
			}
Пример #16
0
		public static DataRow GetCommonDataRow (String TableName, String ID)
			{
			WCFStandards DataAccess = new WCFStandards ();
			DataTable ResultedRows = DataAccess.GetCommonDataSet ("Select * from " + TableName
									  + " where ID = '" + ID + "'").Tables [TableName];
			if (ResultedRows.Rows.Count != 1)
				return null;
			return ResultedRows.Rows [0];
			}
Пример #17
0
		public static DataTable GetStatisticInformationTable (String TableName, String BeitragID)
			{
			WCFStandards AccessHelper = new WCFStandards ();
			AccessHelper.DefaultConnectionStringName = "WPMediaConnectionString";
			DataSet StatisticDataSet = AccessHelper.GetCommonDataSet ("Select * from WPMediaLogView where "
					 + "TableName = '" + TableName + "' and BeitragID = '" + BeitragID
					 + "' and TimingTyp > 'A' and TimingTyp < 'AZ'"
					 + " order by ComputerName");
			return StatisticDataSet.Tables ["WPMediaLogView"];
			}
Пример #18
0
		public static DataTable GetConnectedAVInformationen (List<String> All_AV_AVIDs)
			{
			WCFStandards DataAccess = new WCFStandards ();
			DataAccess.DefaultConnectionStringName = "AltErlaaInfoConnectionString";
			String AVIDs = ("( BearbeitungsHinweis = '" + String.Join ("' or BearbeitungsHinweis = '", All_AV_AVIDs) + "' )");
			return DataAccess.GetCommonDataSet ("Select * from Informationen where " + AVIDs).Tables ["Informationen"];
			}
Пример #19
0
		private static void DeleteDeleteteAbleTableEntriesFromDataBase(Informationen ActuallInformation)
			{
			WCFStandards DataAccess = new WCFStandards ();
			DataTable ExistingInformationenAddOn = DataAccess.GetCommonDataSet
				("Select * from InformationenAddOn where InformationenID = '"
				 + ActuallInformation.ID.ToString () + "'").Tables ["InformationenAddOn"];
			foreach (DataRow InfoAddOn in ExistingInformationenAddOn.Rows)
				{
				if ((String.IsNullOrEmpty (InfoAddOn ["Tabelle"].ToString ()))
					|| (InfoAddOn ["TabelleID"] == Convert.DBNull)
					|| (InfoAddOn["Tabelle"].ToString() == "Timings"))
					continue;
				DataRowCollection ExistingReferences = DataAccess.GetCommonDataSet
					("Select * from InformationenAddOn where not InformationenID = '"
					 + ActuallInformation.ID.ToString() + "' and Tabelle = '" + InfoAddOn["Tabelle"].ToString()
					 + "' and TabelleID = '" + InfoAddOn["TabelleID"].ToString () + "'").Tables["InformationenAddOn"].Rows;
				if (ExistingReferences.Count > 0)
					continue;
				String DeleteStatement = "Delete from " + InfoAddOn ["Tabelle"].ToString () + " where ID = '"
				                         + InfoAddOn ["TabelleID"].ToString () + "'";
				RunSQLBatch(DeleteStatement);
				}
			}
Пример #20
0
		public static String GetMyOrUsedUnifiedTableIDsSelectClause (InformationenAddOn InfoAddOn, AuswahlSelection EntriesToShow)
			{
			WCFStandards DataAccess = new WCFStandards ();
			String WhereClause = String.Empty;
			if (EntriesToShow == AuswahlSelection.My)
				{
				DataSet MyInformationenIDs =
					DataAccess.GetCommonDataSet ("Select ID from Informationen where CreatedBy ='" + CurrentUserName
												 + "' or LastModifiedBy = '" + CurrentUserName + "'");
				if (MyInformationenIDs.Tables ["Informationen"].Rows.Count == 0)
					return String.Empty;
				List<string> IDsToSearchFor = new List<string> ();
				foreach (DataRow IDRow in MyInformationenIDs.Tables ["Informationen"].Rows)
					IDsToSearchFor.Add (IDRow ["ID"].ToString ());
				WhereClause = " and  (InformationenID = '" + String.Join ("' or InformationenID = '", IDsToSearchFor.ToArray ()) +
									 "') ";
				}
			DataSet OccurenceOrderedMyTableIDs = DataAccess.GetCommonDataSet ("Select distinct (TabelleID), count (*) as Occurence from "
					 + " InformationenAddOn where Tabelle = '" + InfoAddOn.Tabelle + "' " + WhereClause + " Group by TabelleID order by Occurence");
			if (OccurenceOrderedMyTableIDs.Tables ["InformationenAddOn"].Rows.Count == 0)
				return String.Empty;
			List<string> UnifiedTableIDs = new List<string> ();
			foreach (DataRow UnifiedRow in OccurenceOrderedMyTableIDs.Tables ["InformationenAddOn"].Rows)
				UnifiedTableIDs.Add (UnifiedRow ["TabelleID"].ToString ());
			return " (ID = '" + String.Join ("' or ID = '", UnifiedTableIDs.ToArray ()) + "') ";
			}
Пример #21
0
		//public String GetMaterialLink (Materialien Material)
		//	{
		//	String[] Result = new String[(int)WMB.DataWrapper.MaterialElementIndex.TechnicalTableLength];

		//	Result[(int)WMB.DataWrapper.MaterialElementIndex.UsedConnectionString] = "AltErlaaInfoConnectionString";
		//	Result[(int)WMB.DataWrapper.MaterialElementIndex.UsedMaterialTableName] = "Materialien";
		//	Result[(int)WMB.DataWrapper.MaterialElementIndex.UsedMaterialTableID] = Material.ID.ToString();
		//	Result[(int)WMB.DataWrapper.MaterialElementIndex.UsedTableName] = "";
		//	Result[(int)WMB.DataWrapper.MaterialElementIndex.UsedTableID] = "";
		//	Result[(int)WMB.DataWrapper.MaterialElementIndex.UsedNameID] = "";
		//	Result[(int)WMB.DataWrapper.MaterialElementIndex.UsedType] = Material.Typ;
		//	Result[(int)WMB.DataWrapper.MaterialElementIndex.UsedSubEntryID] = Material.SubEntryID;

		//	return String.Join(",", Result);
		//	}


		public String GetMaterialLink(String TableName, String TableID)
			{
			WCFStandards Helper = new WCFStandards();
			DataTable MaterialTable = Helper.GetCommonDataSet("Select MaterialConnector from "
				+ TableName + " where ID = '" + TableID + "'").Tables[TableName];
			if (MaterialTable.Rows.Count != 1)
				return String.Empty;
			return MaterialTable.Rows[0]["MaterialConnector"].ToString();
			}
Пример #22
0
		public static List<SelectionDataClass> ReorderSelectionData (InformationenAddOn InfoAddOn, List<SelectionDataClass> UnorderedSelectionData)
			{
			WCFStandards DataAccess = new WCFStandards ();
			DataSet MyUsedEntries = DataAccess.GetCommonDataSet (String.Format (OCCURENCY_SQL_COMMAND,
				   InfoAddOn.ActuallBezeichner, InfoAddOn.Tabelle, String.Empty, CurrentUserName));
			DataSet AllUsedEntries = DataAccess.GetCommonDataSet (String.Format (OCCURENCY_SQL_COMMAND,
				   InfoAddOn.ActuallBezeichner, InfoAddOn.Tabelle, "NOT", CurrentUserName));
			return FillReorderedSelectionDataClass (UnorderedSelectionData, CombineIDEntries
				(MyUsedEntries.Tables ["InformationenAddOn"], AllUsedEntries.Tables ["InformationenAddOn"]));
			}
Пример #23
0
		public DataTable GetPersonenForOrganisation(String OrganisationsID, String PersonenTypID)
			{
			WCFStandards Helper = new WCFStandards();
			String SelectStatement = String.Empty;
			if (String.IsNullOrEmpty(PersonenTypID))
				SelectStatement = "Select * from PersonenEinerOrganisation where OrganisationsID = '" + OrganisationsID + "'";
			else
				SelectStatement = "Select * from PersonenEinerOrganisation where OrganisationsID = '" + OrganisationsID
					+ "' and PersonenTypID = '" + PersonenTypID + "'";
			DataSet PersonenDataSet = Helper.GetCommonDataSet(SelectStatement);
			return PersonenDataSet.Tables["PersonenEinerOrganisation"];
			}
Пример #24
0
		public static List<String> GetMaterialElementeForThisInformation (String InformationenID)
			{
			WCFStandards Helper = new WCFStandards ();
			DataTable MaterialTable = Helper.GetCommonDataSet ("Select TechnicalAddOn from InformationenAddOn where InformationenID = '"
					+ InformationenID + "' and TechnicalAddOn > ' '").Tables ["InformationenAddOn"];
			List<String> PictureElementeForThisInformation = new List<String> ();
			foreach (DataRow PictureElementRow in MaterialTable.Rows)
				{
				String [] SingleTechnicalAddOn = PictureElementRow ["TechnicalAddOn"].ToString ().Split (';');
				foreach (String Entry in SingleTechnicalAddOn)
					PictureElementeForThisInformation.Add (Entry.Trim ( ));
				}
			return PictureElementeForThisInformation;
			}
Пример #25
0
		private List<SelectionDataClass> LoadMyOrUsedSelectionData (InformationenAddOn InfoAddOn, String BereichToUse, 
			TemplateManagement.AuswahlSelection EntriesToShow, TemplateManagement.AuswahlSortOrder SortOrder)
			{
			String SelectClause = String.Empty;
				SelectClause = TemplateManagement.GetMyOrUsedUnifiedTableIDsSelectClause (InfoAddOn, EntriesToShow);
			
			if (String.IsNullOrEmpty (SelectClause))
				return new List<SelectionDataClass> ();
			WCFStandards DataAccess = new WCFStandards ();
			DataSet ResultDataSet = null;
			if (SortOrder == TemplateManagement.AuswahlSortOrder.Alphabetic)
				ResultDataSet = DataAccess.GetCommonDataSet ("Select " + String.Join (", ", ItemsToSelectForSelection)
								+ " from " + ViewNameForSelection + " where ( " 
								+ TemplateManagement.GetWhereClauseFromBereich (BereichToUse) + " ) and "
								+ SelectClause + " order by " + String.Join (", ", SortingItemsForSelection));
			else
				ResultDataSet = DataAccess.GetCommonDataSet ("Select " + String.Join (", ", ItemsToSelectForSelection)
								+ " from " + ViewNameForSelection + " where ( " 
								+ TemplateManagement.GetWhereClauseFromBereich (BereichToUse) + " ) and "
								+ SelectClause );
			return GetSelectionDataFormatting (ResultDataSet.Tables [ViewNameForSelection]);
			}
Пример #26
0
		public static DataTable GetAllInformationIDs ()
			{
			WCFStandards Helper = new WCFStandards ();
			DataSet InformationenIDDataSet =
				Helper.GetCommonDataSet ("Select ID, TypID from Informationen");
			return InformationenIDDataSet.Tables ["Informationen"];
			}
Пример #27
0
		String GetBooking (WCFStandards AEAGDataBase, String BookableUnitsID, DateTime BookedFor)
			{
			DataSet TodaysBooking = AEAGDataBase.GetCommonDataSet ("Select * from Booking where BookedFor = "
									 + TransportData.GetSQLFormattedDateTime(BookedFor)
									 + " and BookableUnitsID = '"
									 + BookableUnitsID + "'");
			if (TodaysBooking.Tables ["Booking"].Rows.Count == 0)
				return String.Empty;
			return TodaysBooking.Tables ["Booking"].Rows [0] ["BookingStatus"].ToString ();
			}
Пример #28
0
		public static DataRow GetInformationAddOnDataRow (String InfoAddOnID)
			{
			WCFStandards Helper = new WCFStandards ();
			DataTable InformationenAddOnDataTable =
				Helper.GetCommonDataSet ("Select * from InformationenAddOn where ID = '"
				+ InfoAddOnID + "'").Tables ["InformationenAddOn"];
			if (InformationenAddOnDataTable.Rows.Count != 1)
				return null;
			return InformationenAddOnDataTable.Rows [0];
			}
Пример #29
0
		public Object CheckAndGetInstatiatedPackage
			(WCFStandards m_DataBase , String TableToProcess , String SelectedID )
			{
			Paketieren.PackagingHandler Pkg;
			DataSet ActuallRowDataSet = m_DataBase.GetCommonDataSet ("Select * from "
			              + TableToProcess + " where ID = '" + SelectedID + "'");
			if ((ActuallRowDataSet.Tables.Count != 1)
			    || (ActuallRowDataSet.Tables [0].Rows.Count != 1))
				throw new Exception ("ActuallRowDataSet nicht gefüllt bei Table " + TableToProcess + " und ID = " + SelectedID);
			if (!CheckForIncompleteEntry (ActuallRowDataSet.Tables [0].Rows [0]))
				{
				Pkg = (Paketieren.PackagingHandler) GetInstatiatedPackage
					                                      (m_DataBase, TableToProcess, SelectedID);
				}
			else
				{
				String PackageName = GetPackageName (TableToProcess, SelectedID);
				if (File.Exists (PackageName))
					{
					FileInfo FInfo = new FileInfo (PackageName);
					DateTime RemoteLastWriteTime = DateTime.MinValue;

					RemoteLastWriteTime = GetLastWriteTimeForServerFileCall
						(Basics.GetRemoteFileNameFromLocalFileName (PackageName));
					if (RemoteLastWriteTime == DateTime.MinValue)
						RemoteLastWriteTime = GetLastWriteTimeForServerFileCall
							(Basics.GetRemoteArchivFileNameFromLocalFileName (PackageName));
					if (RemoteLastWriteTime != DateTime.MinValue)
						{
						if (RemoteLastWriteTime > FInfo.LastWriteTime.AddSeconds (180))
							Basics.SecureFileDelete (PackageName);
						}
					}
				if (!File.Exists (PackageName))
					{
					if (DoCentralFileDownloadCall != null)
						{
						
						DoCentralFileDownloadCall (TableToProcess, PackageName,
												   Basics.GetRemoteFileNameFromLocalFileName (PackageName));
						if (!File.Exists (PackageName))
							{
							DoCentralFileDownloadCall (TableToProcess, PackageName,
													   Basics.GetRemoteArchivFileNameFromLocalFileName (PackageName));
							if (File.Exists (PackageName))
								LoadedFromTheArchive = true;
							}
						}
					}
				if (File.Exists (PackageName))
					Pkg = (Paketieren.PackagingHandler) GetInstatiatedPackage
						                                      (TableToProcess, SelectedID);
				else
					Pkg = (Paketieren.PackagingHandler) GetInstatiatedPackage
						                                      (m_DataBase, TableToProcess, SelectedID);
				}
			ModificationRequired = false;
			return Pkg;
			}
Пример #30
0
		public static DataSet GetAllInformationenAddOns (String InformationenID)
			{
			WCFStandards Helper = new WCFStandards ();
			DataSet InformationenAddOnsDataSet = Helper.GetCommonDataSet
				("Select * from InformationenAddOn where InformationenID = '" + InformationenID + "'");
			return InformationenAddOnsDataSet;
			}