Click here to Skip to main content
15,889,315 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a program that can add information to the databaseand i want to convert this program to Multilayer Applications what can i do?
this my code:
userEntities am = new userEntities();
     Table_1 ta = new Table_1();
     ta.ID = Convert.ToInt32(textBox6.Text);
     ta.name = textBox9.Text;
     ta.last_name = textBox8.Text;
     ta.phon_number = maskedTextBox2.Text;
     ta.adress = textBox7.Text;
     am.AddToTable_1(ta);
     am.SaveChanges();
     showdata();

help me tanks
Posted
Updated 14-Aug-12 21:58pm
v2
Comments
daghune 15-Aug-12 3:52am    
what is meaning of multilayer program????????
big sh*t it is N-Tier programming.
second is database==datagridview ??????
you say database(datagridview) it is only hell man
go and read some book about your work,programming is not TAVIZ ROGHAN ke hamash ba tajrobe be dast miad , programming faghat 50% tajrob ast va 50% motalee,az ma goftan bud,(((man ham saram be sang khorde mikhaym beram samte motaleye ketab))).age sakhtemun az paye kaj bashe ta 100 tabaghash kaj mire bala,bayad payasho ghavi koni ta mituni ta khun tu ragate,
amirmohamad 15-Aug-12 3:57am    
haji bekesh biron az ma khodom pa khordie zamoneyim!!!!
Andreas Gieriet 15-Aug-12 7:20am    
I don't know why you react so emotional.
In any case, such statements as the one above shed some light on you... I hope you feel better after your comment above ;-)
Cheers
Andi

1 solution

See http://en.wikipedia.org/wiki/Multitier_architecture[^].

As a starting point:
1. Identify what your layers are in your code.
2. Re-arrange such that one layer depends on the next layer only.

Cheers
Andi
 
Share this answer
 
Comments
amirmohamad 15-Aug-12 7:28am    
useful website
tanks andi

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900