Beispiel #1
0
    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;
        if (contextKey == "N")
            Pat_Names = Pat_Info.get_NurseNames(prefixText);
        else
            Pat_Names = Pat_Info.get_DoctorNames(prefixText);
        if (Pat_Names.Rows.Count > 0)
        {

            foreach (DataRow dr in Pat_Names.Rows)
            {
                Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString() + "," + dr[0].ToString(), dr[2].ToString()));
            }
        }
        else
        {
            Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Doctor Found..!", "0"));
        }
        return Pat_List.ToArray();
    }