G
Guest
I am wanting to write a program which is going to all the user to select a
table and then copy the table values from one environment to another. There
are of course hunderds of tables, and I have created a class for each of
these tables, and DAL class which contains all the methods to read or update
any value for the given table.
Can I take a "Text" name and use it to somehow create and instance of a
class with that same name?
So say a had a Table name of "Account". For this table I have two classes,
one called "Account.cs" and another called "Account_DAL.cs". First I want to
create an instance of the "Account.cs". To do this specifically, my code
would look like the following:
Account myAccount = new Account(fields);
Account_Dal.cs is a class which ONLY contains STATIC methods. The code to
use a STATIC method to insert values into a Table might look like the
following:
bool ok = Account_Dal.InsertRow(myAccount);
Is there a way to create an instance of "Account.cs" with the text of
"Account"?
Is there a way to call a STATIC method of "Account_Dal.cs" with the text of
"Account_Dal" and pass the method called "InserRow" an instance of the
"Account.cs" created above?
Thanks in advance for your assistance!!!!
table and then copy the table values from one environment to another. There
are of course hunderds of tables, and I have created a class for each of
these tables, and DAL class which contains all the methods to read or update
any value for the given table.
Can I take a "Text" name and use it to somehow create and instance of a
class with that same name?
So say a had a Table name of "Account". For this table I have two classes,
one called "Account.cs" and another called "Account_DAL.cs". First I want to
create an instance of the "Account.cs". To do this specifically, my code
would look like the following:
Account myAccount = new Account(fields);
Account_Dal.cs is a class which ONLY contains STATIC methods. The code to
use a STATIC method to insert values into a Table might look like the
following:
bool ok = Account_Dal.InsertRow(myAccount);
Is there a way to create an instance of "Account.cs" with the text of
"Account"?
Is there a way to call a STATIC method of "Account_Dal.cs" with the text of
"Account_Dal" and pass the method called "InserRow" an instance of the
"Account.cs" created above?
Thanks in advance for your assistance!!!!