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:1141
    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

    Good morning to everyone, I'm getting frustrated with this error message "An exception occured when building the database for the application. Could not generate the deployement script." when deploying the lightswitch app. It only popups when it comes to the last step of publishing. It happens in the Microsoft.Lightswitch.Publish.targets file, that I've never touched before. See the image in full size Thank you in advance, Anas,
    Read more...

    HTML Grid Row Color
    12/16/2014 11:28 AM
    Using the HTML table, I'm trying to apply a background color to certain rows based on a value in one of the columns.  I'm using Rohit Agrawal's approach in his blog post, Spice Up Your HTML Client UI With Code.   Basically I'm setting the css background attribute for the row element to the desired color.  The problem I am having is that there is a default alternating row color  being applied of a very light grey.  That is overriding the red color I am trying to set.  In the screen shot below, the first two rows should be colored.  The second row is fine, because it normally does not have a background color due to an alternating row.  The first row, however, is not being colored as desired.  The alternating light grey color is overriding the color I am setting.  Does anyone have any help or insight into this issue?   Thank you, Binu Agrawal 
    Read more...

    Hi, The LS team stopped short of enabling runtime dynamic OData connections, so I thought I'd take a stab at it.  Turns out we can change the Odata Uri at runtime using an event handler for BuildingRequest method of the DataServiceContext.  The following code works to change the Uri at runtime.  Imports System.Data.Services.Client Imports LightSwitchApplication Namespace ApplicationData.ApplicationDataService Partial Public Class ApplicationData Inherits Global.System.Data.Services.Client.DataServiceContext Private Sub OnContextCreated() AddHandler Me.BuildingRequest, AddressOf OnBuildingRequest AddHandler Me.SendingRequest2, AddressOf OnSendingRequest2 End Sub Private Sub OnBuildingRequest(sender As Object, buildingRequestEventArgs As BuildingRequestEventArgs) Dim stUri As String = buildingRequestEventArgs.RequestUri.ToString stUri = Replace(stUri,
    Read more...

    Angularjs in Lightswitch HTML
    12/13/2014 5:59 PM
    I've tried to implement Jan Van Bladels article http://app.pragmaswitch.com/CrudGrid/ng-app/index.html and unlike other articles I have seen this one doesn't seem to involve mvc and app_start and so on, everything is done client side? I am able to access the index.html file at http://localhost:somenumber/HTMLClient/ng-app/index.html If I click the HTML client, I am redirected to the LS Browse screen I set up. There I have one post that I made in the LS client. However I can't seem to get this to show in the custom index.html file? If I click Add, nothing happens no modal window sliding down(guess I must make some .html file for this?), but the save button turns red, if i click this I get an error message saying "An error occured. Cannot read property 'extend' of undefined" However it is saved to the db, but as a blank post. I have uploaded the project to OneDrive https://onedrive.live.com/redir?resid=48547E6FC0593A30%21434 If anyone please could take a look at
    Read more...

    When I link a SharePoint Document Library (on Office 365 / SharePoint Online dev site, same host web as Cloud Business App), I receive the error "Error retrieving document library information" when I try to add a document while running the app in debug mode (comes up as an ajax dialog while I'm in the app). I see the Add Documents button, and when I click it, I get the Word / Excel / PowerPoint / Upload flyout menu, but receive the other error after awhile (30 or more seconds later) when I click one of those four options. Has anyone else seen this before? I  have verified my permissions to the document library. The connections seem to be set up fine, and the GUID column in the source (SQL Azure DB) and the document library (external) are properly related (one SQL entry-to-many Documents). The GUID column in the parent data source is properly populated and displayed.
    Read more...

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