public static AutoCompleteBoxData Agenda_ChoferBuscar(object context) { string transporte; string chofer; AutoCompleteBoxData res = new AutoCompleteBoxData(); string searchString = ((Dictionary <string, object>)context)["Text"].ToString(); if (searchString.Length > 2) { transporte = HttpContext.Current.Session["Id_Transporte"].ToString(); chofer = null; AgendaWCFClient objAgendaWCFClient = new AgendaWCFClient(); gsChofer_ListarResult[] lst = objAgendaWCFClient.Agenda_ListarChofer(((Usuario_LoginResult)HttpContext.Current.Session["Usuario"]).idEmpresa, ((Usuario_LoginResult)HttpContext.Current.Session["Usuario"]).codigoUsuario, transporte, chofer, searchString); List <AutoCompleteBoxItemData> result = new List <AutoCompleteBoxItemData>(); foreach (gsChofer_ListarResult agenda in lst) { AutoCompleteBoxItemData childNode = new AutoCompleteBoxItemData(); childNode.Text = agenda.ID_Chofer + "-" + agenda.Nombre; childNode.Value = agenda.ID_Chofer; result.Add(childNode); } res.Items = result.ToArray(); } return(res); }