当前位置: 首页>>代码示例>>C#>>正文


C# DataCollection.Last方法代码示例

本文整理汇总了C#中DataCollection.Last方法的典型用法代码示例。如果您正苦于以下问题:C# DataCollection.Last方法的具体用法?C# DataCollection.Last怎么用?C# DataCollection.Last使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataCollection的用法示例。


在下文中一共展示了DataCollection.Last方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadTypTree

		private void LoadTypTree(DataCollection<TreeEntryClass> _typTree)
			{
			foreach (DataRow RootDataTemplateRow in DataModell.DataSetForStaticTables.Tables["RootDataTemplates"].Rows)
				{
				RootDataTemplates RootTyp = new RootDataTemplates(RootDataTemplateRow);
				_typTree.Add(new TreeEntryClass()
					{
					Parent = null,
					HeadLine = RootTyp.NameID,
					ConnectedObject = RootTyp
					});
				foreach (DataRow TypRow in DataModell.DataSetForStaticTables.Tables["Typ"].Rows)
					{
					if (((Guid)TypRow["RootFormat"]) != RootTyp.ID)
						continue;
					Typ SelectableTyp = new Typ(TypRow);
					_typTree.Last().Childs.Add(new TreeEntryClass()
						{
						Parent = _typTree.Last(),
						HeadLine = SelectableTyp.NameID,
						ConnectedObject = SelectableTyp
						});
					}
				}
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:25,代码来源:TreeEntryClassCache.cs

示例2: LoadSecureableAttributes

		public DataCollection<SecureableAttribute> LoadSecureableAttributes()
			{
			DataCollection<SecureableAttribute> SecureableAttributes = new DataCollection<SecureableAttribute>();
			foreach (DataRow SecureableAttributeRow in SecureableAttributesDataSet.Tables["SecureableAttributes"].Rows)
				{
				SecureableAttributes.Add(new SecureableAttribute(Modell, SecureableAttributeRow)
					{
						
					});
				SecureableAttributes.Last().DirectoryConnectedTo = SecureableUnit.GetClassFromID (Modell.SecureableUnitStart [0],
				            (Guid) SecureableAttributeRow ["SecureableUnitsID"]);
				SecureableAttributes.Last().GetSecureableAttributeValueInstance();
				SecureableAttributes.Last().DirectoryConnectedTo.SecureableAttributesForUnit.Add(SecureableAttributes.Last());
				}
			return SecureableAttributes;
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:16,代码来源:SecuringDirectoryDataWrapper.cs

示例3: RunCopyFromServerListSynchron

public void RunCopyFromServerListSynchron(BackgroundWorker LocalCopyFromServerListBackgroundWorker,
	DataCollection<CopyInfoBlock> OrderList)
	{
	int RunningCounter = 0;
	foreach (CopyInfoBlock CopyInfo in OrderList)
		{
		CopyInfo.m_ActiveFileIndex = RunningCounter;
		int Percentage = (int) (((double) ++RunningCounter) / (((double) OrderList.Count) / 100));
		CopyInfo.m_Type = ProgressReportType.FILE_STARTED;
		if (LocalCopyFromServerListBackgroundWorker != null)
			{
			CopyInfo.m_Status = "Kopieren von " + RunningCounter.ToString ()
				+ " von " + OrderList.Count.ToString() + " aktiv";
			LocalCopyFromServerListBackgroundWorker.ReportProgress (0, CopyInfo);
			Basics.DoEvents ();
			}
		NetworkBlockSize = CopyInfo.m_TransferBlockSize;
		if ((CopyInfo.m_SourceLastWriteTime == null)
			|| (CopyInfo.m_SourceLastWriteTime == DateTime.MinValue))
			FillSourceLastWriteTime (CopyInfo);
		if ((!String.IsNullOrEmpty(CopyInfo.m_To))
			&& (CopyInfo.m_ToStream == null))
			CopyInfo.m_Status = DoCopyFromServer (LocalCopyFromServerListBackgroundWorker,
				CopyInfo.m_From, CopyInfo.m_To, CopyInfo);
		else
			{
			if ((String.IsNullOrEmpty (CopyInfo.m_To))
				&& (CopyInfo.m_ToStream != null))
				CopyInfo.m_Status = DoCopyFromServer (LocalCopyFromServerListBackgroundWorker,
					CopyInfo.m_From, ref CopyInfo.m_ToStream, CopyInfo);
			
			}
		if (LocalCopyFromServerListBackgroundWorker != null)
			{
			CopyInfo.m_Type = ProgressReportType.FILE_ENDED;
			LocalCopyFromServerListBackgroundWorker.ReportProgress (Percentage, CopyInfo);
			Basics.DoEvents ();
			}
		}
	if (LocalCopyFromServerListBackgroundWorker != null)
		{
		LocalCopyFromServerListBackgroundWorker.ReportProgress (101, OrderList.Last ());
		Basics.DoEvents ();
		}
	}
开发者ID:heinzsack,项目名称:DEV,代码行数:45,代码来源:CommonBasics.cs

示例4: GetSelectionData

			public DataCollection<SelectionDataClass> GetSelectionData(List<String> BereicheToUse, String ActiveUser,
				InformationenAddOn InfoAddOnParameter,
				Guid TypID, AuswahlSelection EntriesToShow, AuswahlSortOrder SortOrder)
				{
				if (InfoAddOnParameter.Tabelle == "ProcessConnector")
					return null;
				String SortAddOn = String.Empty;

				FillSearchParameter(InfoAddOnParameter.Tabelle);

				if ((SortingItemsForSelection.Length == 0)
					&& (ItemsToSelectForSelection.Length == 0)
					&& (ItemsToFillHinweisColumn.Length == 0)
					&& (String.IsNullOrEmpty(ViewNameForSelection)))
					return null;

				List<String> ItemsToSelect = new List<string>();
				List<String> ItemsToSort = new List<string>();
				ItemsToSelect.AddRange(ItemsToSelectForSelection);
				foreach (String SortingItem in SortingItemsForSelection)
					{
					if (!ItemsToSelect.Contains(SortingItem.Replace(" desc", "")))
						{
						ItemsToSelect.Add (SortingItem.Replace (" desc", ""));
						}
					ItemsToSort.Add(SortingItem);
					}
				if (ItemsToSort.Count > 0)
					{
					SortAddOn = " order by " + String.Join (", ", ItemsToSort);
					}

				foreach (String HinweisItem in ItemsToFillHinweisColumn)
					if (!ItemsToSelect.Contains(HinweisItem))
						ItemsToSelect.Add(HinweisItem);
				String SelectAddOn = String.Empty;
				List<String> SelectBasisStatements = new List<string>();
				switch (EntriesToShow)
					{
					case AuswahlSelection.All:
						break;
					case AuswahlSelection.My:
						SelectAddOn = String.Format(" and (CreatedBy is null or CreatedBy = '{0}' or LastModifiedBy = '{0}') ",
							ActiveUser.ToUpper());
						break;
					case AuswahlSelection.Used:
						SelectBasisStatements.Add(String.Format("select distinct (TabelleID), count (*) as Anzahl from InformationenAddOn "
							+ " where Tabelle = '{0}' and not TabelleID is null and "
							+ " not TabelleID = '00000000-0000-0000-0000-000000000000' group by TabelleID order by Anzahl desc",
								InfoAddOnParameter.Tabelle));
						SelectAddOn = String.Format(" and ID in (select distinct (TabelleID) from InformationenAddOn "
								+ " where Tabelle = '{0}' and not TabelleID is null "
								+ "and not TabelleID = '00000000-0000-0000-0000-000000000000' )", InfoAddOnParameter.Tabelle);
						break;
					case AuswahlSelection.OnlyWohnPark:
						SelectAddOn = " and (HausID = '766B7B60-7A0D-47AD-8323-638A073FBF77') ";
						SortAddOn = " order by HausKurzbezeichnung, AdressenKurzbezeichnung, Ort, "
						            + "StrassenName, Hausnummer, Stiege, Stock, Tuere ";
						break;
					case AuswahlSelection.OnlyKaufPark:
						SelectAddOn = " and (HausID = '21403101-55E9-4F78-92C7-C89F121D7D6C') ";
						SortAddOn = " order by HausKurzbezeichnung, AdressenKurzbezeichnung, Ort, "
						            + "StrassenName, Hausnummer, Stiege, Stock, Tuere ";
						break;
					case AuswahlSelection.External:
						SelectAddOn = " and ((not HausID = '21403101-55E9-4F78-92C7-C89F121D7D6C' and "
										+ "not HausID = '766B7B60-7A0D-47AD-8323-638A073FBF77') or HausID is null)";
						SortAddOn = " order by HausKurzbezeichnung, AdressenKurzbezeichnung, Ort, "
						            + "StrassenName, Hausnummer, Stiege, Stock, Tuere ";
						break;
					}
				switch (SortOrder)
					{
					case AuswahlSortOrder.Alphabetic:
						break;
					case AuswahlSortOrder.Occurence:
						break;
					}
				String BereichClause = " (Bereich = '" + String.Join ("' or Bereich = '", BereicheToUse) + "') ";
				SelectBasisStatements.Add("select Bereich, " + String.Join(", ", ItemsToSelect) + " from " + ViewNameForSelection
							+ " where " + BereichClause + SelectAddOn + SortAddOn);

				DataSet SearchDataSet = BasicAccess.AltErlaaInfoDataBase.GetCommonMultiDataSet(SelectBasisStatements.ToArray());
				Dictionary<Guid, String> HaeufigkeitProID = new Dictionary<Guid, String>();
				if (SearchDataSet.Tables["InformationenAddOn"] != null)
					{
					foreach (DataRow HaeufigkeitEntry in SearchDataSet.Tables["InformationenAddOn"].Rows)
						{
						String Haeufigkeit = String.Format("    {0:D}", Convert.ToInt32(HaeufigkeitEntry["Anzahl"]));
						HaeufigkeitProID[(Guid)HaeufigkeitEntry["TabelleID"]]
							= Haeufigkeit.Substring(Haeufigkeit.Length - 4);
						}
					}
				DataCollection<SelectionDataClass> Result = new DataCollection<SelectionDataClass>();
				foreach (DataRow SearchEntry in SearchDataSet.Tables[ViewNameForSelection].Rows)
					{
					Result.Add(GetSelectionDataContent(SearchEntry, InfoAddOnParameter));
					if (SearchDataSet.Tables["InformationenAddOn"] != null)
						Result.Last().Haeufigkeit = HaeufigkeitProID[(Guid)SearchEntry["ID"]];
					}
//.........这里部分代码省略.........
开发者ID:heinzsack,项目名称:DEV,代码行数:101,代码来源:UpdateOneAddOnModell.cs


注:本文中的DataCollection.Last方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。