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
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Calculate VAT and Service Tax in C#
Pintoo Yadav
Jan 19
2015
Code
15
k
0
2
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
public
void
vat()
{
decimal
pri = Convert.ToDecimal(txt_AMT.Text);
decimal
Vat = Convert.ToDecimal(txt_Vat.Text);
decimal
stax = Convert.ToDecimal(txt_stax.Text);
decimal
servicetaxpay = pri * (stax / 100);
//only stax
decimal
totalp = pri + servicetaxpay;
//
decimal
vatpay = pri * (Vat / 100);
decimal
totalPI = pri + vatpay;
decimal
totalPIs = pri + servicetaxpay;
lblvatAmt.Text =
" % "
+
" ="
+ vatpay;
// ("Vat@" + vatpay);
lblstaxamount.Text =
" % "
+
" ="
+ servicetaxpay;
// ("S.Tax@" + servicetaxpay);
decimal
result1 = vatpay;
decimal
result2 = servicetaxpay;
lblsvtax.Text = (result1 + result2).ToString();
txttotalamt.Text = pri+result1+result2 +
"Rs."
;
////+"stax="+stax+"%"//add
////+ "StaxPay=" + servicetaxpay//add
//+ "Stax=" + servicetaxpay
//+ " vatpay =" + vatpay
//+ "Total(Include Vat Amount) =" + totalPI);
}
C#