Click here to Skip to main content
15,898,035 members
Home / Discussions / C#
   

C#

 
QuestionPopulate Checkboxlist from Database, and Populate second checkboxlist from selected values in first checkboxlist, all with databases Pin
Member 1004319229-Aug-14 18:21
Member 1004319229-Aug-14 18:21 
AnswerRe: Populate Checkboxlist from Database, and Populate second checkboxlist from selected values in first checkboxlist, all with databases Pin
Richard MacCutchan29-Aug-14 23:00
mveRichard MacCutchan29-Aug-14 23:00 
AnswerRe: Populate Checkboxlist from Database, and Populate second checkboxlist from selected values in first checkboxlist, all with databases Pin
Kornfeld Eliyahu Peter30-Aug-14 9:06
professionalKornfeld Eliyahu Peter30-Aug-14 9:06 
AnswerRe: Populate Checkboxlist from Database, and Populate second checkboxlist from selected values in first checkboxlist, all with databases Pin
V.31-Aug-14 8:10
professionalV.31-Aug-14 8:10 
GeneralRe: Populate Checkboxlist from Database, and Populate second checkboxlist from selected values in first checkboxlist, all with databases Pin
Paul Cong2-Sep-14 20:47
Paul Cong2-Sep-14 20:47 
GeneralRe: Populate Checkboxlist from Database, and Populate second checkboxlist from selected values in first checkboxlist, all with databases Pin
V.2-Sep-14 20:59
professionalV.2-Sep-14 20:59 
QuestionNeed Help!! Pin
Member 1104570529-Aug-14 5:57
Member 1104570529-Aug-14 5:57 
AnswerRe: Need Help!! Pin
OriginalGriff29-Aug-14 8:24
mveOriginalGriff29-Aug-14 8:24 
QuestionRe: Need Help!! Pin
Eddy Vluggen29-Aug-14 11:53
professionalEddy Vluggen29-Aug-14 11:53 
AnswerRe: Need Help!! Pin
Pete O'Hanlon29-Aug-14 12:09
mvePete O'Hanlon29-Aug-14 12:09 
QuestionAfter create setup Window form Application Following Error:- Pin
Nishant.Chauhan8029-Aug-14 2:17
Nishant.Chauhan8029-Aug-14 2:17 
AnswerRe: After create setup Window form Application Following Error:- Pin
Dave Kreskowiak29-Aug-14 2:32
mveDave Kreskowiak29-Aug-14 2:32 
AnswerRe: After create setup Window form Application Following Error:- Pin
Richard MacCutchan29-Aug-14 2:35
mveRichard MacCutchan29-Aug-14 2:35 
Questionhow to dropdownlist foreign keys? Pin
Member 1102146428-Aug-14 23:20
Member 1102146428-Aug-14 23:20 
AnswerRe: how to dropdownlist foreign keys? Pin
Pete O'Hanlon28-Aug-14 23:35
mvePete O'Hanlon28-Aug-14 23:35 
QuestionJSON Parsing Data Pin
Alex.bordei28-Aug-14 22:15
Alex.bordei28-Aug-14 22:15 
Hello guys,

I have a little problem, and I don't know how to make things works.

This is a JSON respone from a website:

{
"data": {
"status": 1,
"status_message": "Comanda a fost introdusa!",
"comanda": {
"id_comanda": "404",
"pret_total": 35,
"modalitate_plata": "Card online"
}
},
"error": false,
"errors": []
}

And I want to parse the values to my console application script.

I build this structure for JavaScriptSerializer:

C#
public class Comanda
            {
                public string id_comanda { get; set; }
                public int pret_total { get; set; }
                public string modalitate_plata { get; set; }
            }

            public class Data
            {
                public int status { get; set; }
                public string status_message { get; set; }
                public Comanda comanda { get; set; }
            }

            public class RootObject
            {
                public Data data { get; set; }
                public bool error { get; set; }
                public List<object> errors { get; set; }
            }



And I get the value for error response:

C#
RootObject GetProduse_vars = new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize<RootObject>(text);
                Console.WriteLine(GetProduse_vars.error);

And "text" variable contains the JSON response.

Can you guys help me to find a solution to get the values from id_comanda and pret_total strings?

Thanks a lot!
Alex Bordei

AnswerRe: JSON Parsing Data Pin
Freak3028-Aug-14 23:00
Freak3028-Aug-14 23:00 
GeneralRe: JSON Parsing Data Pin
Alex.bordei29-Aug-14 2:43
Alex.bordei29-Aug-14 2:43 
QuestionC# connection between two SQLExpress servers on one machine Pin
Member 1103943928-Aug-14 18:44
Member 1103943928-Aug-14 18:44 
AnswerRe: C# connection between two SQLExpress servers on one machine Pin
Kornfeld Eliyahu Peter28-Aug-14 20:16
professionalKornfeld Eliyahu Peter28-Aug-14 20:16 
GeneralRe: C# connection between two SQLExpress servers on one machine Pin
Member 1103943928-Aug-14 20:28
Member 1103943928-Aug-14 20:28 
GeneralRe: C# connection between two SQLExpress servers on one machine Pin
Paul Conrad29-Aug-14 18:47
professionalPaul Conrad29-Aug-14 18:47 
AnswerRe: C# connection between two SQLExpress servers on one machine Pin
PIEBALDconsult2-Sep-14 8:24
mvePIEBALDconsult2-Sep-14 8:24 
QuestionUsing Process.Start on Excel Pin
mjackson1128-Aug-14 8:35
mjackson1128-Aug-14 8:35 
AnswerRe: Using Process.Start on Excel Pin
Richard Deeming28-Aug-14 9:59
mveRichard Deeming28-Aug-14 9:59 

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.