Click here to Skip to main content
15,885,278 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# How to convert my List<T> to Pivot datatable Pin
Richard Deeming15-Sep-21 0:38
mveRichard Deeming15-Sep-21 0:38 
GeneralRe: C# How to convert my List<T> to Pivot datatable Pin
Mou_kol15-Sep-21 3:49
Mou_kol15-Sep-21 3:49 
GeneralRe: C# How to convert my List<T> to Pivot datatable Pin
Richard Deeming15-Sep-21 4:13
mveRichard Deeming15-Sep-21 4:13 
GeneralRe: C# How to convert my List<T> to Pivot datatable Pin
Mou_kol15-Sep-21 20:37
Mou_kol15-Sep-21 20:37 
GeneralRe: C# How to convert my List<T> to Pivot datatable Pin
Pete O'Hanlon15-Sep-21 6:52
mvePete O'Hanlon15-Sep-21 6:52 
GeneralRe: C# How to convert my List<T> to Pivot datatable Pin
BillWoodruff15-Sep-21 8:52
professionalBillWoodruff15-Sep-21 8:52 
GeneralRe: C# How to convert my List<T> to Pivot datatable Pin
Mou_kol15-Sep-21 20:20
Mou_kol15-Sep-21 20:20 
QuestionHow to store Pivot data into List<T> Pin
Mou_kol14-Sep-21 5:53
Mou_kol14-Sep-21 5:53 
I am calling a store procedure and SP return data pivot way like below sample

+-----------------+--------------------+-------------+-------------------+----------+----------+-----------+----------+
|     Section     |      LineItem      | Broker Code |    Broker Name    | 2012 FYA | 2013 FYA | 1Q 2014A  | 2Q 2014A |
+-----------------+--------------------+-------------+-------------------+----------+----------+-----------+----------+
| Consensus Model | Net Revenue        | ZB          | B Securities      |          |          |    204.45 |   205.00 |
| Consensus Model | Net Revenue        | TU          | Cantor Fitzgerald |   101.33 |          |    204.45 |   201.00 |
| Consensus Model | Cost of Goods Sold | ZB          | B Securities      |          |          |    204.45 |   205.00 |
| Consensus Model | Cost of Goods Sold | TU          | Cantor Fitzgerald |   101.33 |          |    204.45 |   201.00 |
+-----------------+--------------------+-------------+-------------------+----------+----------+-----------+----------+




i easily can store the data into datatable but i am interested to know how could i store data into List<t> which return store procedure.

i do not want to use Datatable in the middle to hold SP return data.

this is my class where i like to store the above pivot data
C#
public class Data
        {
            public string Section { get; set; }
            public string Lineitem { get; set; }
            public string BrokerCode { get; set; }
            public string BrokerName { get; set; }
            public string Period { get; set; }
            public string PeriodValue { get; set; }
        }


Thanks
AnswerRe: How to store Pivot data into List<T> Pin
Richard Deeming14-Sep-21 6:04
mveRichard Deeming14-Sep-21 6:04 
GeneralRe: How to store Pivot data into List<T> Pin
Mou_kol14-Sep-21 6:29
Mou_kol14-Sep-21 6:29 
GeneralRe: How to store Pivot data into List<T> Pin
Richard Deeming14-Sep-21 6:49
mveRichard Deeming14-Sep-21 6:49 
GeneralRe: How to store Pivot data into List<T> Pin
Mou_kol14-Sep-21 23:14
Mou_kol14-Sep-21 23:14 
GeneralRe: How to store Pivot data into List<T> Pin
Richard Deeming14-Sep-21 23:17
mveRichard Deeming14-Sep-21 23:17 
QuestionActive step-two verfication telegram with c# Pin
Nader Rostamkhani8-Sep-21 6:22
Nader Rostamkhani8-Sep-21 6:22 
Rant[REPOST] Active step-two verfication telegram with c# Pin
Richard Deeming8-Sep-21 6:33
mveRichard Deeming8-Sep-21 6:33 
QuestionWhat is default unit of EPPlus (point, inches, pixel) Pin
Mou_kol8-Sep-21 4:39
Mou_kol8-Sep-21 4:39 
AnswerRe: What is default unit of EPPlus (point, inches, pixel) Pin
Member 153296138-Sep-21 5:22
Member 153296138-Sep-21 5:22 
GeneralRe: What is default unit of EPPlus (point, inches, pixel) Pin
Mou_kol8-Sep-21 21:22
Mou_kol8-Sep-21 21:22 
GeneralRe: What is default unit of EPPlus (point, inches, pixel) Pin
Pete O'Hanlon21-Sep-21 0:26
mvePete O'Hanlon21-Sep-21 0:26 
QuestionOther program access and data extraction Pin
cocaya7-Sep-21 16:48
cocaya7-Sep-21 16:48 
Rant[REPOST] Other program access and data extraction Pin
Richard Deeming7-Sep-21 21:24
mveRichard Deeming7-Sep-21 21:24 
GeneralVerification of Information at First Launch Pin
Member 141922165-Sep-21 4:50
Member 141922165-Sep-21 4:50 
GeneralRe: Verification of Information at First Launch Pin
jschell5-Sep-21 8:49
jschell5-Sep-21 8:49 
GeneralRe: Verification of Information at First Launch Pin
OriginalGriff5-Sep-21 10:26
mveOriginalGriff5-Sep-21 10:26 
GeneralRe: Verification of Information at First Launch Pin
Pete O'Hanlon5-Sep-21 10:37
mvePete O'Hanlon5-Sep-21 10:37 

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.