Data not pulling back RRS feed

  • Question

  • Hi

    I figured out how to compare the two fields but I am having problems with the data not pulling back from the database. I am not sure If I am missing something or not. When I validate if the information is working the data from the text box is showing up but the data from the mp.userid is null and I am not sure what this is. I am using a LINQ to SQL to pull the data back. I am thinking it is because I am not loading this data any where. Do I have to have the data load some where before it pulls in that cause where would I put it I don't want it to load to anything.  Thanks

        private void LoginBtn_Click(object sender, RoutedEventArgs e)
          blockbuster_service.Blckbust_ServiceClient blckservice = new blockbuster.blockbuster_service.Blckbust_ServiceClient();
          blckservice.getUserCompleted += new EventHandler<blockbuster.blockbuster_service.getUserCompletedEventArgs>(blckservice_getUserCompleted);
          blockbuster_service.UserID ud = new blockbuster.blockbuster_service.UserID();
          if (ud.UserName == Usernametxtbx.Text && ud.UserPass == PswrdTxtBx.Text)
            MessageBox.Show("User Name or Password is incorrect", "Invalid", MessageBoxButton.OK);
        void blckservice_getUserCompleted(object sender, blockbuster.blockbuster_service.getUserCompletedEventArgs e)
        private void load_movie()
          MainPage startpage = new MainPage();
          App.HomePage = new Uri("/Movie", UriKind.Relative);
          startpage.ContentFrame.Source = App.HomePage;
    • Moved by Paul Zhou Tuesday, February 15, 2011 6:28 AM not supported (From:Visual C# General)
    Friday, February 11, 2011 8:34 PM

All replies

  • i believe we might need more information on this: Can you include a code sample for "blockbuster.blockbuster_service" ? how does this check for user authentication?
    Balaji Baskar
    [Please mark the post as answer if it answers your question]
    Friday, February 11, 2011 9:19 PM
  • It isn't the service that checks it what I am trying to do is pull the information back from the database and then when the person clicks on the log in button it runs a validation to make sure that the information is in the database. here is the service
        List<UserID> getUser()
          UserDataContext context = new UserDataContext();
          var results = from usid in context.UserIDs
                 select usid;
          return results.ToList();
    Friday, February 11, 2011 10:26 PM
  • I am thinking that the problem is that the service is not running at the time it is trying to do the validation. I am not sure how to make this run before it does this.
    Friday, February 11, 2011 10:29 PM
  • Hi Andy0927,


    I'm moving this thread from Base “C# General" to “LINQ to SQL" forum. There are more experts in that forum.


    Thank you for your understanding.

    Have a nice day!

    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 15, 2011 6:27 AM