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
Arshi Khan
NA
15
14.3k
How to use Delete fuction from business logic layer
Dec 31 2014 2:04 AM
Currently I'm working on a Windows Project. I have a data access layer and business logic layer. I made a function of Delete in it. But I don't know how to use it on form. I give an example to understand you.
My Insert Coding on form is following-
MasterClothDesign obj = new MasterClothDesign(); // MasterClothDesign is the class of Business Logic Layer
obj.Cloth_Design_Name = txtDesignName.Text;
obj.Save();
In Business Logic Layer I made the following function of delete.
public void DeleteBy(IDbTransaction txn)
{
new MasterClothDesignData(txn).MasterClothDesignData_DeleteByClothDesignId(Cloth_Design_Id);
}
Delete Coding on form is following
private void btnDelete_Click(object sender, EventArgs e)
{
MasterClothDesign obj = new MasterClothDesign();
obj.Cloth_Design_Id = Convert.ToInt32(lblDesignId.Text);
obj.DeleteBy();
}
It gives the error on DeleteBy. So how this function should be write on form? Thanks in advance.
Reply
Answers (
2
)
Issues while opening a UTF16 encoded .csv file in excel usin
how to create html report in window form application in C#