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


C# Google.Add方法代码示例

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


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

示例1: FillPersonen

		String FillPersonen (DataRow IwTRow, Google.GData.Extensions.ExtensionCollection<Who> WhoList )
			{
			String EventIDString = IwTRow ["ID"].ToString ();
			DataTable FullPersonenZuTermine = WordUpWCFAccess.GetCommonDataSet
				("Select * from FullPersonenZuTermine where TermineID = '" + EventIDString + "'").Tables ["FullPersonenZuTermine"];
			if (FullPersonenZuTermine.Rows.Count == 0)
				{
				WhoList.Clear ();
				return String.Empty;
				}

			bool SomethingChanged = false;
			ExtensionCollection<Who> DeleteList = new ExtensionCollection<Who> ();
			foreach (Who Participant in WhoList)
				{
				String Rel = Participant.Rel;
				if (Rel == "http://schemas.google.com/g/2005#event.organizer")
					continue;
				String eMail = Participant.Email;
				DataRow [] ParticipantBase = FullPersonenZuTermine.Select ("eMail = '" + eMail + "'");
				if (ParticipantBase.Length == 1)
					continue;
				DeleteList.Add (Participant);
				}

			foreach (Who ParticipantsToDelete in DeleteList)
				{
				WhoList.Remove (ParticipantsToDelete);
				SomethingChanged = true;
				}

			foreach (DataRow PersonenRow in FullPersonenZuTermine.Rows)
				{
				String eMail = PersonenRow ["eMail"].ToString ();
				String NameID = String.Empty;
				if (String.IsNullOrEmpty (PersonenRow ["PersonalPresentationLink"].ToString ()))
					NameID = PersonenRow ["VorName"].ToString ();
				else
					NameID = "<a href=\"" + PersonenRow ["PersonalPresentationLink"].ToString () + "\" target=\"_blank\">"
						+ PersonenRow ["VorName"].ToString () + "</a>";
				bool IsAvailable = false;
				foreach (Who Participant in WhoList)
					{
					String Rel = Participant.Rel;
					if (Rel == "http://schemas.google.com/g/2005#event.organizer")
						continue;
					String WhoeMail = Participant.Email;
					if (String.Compare(WhoeMail, eMail, StringComparison.CurrentCultureIgnoreCase) == 0)
						{
						Participant.ValueString = NameID;
						IsAvailable = true;
						break;
						}
					}
				if (IsAvailable == false)
					{
					Who NewParticipant = new Who ();
					NewParticipant.Email = eMail;
					NewParticipant.ValueString = NameID;
					NewParticipant.Rel = "http://schemas.google.com/g/2005#event.attendee";
					WhoList.Add (NewParticipant);
					SomethingChanged = true;
					}
				}
			List<String> PersonenInvolved = new List<string> ();
			int LineBreakCounter = 0;
			foreach (Who Participant in WhoList)
				{
				String Rel = Participant.Rel;
				if (Rel == "http://schemas.google.com/g/2005#event.organizer")
					continue;
				String WhoeMail = Participant.Email;
				String WhoNameID = Participant.ValueString;
				if ((++LineBreakCounter % 5) == 0)
					PersonenInvolved.Add ("<br/>" + WhoNameID);
				else
					PersonenInvolved.Add (WhoNameID);
				}
			return "<h4>Teilnehmer</h4>" + String.Join (", ", PersonenInvolved) + "<Br/>";
			}
开发者ID:heinzsack,项目名称:DEV,代码行数:80,代码来源:PublishAltErlaaInfo.cs


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