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
Jyoti Jodha
NA
1.7k
406.9k
how to fill combobox in c# windows application from database
Mar 25 2017 8:22 AM
cmd = new SqlCommand("insert into Additem(Product_Name,Description,Qty,Unit_Price,Tax) values(@Product_Name,@Description,@Qty,@Unit_Price,@Tax)", con);
con.Open();
cmd.Parameters.AddWithValue("@Product_Name", producttxt.Text);
cmd.Parameters.AddWithValue("@Description", destxt.Text);
cmd.Parameters.AddWithValue("@Qty", qtytxt.Text);
cmd.Parameters.AddWithValue("@Unit_Price", unitxt.Text);
cmd.Parameters.AddWithValue("@Tax", comboBoxtax);
//cmd.Parameters.AddWithValue("@Tax",comboBoxtax.GetItemText(comboBoxtax.SelectedItem));
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Record Inserted Successfully");
DisplayData();
ClearData();
Reply
Answers (
9
)
how to Create gridview windows application in c# asp.net
Save Child Form textbox Values using MdiParent form button