You may find lots of topics and questions posted by [Me] onto the internet for this particular question.
How to use LINQ to get roll-up data?
So, here is the scenario.
I have one SharePoint List as below (you can make DataSet, DataTable, Excel anything you want)
ColumnA ColumnB Status
Project1 Task1.1 Completed
Project1 Task1.2 Pending
Project1 Task1.3 Completed
Project2 Task2.1 Completed
Project3 Task3.1 Completed
Project3 Task3.2 Completed
Project3 Task3.3 Completed
Project3 Task3.4 Pending
Project3 Task3.5 Pending
What I need from the above data is:
Project1 66.67 ((Completed Task / Total Task) * 100)
So basically, all I am looking for is rolling up the data and finding the total percentage of project completion.
Let’s see, so here’s the code: (Thanks to Paul Choquette)
var returndata = (from geo in dt.AsEnumerable()
orderby geo[“ColumnA”] descending
group geo by geo[“ColumnA”] into itemgroup
Project = itemgroup.Key,
Percentage = (double)itemgroup.Count(i => (string)i[“Status”] == “Complete”) / (double)itemgroup.Count() * 100,
Let me know in case you want anything more from this code ;)
Download content for ASP.NET, Office, SQL Server, Windows Azure, SharePoint Server and other Microsoft technologies in e-book formats. Reference, guide, and step-by-step information are all available. All the e-books are free. New books will be posted as they become available at here
Back in June, Pluralsight announced a special training benefit for MSDN designed to provide MSDN subscribers with access to 20 of their most popular courses.
Previously only available in the US, today they’re expanding this benefit to MSDN subscribers worldwide through December 11, 2012. Now you can access this benefit across the globe, regardless of location! See the notes below on who is eligible.
Based on our feedback, they’ve also worked with Microsoft to enhance this custom 12 month training subscription with several new Visual Studio 2012 courses.
The Pluralsight Starter Subscription for MSDN now contains 25 popular courses. The five new courses they added include:
- Introduction to Visual Studio 2012 – Part 1
- ALM with TFS 2012 Fundamentals
- ALM for Developers with Visual Studio 2012
- Microsoft Fakes Fundamentals
They’ve simply added these new titles to the original set of courses made available in June. If you’ve already taken advantage of this offer, you don’t have to do anything to get these – you’ll see the new courses show up in your account next time you login to Pluralsight.
To take advantage of this limited-time training benefit, redeem your Pluralsight Starter Subscription for MSDN by December 11, 2012:
Feel free to download this PDF describing the benefit and email it to your friends and coworkers so they can take advantage of this offer too.
The Pluralsight Team hope we enjoy this MSDN training benefit!
Who is not eligible for this offer?
Large collection of Free Microsoft eBooks for you, including: SharePoint, Visual Studio, Windows Phone, Windows 8, Office 365, Office 2010, SQL Server 2012, Azure, and more by Eric Ligman
Throughout the year Eric has tried to share resources and information with us that he think will be helpful for us. Often times these resources will include links to free eBooks that they make available on a variety of topics. Today, Eric thought he would post a large collection of eBooks for us on his blog so that we can find them in one place and consume them as we see fit. Also, if you find this list helpful, please share it with your peers and colleagues so that they too can benefit from these resources.
Source : http://blogs.msdn.com/b/mssmallbiz/archive/2012/07/27/large-collection-of-free-microsoft-ebooks-for-you-including-sharepoint-visual-studio-windows-phone-windows-8-office-365-office-2010-sql-server-2012-azure-and-more.aspx
Get the Microsoft Partner Info Mobile App and get access to the latest from all of those plus: product teams, MPN teams, Microsoft News and hundreds more resources here at Microsoft right on your phone:
About Debugger Canvas
Debugger Canvas is a new user experience for the debugger in Visual Studio Ultimate. It pulls together the code you’re exploring onto a single pan-and-zoom display. As you hit breakpoints or step into code, Debugger Canvas shows just the methods that you’re debugging, with call lines and local variables, to help you see the bigger picture.
Get Debugger Canvas
Try out Debugger Canvas, a new user experience for the debugger in Visual Studio Ultimate.
Install Debugger Canvas
|Download and Install Debugger Canvas.|
|Read the Guide to get started with Debugger Canvas.|
- Visual Studio 2010 Ultimate SP1 (works with C# and Visual Basic)
Be one of the first to get a sneak peek at the new IDE features planned for the next version of Visual Studio! At this session, see how we’ve improved the Visual Studio developer experience — streamlining the common tasks, simplifying the environment and allowing you to focus on the code that matters.
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It’s an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, XBox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you’d like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, iPhone, or iPod device, choose the MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.