public static string GetAllHints(string etid) { List<DJ_Workers> ListGw= new BLLDJTourGroup().GetTourGroupByTeId(int.Parse(etid)).ToList(); Dictionary<string, string> data = new Dictionary<string, string>(); foreach (DJ_Workers item in ListGw) { data.Add(Guid.NewGuid().ToString(), item.Name + "/" + item.IDCard.Substring(0, 6) + "********" + item.IDCard.Substring(14)); } DataContractJsonSerializer serializer = new DataContractJsonSerializer(data.GetType()); using (MemoryStream ms = new MemoryStream()) { serializer.WriteObject(ms, data); return System.Text.Encoding.UTF8.GetString(ms.ToArray()); } }
protected void rptpeopleinfo_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { TicketAssign ta = e.Item.DataItem as TicketAssign; Literal laType = e.Item.FindControl("laType") as Literal; List<DJ_Group_Worker> listdjGW = new BLLDJTourGroup().GetGuiderWorkerByTE(Master.Scenic).ToList(); if (listdjGW.Where(x => x.DJ_Workers.IDCard == ta.IdCard).Count() > 0) { laType.Text = "导游"; } else { laType.Text = "个人"; } } }