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
Jim Tat
NA
52
47.4k
How to generate invoice by fetching from database c#
Feb 5 2018 3:26 PM
Helllo experts, I am doing an app which will generate invoices by fetching from database SQL.
Here see What I did :
DataTable dt =
new
DataTable();
dt.Columns.AddRange(
new
DataColumn[5] {
new
DataColumn(
"ProductId"
,
typeof
(
string
)),
new
DataColumn(
"Product"
,
typeof
(
string
)),
new
DataColumn(
"Price"
,
typeof
(
int
)),
new
DataColumn(
"Quantity"
,
typeof
(
int
)),
new
DataColumn(
"Total"
,
typeof
(
int
))});
dt.Rows.Add(101,
"Sun Glasses"
, 200, 5, 1000);
dt.Rows.Add(102,
"Jeans"
, 400, 2, 800);
dt.Rows.Add(103,
"Trousers"
, 300, 3, 900);
dt.Rows.Add(104,
"Shirts"
, 550, 2, 1100);
So here As you can see we have Product, Price of the product , the quantity and the total (Price * Quantity)
So my aim is for example
Invoice 1 I want inside it the total price of 1 500
so here my need is that how can we fetch from database so that it will automatically fill the right amount that i need.
INVOICE 1 : TOTAL 1 500 USD
Product1 : Shirts - 550 -2 - 1100
Product2: Jeans - 400 - 1- 400
Total = 1500 (1100+400)
And it automatically removes the quantity of products taken in the database.
Is it possible ?
Thank you.
Reply
Answers (
1
)
Microsoft Bot Framework
Conditions to DateTime values