Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7539569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:25:06+00:00 2026-05-30T07:25:06+00:00

Our currently logged in user info is inside the PBM project while our search

  • 0

Our currently logged in user info is inside the PBM project while our search class is inside web.
so we can not access utiltiy class from web
we will be need of to write loggedin user info in temporary storage of silverlight-

This comes into play when I want to display only those records that the user has entered.
Here in this code I can do that with a search as well:
// search by user logged in has to be done – userid 1 hard coded

        pSearchQuery = pSearchQuery.Where(item => item.AddedBy == 1);

How do I go about setting up this storage area in Silverlight? Note security is not a major concern in this app.

Here is code how I display patients. the user can do a search by first or last name or gender. here I would add filter to ensure that user sees only his/her patients.

namespace PBM.Web.Classes
{
public class Search
{
public static IQueryable GetSearchQueryPatient(IQueryable pSearchQuery, Patient pPatient)
{

        if (!string.IsNullOrEmpty(pPatient.FirstName))
        {
            pSearchQuery = pSearchQuery.Where(item => item.FirstName.Contains(pPatient.FirstName))  ;
        }

        if (!string.IsNullOrEmpty(pPatient.LastName))
        {
            pSearchQuery = pSearchQuery.Where(item => item.LastName.Contains(pPatient.LastName));
        }

        if (pPatient.Gender.HasValue && pPatient.Gender.Value > 0)
        {
            pSearchQuery = pSearchQuery.Where(item => item.Gender.Value == pPatient.Gender.Value);
        }

        // search by user logged in has to be done - need to write user loggedin to a silverlight storage area and compare here to Addedby which is what we call the user owner of the patient record. current set to 1.
        pSearchQuery = pSearchQuery.Where(item => item.AddedBy == 1);

        pSearchQuery = pSearchQuery.OrderBy(item => item.FirstName).ThenBy(item => item.LastName);

        return pSearchQuery;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:25:07+00:00Added an answer on May 30, 2026 at 7:25 am

    You could store your user id in the session… this should be accessable from booth worlds… or should take a look at the html bridge for silverlight.

    http://www.silverlight.net/learn/overview/working-with-javascript/html-bridge-(silverlight-quickstart)

    Or google for some Javascript/Silverlight Interop…

    Don’t know if I understand you correct, if not please provide some additional information or add code example…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our project currently uses Crystal Reports for Visual Studio 2008. We need to upgrade
Currently our website uses links to allow the user to change their locale. The
How to logout the user from our site when they logged out from Facebook?
Currently we call a web service to check if user has permission to use
Our product currently spans a large number of technologies, including Java, PL/SQL, VB.Net and
Our application currently stores bunch of configuraton & application specific data to files on
Our business currently has an online store and recently we've been offering free specials
Currently our Java application uses the values held within a tab delimited *.cfg file.
Currently our developent enviroment consists of a Dev server, a Staging server and a
Currently our queries add a variety of Restrictions to ensure the results are considered

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.