public static string[] GetDoctorNames(string prefixText, int count, string contextKey) { PatientInfoDAL Pat_Info = new PatientInfoDAL(); List<string> Pat_List = new List<string>(); Pat_Info = new PatientInfoDAL(); Pat_List.Clear(); DataTable Pat_Names = Pat_Info.get_PatDoctorNames(prefixText, contextKey); foreach (DataRow dr in Pat_Names.Rows) { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString() + "," + dr[0].ToString(), dr[2].ToString())); } return Pat_List.ToArray(); }
public static string[] GetDoctorNames(string prefixText, int count, string contextKey) { PatientInfoDAL objPat_Info = new PatientInfoDAL(); List<string> Pat_List = new List<string>(); objPat_Info = new PatientInfoDAL(); Pat_List.Clear(); DataTable Doc_Names = objPat_Info.get_PatDoctorNames(prefixText, contextKey); if (Doc_Names.Rows.Count > 0) { foreach (DataRow dr in Doc_Names.Rows) { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString().Trim() + "," + dr[0].ToString().Trim(), dr[2].ToString())); } } else { Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Doctor Found...", "0")); } return Pat_List.ToArray(); }