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
Bilawal Niaz
NA
110
16.6k
On C# Viual Studio
Jun 27 2015 9:21 AM
I DEVELOP A SOFTWARE ON VISUAL STUDIO (C #) "EMPLOYEE INFROMATION SYSTEM",
WHEN I ENTERED A RECORD IN SOFTWARE, IT ADDED,
BUT WHEN I ADDED A RECORD HAVING EMPTY FIELDS
IT SHOWS RECORD DOES NOT ADDED BECAUSE FIELDS ARE EMPTY,
BUT IN DATA BASE RECORD WILL SAVE HAVING EMPTY FIELDS, WHY?
ANY BUDY HELP ME...!
THE CODE IS THAT:
==>
private void button1_Click(object sender, EventArgs e)
{
try
{
Department obj = new Department();
obj.DeptName = textBox1.Text;
obj.Description = textBox2.Text;
DepartmentDAL obj2 = new DepartmentDAL();
obj2.addDepartment(obj);
if (textBox1.Text != "" && textBox2.Text != "")
{
MessageBox.Show("Record Saved Successfully !", "Employee Information System");
clear();
}
else { MessageBox.Show("Error : Field's Empty \n\nEnter The Record To Save !", "Employee Information System"); }
}
catch { MessageBox.Show("Error : Field's Empty \n\nEnter The Record To Save !", "Employee Information System"); }
}
Reply
Answers (
4
)
c#
How to create new file and new folder BUTTON in FTP Program