コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        //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);
        }