Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
QuestionSorting objects in a dictionary into corresponding Pairs... Pin
roman_s17-Jan-11 9:47
roman_s17-Jan-11 9:47 
So here is my dilemma, rather then describe it I will show you it.

Let say we take back a certain amount of records records from the DB Called Inventory Count and they have a corresponding number attached to them indicating if they are an opening Count (1) or a closing count (2)

Date-Product-Quantity-Opening/Closing
1. 1/1/2010, Ice Cream Cones, 10, 1
2. 1/1/2010, Bananas, 8, 1
3. 1/1/2010, Chocolate Bars, 9, 1

4. 2/1/2010, Ice Cream Cones, 5, 2
5. 2/1/2010, Bananas, 4, 2
6. 2/1/2010, Chocolate Bars, 3, 2

7. 4/1/2010, Ice Cream Cones, 12, 1
8. 4/1/2010, Bananas, 8, 1
9. 4/1/2010, Chocolate Bars, 9, 1

10. 5/1/2010, Ice Cream Cones, 1, 2
11. 5/1/2010, Bananas, 2, 2
12. 5/1/2010, Chocolate Bars, 3, 2

I need to build a dictionary that will take the first group (Openings = 1) and do the subtraction of quantity for closing(Closing 2), This will make up Session 1, Session 2 will be the next corresponding groups of Opening = 1 - Closing = 2

Thanks for the help in advance, hopefully this is understandable
AnswerRe: Sorting objects in a dictionary into corresponding Pairs... Pin
roman_s17-Jan-11 10:56
roman_s17-Jan-11 10:56 
AnswerRe: Sorting objects in a dictionary into corresponding Pairs... Pin
Henry Minute17-Jan-11 11:25
Henry Minute17-Jan-11 11:25 
Questionusb device (not the storage volume type) Pin
Blubbo17-Jan-11 9:06
Blubbo17-Jan-11 9:06 
AnswerRe: usb device (not the storage volume type) Pin
Michael900017-Jan-11 9:19
Michael900017-Jan-11 9:19 
GeneralRe: usb device (not the storage volume type) Pin
Blubbo19-Jan-11 9:54
Blubbo19-Jan-11 9:54 
QuestionWierd exceptions when calling WCF more than once from a static class Pin
Michael900017-Jan-11 8:32
Michael900017-Jan-11 8:32 
AnswerRe: Wierd exceptions when calling WCF more than once from a static class Pin
Ravi Bhavnani17-Jan-11 11:17
professionalRavi Bhavnani17-Jan-11 11:17 
QuestionRe: Wierd exceptions when calling WCF more than once from a static class Pin
Michael900017-Jan-11 11:49
Michael900017-Jan-11 11:49 
AnswerRe: Wierd exceptions when calling WCF more than once from a static class Pin
Ravi Bhavnani17-Jan-11 11:53
professionalRavi Bhavnani17-Jan-11 11:53 
GeneralRe: Wierd exceptions when calling WCF more than once from a static class Pin
Michael900017-Jan-11 12:13
Michael900017-Jan-11 12:13 
GeneralRe: Wierd exceptions when calling WCF more than once from a static class Pin
Ravi Bhavnani17-Jan-11 12:22
professionalRavi Bhavnani17-Jan-11 12:22 
GeneralRe: Wierd exceptions when calling WCF more than once from a static class Pin
Michael900017-Jan-11 12:48
Michael900017-Jan-11 12:48 
GeneralRe: Wierd exceptions when calling WCF more than once from a static class Pin
Michael900018-Jan-11 5:02
Michael900018-Jan-11 5:02 
GeneralRe: Wierd exceptions when calling WCF more than once from a static class Pin
Ravi Bhavnani18-Jan-11 5:57
professionalRavi Bhavnani18-Jan-11 5:57 
AnswerRe: Wierd exceptions when calling WCF more than once from a static class Pin
Ravi Bhavnani17-Jan-11 11:56
professionalRavi Bhavnani17-Jan-11 11:56 
GeneralRe: Wierd exceptions when calling WCF more than once from a static class [modified] Pin
Michael900017-Jan-11 12:27
Michael900017-Jan-11 12:27 
QuestionAnyone work with Microsoft Dynamics Great Plains? Pin
DeepToot17-Jan-11 5:53
DeepToot17-Jan-11 5:53 
QuestionUsing a Class in a C# console application [modified] Pin
B Don Davis17-Jan-11 4:46
B Don Davis17-Jan-11 4:46 
AnswerRe: Using a Class in a C# console application PinPopular
Pete O'Hanlon17-Jan-11 5:16
mvePete O'Hanlon17-Jan-11 5:16 
GeneralRe: Using a Class in a C# console application Pin
Michael900017-Jan-11 8:40
Michael900017-Jan-11 8:40 
GeneralRe: Using a Class in a C# console application Pin
Pete O'Hanlon17-Jan-11 9:09
mvePete O'Hanlon17-Jan-11 9:09 
GeneralRe: Using a Class in a C# console application Pin
Michael900017-Jan-11 11:59
Michael900017-Jan-11 11:59 
AnswerRe: Using a Class in a C# console application Pin
#realJSOP18-Jan-11 4:45
mve#realJSOP18-Jan-11 4:45 
GeneralRe: Using a Class in a C# console application Pin
B Don Davis18-Jan-11 14:08
B Don Davis18-Jan-11 14:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.