TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gurkan
NA
11
0
N-Tier Building
Jan 2 2009 11:10 AM
Hi,
I try to separate the project like business-tier, presentation-tier etc. but I have some problems.
I have a form in presentation tier(telephone book), it has three button: insert, update, delete.
In the business tier, I want to do the operations(insert, update, delete).
I create a class library(Business-tier), and add a class(Operations). So, insert update and delete are the methods in this class.
First question, is the main-building right ?
Second question, this is my Insert code:
public static void Insert()
{
XmlTextWriter xmlDocument = new XmlTextWriter(@"c:\deneme.xml", System.Text.UTF8Encoding.UTF8);
try
{
xmlDocument.WriteStartDocument();
xmlDocument.WriteStartElement("kisiler");
xmlDocument.WriteStartElement("kisi");
xmlDocument.WriteElementString("ad",textBox1.Text);//error
xmlDocument.WriteElementString("soyad", textBox2.Text);//error
xmlDocument.WriteElementString("telefon", textBox3.Text);//error
xmlDocument.WriteElementString("yas", textBox4.Text);//error
xmlDocument.WriteEndElement();
xmlDocument.WriteEndElement();
xmlDocument.WriteEndDocument();
xmlDocument.Close();
}
catch (Exception ex)
{
throw new Exception("No Insert");
}
}
textBox1,2,3,4 are in my form(in the presentation-tier). How can I use them in here..? Or, what are the other ways ?
Reply
Answers (
1
)
Best Practices for Code Organization
Need some advice on how to implement this class structure.