public List <BaseUserProfile> SearchSeeker(int providerId, string searchQuery) { string procName = "[dbo].[Appointments_SearchBySeekerName]"; List <BaseUserProfile> listOfSeekers = null; _data.ExecuteCmd(procName, (param) => { param.AddWithValue("@ProviderId", providerId); param.AddWithValue("@SearchQ", searchQuery); }, (reader, recordSetIndex) => { BaseUserProfile aSeeker = new BaseUserProfile(); int startingIndex = 0; aSeeker.UserId = reader.GetSafeInt32(startingIndex++); aSeeker.FirstName = reader.GetSafeString(startingIndex++); aSeeker.LastName = reader.GetSafeString(startingIndex++); if (listOfSeekers == null) { listOfSeekers = new List <BaseUserProfile>(); } listOfSeekers.Add(aSeeker); }); return(listOfSeekers); }
public List <BaseUserProfile> GetUsersBySeeker(int seekerId) { string procName = "[dbo].[Appointments_GetProvidersNameBy_SeekerId]"; List <BaseUserProfile> listOfProviders = null; _data.ExecuteCmd(procName, (param) => { param.AddWithValue("@SeekerId", seekerId); }, (reader, recordSetIndex) => { BaseUserProfile provider = new BaseUserProfile(); int startingIndex = 0; provider.UserId = reader.GetSafeInt32(startingIndex++); provider.FirstName = reader.GetSafeString(startingIndex++); provider.LastName = reader.GetSafeString(startingIndex++); if (listOfProviders == null) { listOfProviders = new List <BaseUserProfile>(); } listOfProviders.Add(provider); }); return(listOfProviders); }
//GET/SEARCH All Seeker Names - form dropdown public List <BaseUserProfile> GetAllSeekerNames(int providerId) { List <BaseUserProfile> listOfSeekers = null; string procName = "dbo.Appointments_GetSeekersNameBy_ProviderId"; _data.ExecuteCmd(procName, (param) => { param.AddWithValue("@ProviderId", providerId); }, (reader, recordSetIndex) => { BaseUserProfile aSeeker = new BaseUserProfile(); int startingIndex = 0; aSeeker.UserId = reader.GetSafeInt32(startingIndex++); aSeeker.FirstName = reader.GetSafeString(startingIndex++); aSeeker.LastName = reader.GetSafeString(startingIndex++); if (listOfSeekers == null) { listOfSeekers = new List <BaseUserProfile>(); } listOfSeekers.Add(aSeeker); }); return(listOfSeekers); }