Hi,
Three tier means levels exists in between client and server right.
you are asking three logical layer architecture right letme explain you
frst you've to create dlls for each and every logic
I gave you steps to create dll now
create project->create class->write required code in that class->build project.
thats it your wrk is done here to creation of dll
thn import that dll into your project use that class methods by creating object for that class
this is the process of creating dll .
now we go some dipper in subject three tier means we divide working tasks into several dlls.
for e.g:
we divide database functions into one dll like insert,select,update,openconnection to database all these functionalities are write under one dll we call that dll as DBFunctions
same as business logic we develop dlls for each and every business functions
now we see how they communicate between layers
presentation layer(PL)->busines logic layer(BLL)->data Access Layer(DAL)
we maintain single DAL for database.we generalize all insertion statements for all tables we just call one method to insert data into data tables .
the DBfunction class contains following methods
public bool exenonquerycmds(string query)
{
bool exestatus;
sqlcommand cmd=new sqlcommand(query,con);
int re=cmd.executenonquery();
if(re>0)
{
exestatus=true;
}
else
{
exestatus=false;
}
return exestatus;
}
public datatable gettabledata(string query)
{
Datatable dt=new Datatable();
sqldatadapter da=new SqlDataAdapter(query,con);
da.Fill(dt);
return dt;
}
Like this we write all methods regarding business functions in BLL
we call those methods in PL to implement Three tier Layer