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
dc
NA
663
0
C# linq question
Oct 29 2012 2:51 PM
In the code listed below for a C# 2010 application, the intGoodTransCount value ends up being 0 too many times. Thus can you tell me if there is anything wrong with the linq statement below? If not, then I have a problem with the actual selection criteria I am using.
int intGoodTransCount = 0;
var varGoodTransCount = (from t in rData.Transactions
join iw in rData.Workbooks on t.Workbook_ID equals iw.Workbook_ID
join ip in rData.Packages on iw.PID equals ip.PID
where (ip.TNum != null)
&& ip.TNum.Length >= 3
&& ip.TNum.Substring(0, 3) == "X54"
&& (t.Complete_Date != null)
group ip by ip.TNum into g
select new { TNum = g.Key, Frequency = g.Count() }).FirstOrDefault();
if ((varGoodTransCount != null) && (varGoodTransCount.Frequency != null) && (varGoodTransCount.Frequency > 0))
{
intGoodTransCount = Convert.ToInt32(varGoodTransCount.Frequency);
}
else
{
intGoodTransCount = 0;
}
Reply
Answers (
1
)
in crsytal reprot i arrive the total i want that total to be in words
MSWord in C#