|
using System;
using System.Data;
namespace MultiTier.Data {
public abstract class DataTier {
private DataTable dtDataTable;
private Exception exException;
private long lngAffectedRecords;
private string strConnectionString;
private string strTableName;
private DataTier() {
}
protected DataTier(string connection) {
this.ConnectionString = connection;
this.ConstructDataAdapter();
}
protected DataTier(string connection, string tableName) {
this.ConnectionString = connection;
this.TableName = tableName;
this.ConstructDataAdapter();
}
protected DataTable Table {
get { return dtDataTable; }
set { dtDataTable = value; }
}
public string ConnectionString {
get { return strConnectionString; }
set { strConnectionString = value; }
}
public string TableName {
get { return strTableName; }
set { strTableName = value; }
}
public long AffectedRecords {
get { return lngAffectedRecords; }
set { lngAffectedRecords = value; }
}
public Exception Exception {
get { return exException; }
set { exException = value; }
}
protected abstract void ConstructDataAdapter();
public abstract DataTable ReadData();
public abstract void SaveData(DataTable dataTable);
public abstract void InitializeConnection();
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I started using C# in the spring of 2003.
For the moment I'm working for a company that makes healthcare related software and do the ASP.NET programming in C# and VB.NET.