S
stocki
Hi,
There is a class "cSQLServer" and a class "cOracle". Both have same
methods and properties. A third class (presenter) instanciates both of
them an shows the retrieved data in two separate listviews. So far, so
good.
Now I was asked to implement an additional cExcel class in order to
compare it against the Oracle data. I came to the conclusion to write
a wrapper class in which I load either "cSQLServer" or "cExcel"
depending on the users choice.
Something like:
cWrapper wrapper = new cWrapper() ;
cOracle oracle = new cOracle();
private void buttonSQLServer_Click(object sender, EventArgs e)
{
wrapper = new cSQLServer() ;
}
private void buttonExcel_Click(object sender, EventArgs e)
{
wrapper = new cExcel() ;
}
private void ShowVals()
{
this.lvwLoad .... = wrapper.GetData();
this.lvwComp .... = oracle.GetData();
}
Is this feasable and does it make sense? Can somebody point me in the
right direction how to implement something like that? Any hint is
highly appriciated!
Thank's in advance!
Andreas
There is a class "cSQLServer" and a class "cOracle". Both have same
methods and properties. A third class (presenter) instanciates both of
them an shows the retrieved data in two separate listviews. So far, so
good.
Now I was asked to implement an additional cExcel class in order to
compare it against the Oracle data. I came to the conclusion to write
a wrapper class in which I load either "cSQLServer" or "cExcel"
depending on the users choice.
Something like:
cWrapper wrapper = new cWrapper() ;
cOracle oracle = new cOracle();
private void buttonSQLServer_Click(object sender, EventArgs e)
{
wrapper = new cSQLServer() ;
}
private void buttonExcel_Click(object sender, EventArgs e)
{
wrapper = new cExcel() ;
}
private void ShowVals()
{
this.lvwLoad .... = wrapper.GetData();
this.lvwComp .... = oracle.GetData();
}
Is this feasable and does it make sense? Can somebody point me in the
right direction how to implement something like that? Any hint is
highly appriciated!
Thank's in advance!
Andreas