c# - save row in one table to another table using linq -


Did you know that when you drag and drop a user from the data source window? Visual Studio automatically creates a DataContext (in view of the XAML) page to.This DataContext is set to a CollectionViewSource on to force the new elements and the CollectionViewSource it draws went informed of a dataset. The same datasets take you to the table by dragging and dropping.

In my scenario this is what it has been created:

   & Lt; TextBox x: Name = "Paswardtekstboks" Text = "{Binding password mode = Dowa, NotifyOnValidationError = true, ValidatesOnExceptions = true, UpdateSourceTrigger = PropertyChanged}" / & gt; & Lt; / Grid & gt;  

This is considered as a very simple signup page, using an administrator simply scrolling, clicking on the approval button, or clicking on the Reject button to accept and reject the registration. Could.

This is the thing that I am using the MVVM pattern. This means that the Properties boxes are bound to upwards, the CollectionViewSource class, which is in the place where my problem begins.

I need to save this information from the 'sign-up' table on those tables.

  1. Since the properties have been forced to text boxes, there is a visual problem in the collection, is there any way to bring their values ​​from there?
  2. I looked through the solution explorer and did not get any actual class called the signup vista. If it is not, then how is it referenced and why is it called a class?
  3. Is it a placeholder unless I do my archive collections ViewSource class? Will it be more viable?

What I've tried so far is the following method that wants to save information from the table of users in the table of the table:

  PrivateCreateCommandExecute Object Ultimate) {myAppEntities Reference = New MyAppEntities (); Myapp.signup signup = new signup (); {MyApp.user user = New Medicare 2.Sear {firstname = signup.first, surname = signup.last, username = signup.username, password = signup.password,}; // Change the database changes in context.users.Add (user); Context.SaveChanges (); MessageBox.Show ("saved"); } Hold (Exception pre) {Message Box. Show (ex.Message); }}  

The problem with the above method is that this signup creates a new event in the class which I am saving, so all the information I am receiving is empty I therefore get the verification error basically. Any help will be very much appreciated.

You can select the registration as the commandParameter < / Code> Whatever the control is implementing the SaveCurrent command, then you can enter object param / /> back to signup and from there Can remove the value.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -