You are here:   Forum
Register   |  Login

 

Forum Notice

This Forum is ARCHIVE only
For LightSwitch questions,
please use the official forums at:

http://social.msdn.microsoft.com/forums/en-US/lightswitch/threads


Forums

Need to filter database content for user on login
Last Post 21 May 2012 06:10 AM by admin. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
olisherr424User is Offline
New Member
New Member
Send Private Message
Posts:1
Avatar

--
21 May 2012 05:51 AM

    Hello, 

    Basically.. I am wanting a way to:

    When a user logs in, automatically his company (a field in the database) is found and only people from the same company are shown to that user.

    Example of what i am looking for.. "if a users companyID is 'Wizards', i want data on the database to be filtered automatically so that he can only see people with a companyID =="

    Please any help with this would be much appreciated. Also please not i am doing this using C# and Forms Authentication.

    Thanks
    Oli  

    Michael WashingtonUser is Offline
    Send Private Message
    Posts:1110
    Avatar

    --
    21 May 2012 06:10 AM
    -----------
    Michael Washington
    http://LightSwitchHelpWebsite.com
    You are not authorized to post a reply.


    Latest Microsoft Visual Studio LightSwitch Forum Threads That Have Answers

    Does LightSwitch  VS2013 Supports To Upload a File in Sql Server Without Using Any Silverlight or Azure or WCF Technology please let me know .
    Read more...

    Lightswitch Designer of VS 2013 Update 4 unable to read .lsml file created in VS2013 Update 3. Yves Pflieger
    Read more...

    I am trying to setup a simple database application for Lightswitch.  The data base is only four MSSQL tables (Contacts, Addresses, Emails and Phones).  When I add a screen I get three templates (Browse Data, View Details and Add/Edit) rather than the five or more templates shown in all the tutorials I've seen.  Building the solution gives the errors: Error 1 Source file 'C:\Users\Admin\Documents\Visual Studio 2013\Projects\Contacts\Contacts\Contacts.Server\GeneratedArtifacts\ContactsDataObjectContext.cs' could not be opened ('Unspecified error ') Contacts.Server Error 2 Could not copy the file "C:\Users\Admin\Documents\Visual Studio 2013\Projects\Contacts\Contacts\Contacts.Server\obj\Debug\Application.Server.dll" because it was not found. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v4.0\Microsoft.LightSwitch.targets 103 10 Contacts What have I done wrong??  
    Read more...

    I have a Data Grid bound to a table with an "Order" column. Initially the data grid is sorted. There are up and down commands that change the order value of the selected item.  Unless I .OrderBy() the data bound item, .Save(), and .Refresh() the screen, the data grid will become unsorted if the user pushes up or down. I do not want to .Save() because validation errors may occur. Been stuck for a few days on this so am quite frustrated =(
    Read more...

    I have a function that gets the current user. function selectUser(screen) { var filteredCollection = screen.CurrentUser; function selectCurrentUser() { var currentUser = filteredCollection.data[0]; if (currentUser) { filteredCollection.selectedItem = currentUser; } } if (filteredCollection.state === msls.VisualCollection.State.idle) { // If the visual collection is already loaded, try selecting the first item. selectCurrentUser(); } else { function onVisualCollectionStateChanged() { if (filteredCollection.state === msls.VisualCollection.State.idle) { filteredCollection.removeChangeListener("state", onVisualCollectionStateChanged); selectCurrentUser(); } } filteredCollection.addChangeListener("state", onVisualCollectionStateChanged); } } This code was provided by Huy Nguyen
    Read more...

    1234
    Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation