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
CHAITANYA KIRAN KASANI
NA
335
132.6k
How To Show Error Message In Linq C#
Dec 3 2015 7:53 AM
Below Is Code for my requirement
I wanna display error message if received amount is greater than total amount using LinQ query
var invoiceInfo = from invoice in InvoiceData
if(invoice.ReceivedAmount>invoice.TotalAmount)
MessageBox.Show("You Have Entered More Amount Than Invoice Amount")
else
select new InvoiceMaster
{
InvoiceId = invoice.InvoiceId,
InvoiceNumber = invoice.InvoiceNumber,
InvoiceDate = invoice.InvoiceDate,
TotalAmount = invoice.TotalAmount,
ReceivedAmount = invoice.ReceivedAmount
}
Reply
Answers (
3
)
about linq to sql
Error "Value cannot be null"