public void Execute(object parameter)
 {
     string[] result = GetAllFields(parameter);
     viewModel.ExecuteNonQueryCommand("INSERT INTO Person (FirstName, LastName, Gender, Age) " +
                                      "VALUES ('" + viewModel.Person.ForName + "', '" + viewModel.Person.SurName +
                                      "', '" + viewModel.Person.Gender + "', '" + viewModel.Person.Age + "');");
 }
Esempio n. 2
0
 public void Execute(object parameter)
 {
     viewModel.ExecuteNonQueryCommand("UPDATE Person SET FirstName = '" + viewModel.Person.ForName + "'" +
                                      ", LastName = '" + viewModel.Person.SurName + "'" +
                                      ", Gender = '" + viewModel.Person.Gender + "'" +
                                      ", Age = '" + viewModel.Person.Age + "'" +
                                      "WHERE ID = '" + viewModel.Person.ID + "';");
 }
 public void Execute(object parameter)
 {
     viewModel.ExecuteNonQueryCommand("DELETE FROM Person WHERE ID = '" + viewModel.Person.ID + "';");
 }
Esempio n. 4
0
 public void Execute(object parameter)
 {
     viewModel.ExecuteNonQueryCommand("DELETE FROM Person;");
 }