Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
App. WinForms / WPF .NET
Creare una classe per gestire un tableadapert
mercoledì 20 maggio 2009 - 15.37
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
pasqualimassimo
Profilo
| Junior Member
50
messaggi | Data Invio:
mer 20 mag 2009 - 15:37
ciao
mi sono messo in testa di creare un classe per gestire un tableadapter (inserimento, modifica, cancellazione), passandogli :
1) dataset
2) campi tabella
3) tableadapter della tabella su cui stai lavorando
4) operazione da effettuare (inserimento, modifica, cancellazione)
5) vaolori dei capi
ho la seguente domanda :
vedendo il listato come mai ho solo il "Fill" e non il "GetData" in questo punto this->tabellaAdapter->... ?
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Data;
namespace datiDB {
public ref class Class1
{
public:
//DEFINISCO DELLE VARIABILI PUBBLICHE
System::Data::DataSet^ dataSetCassa;
System::Data::DataTable^ tableCassa;
System::Data::DataTableReader^ readerTabella;
System::Data::Common::DbDataAdapter^ tabellaAdapter;
Class1(System::Data::DataSet^ dataSetCassa,System::Data::DataTable^ tableCassa,System::Data::DataTableReader^ readerTabella,System::Data::Common::DbDataAdapter^ tabellaAdapter)
{
//
//TODO: Add the constructor code here
//
this->dataSetCassa = dataSetCassa;
this->tableCassa = tableCassa;
this->readerTabella = readerTabella;
this->tabellaAdapter = tabellaAdapter;
tableCassa = this->tabellaAdapter->sFill(this->dataSetCassa);
readerTabella->Read();
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Class1()
{
}
// TODO: Add your methods for this class here.
//AGGIUNGO UN METODO PER INSERIRE
//AGGIUNGO UN METODO PER MODIFICARE
//AGGIUNGO UN METODO PER CANCELLARE
};
}
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !