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
Praveen Maurya
NA
146
26.8k
transfer value from textbox and a table1 to another table2
Apr 7 2018 8:38 AM
I am trying to enter some data into a table2 from textboxes and some data from A sql databse table1 but all logics gone fail. please help here is the code for your reference.
string
qry =
"insert into sale (inno,date,type,custname,item,qty,price,dis,disa,gst,gsta,total) values ("
+ invoice +
",'"
+ dt +
"','"
+ paytype +
"','"
+ custname +
"','"
+ item +
"',"
+ iqty +
","
+ iprice +
","
+ idisc +
","
+ idsa +
","
+ igst +
","
+ igsta +
","
+ itot +
") and insert into sale (hsn,sgst,cgst) select hsn,sgst,cgst from stock"
;
// string qry1 = "";
// SqlCommand sc1 = new SqlCommand(qry1, con);
SqlCommand sc =
new
SqlCommand(qry, con);
// int j = sc1.ExecuteNonQuery();
int
i = sc.ExecuteNonQuery();
if
(i >= 1)
MessageBox.Show(
"Inserted Succesfully"
);
else
MessageBox.Show(
"Not Done"
);
Reply
Answers (
1
)
[C#] How to get HH:mm from two datetimes?
please suggest data type for decimal value