ObjectDataSourceView.Insert(IDictionary) Método
Definição
Executa uma operação de inserção chamando o método de objeto de negócios identificado pela propriedade InsertMethod usando a coleção values especificada.Performs an insert operation by calling the business object method that is identified by the InsertMethod property using the specified values collection.
public:
int Insert(System::Collections::IDictionary ^ values);
public int Insert (System.Collections.IDictionary values);
override this.Insert : System.Collections.IDictionary -> int
Public Function Insert (values As IDictionary) As Integer
Parâmetros
- values
- IDictionary
Uma coleção IDictionary de parâmetros usados com a propriedade InsertMethod para executar a operação de inserção.A IDictionary collection of parameters used with the InsertMethod property to perform the insert operation. Se não houver nenhum parâmetro associado ao método, passe null.If there are no parameters associated with the method, pass null.
Retornos
O número de linhas inseridas; caso contrário, -1, se o número não for conhecido.The number of rows inserted; otherwise, -1, if the number is not known.
Exceções
Comentários
O valor de retorno padrão é-1, o que significa que um número desconhecido de linhas foi inserido.The default return value is -1, which means that an unknown number of rows were inserted. Para retornar um valor diferente, defina a AffectedRows Propriedade do ObjectDataSourceStatusEventArgs objeto do Inserted evento.To return a different value, set the AffectedRows property of the ObjectDataSourceStatusEventArgs object of the Inserted event. O número de linhas afetadas normalmente é retornado pelo Insert método para o objeto comercial e esse valor está disponível na ReturnValue Propriedade do ObjectDataSourceStatusEventArgs objeto do Inserted evento.The number of affected rows is typically returned by the Insert method for the business object, and that value is available from the ReturnValue property of the ObjectDataSourceStatusEventArgs object of the Inserted event.
O Insert método chama o ExecuteInsert método, passando a values coleção.The Insert method calls the ExecuteInsert method, passing the values collection.