Click here to Skip to main content
14,878,090 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Unable to update data table values Pin
OriginalGriff10-Apr-21 2:13
mveOriginalGriff10-Apr-21 2:13 
GeneralRe: C# Unable to update data table values Pin
Mou_kol10-Apr-21 3:04
MemberMou_kol10-Apr-21 3:04 
GeneralRe: C# Unable to update data table values Pin
Dave Kreskowiak10-Apr-21 4:23
mveDave Kreskowiak10-Apr-21 4:23 
GeneralRe: C# Unable to update data table values Pin
OriginalGriff10-Apr-21 7:57
mveOriginalGriff10-Apr-21 7:57 
GeneralRe: C# Unable to update data table values Pin
OriginalGriff10-Apr-21 8:00
mveOriginalGriff10-Apr-21 8:00 
GeneralRe: C# Unable to update data table values Pin
Richard MacCutchan10-Apr-21 21:07
mveRichard MacCutchan10-Apr-21 21:07 
GeneralRe: C# Unable to update data table values Pin
jschell17-Apr-21 7:09
Memberjschell17-Apr-21 7:09 
AnswerRe: C# Unable to update data table values Pin
Mou_kol10-Apr-21 3:00
MemberMou_kol10-Apr-21 3:00 
Yes issue fixed. sharing working code.
C#
string QCViewPath_savepath = @"C:\Test.xml";
    DataSet ds = new DataSet();
    ds.ReadXml(QCViewPath_savepath);

    if (ds.Tables[0].AsEnumerable().Any(a => a.Field<string>("Section ") == "ML"
             && a.Field<string>("GroupKey").Split('~')[0].Trim() == "Consensus Model"
             && a.Field<string>("GroupKey").Split('~')[1].Trim() == "Net Revenue"
             && a.Field<string>("GroupKey").Split('~')[3].Trim() == "NBM"
             && a.Field<string>("GroupKey").Split('~')[5].Trim() == "1"
             && a.Field<string>("GroupKey").Split('~')[6].Trim() == "ML"
                    ))
    {

        ds.Tables[0].AsEnumerable().Where(a => a.Field<string>("Section ") == "ML"
             && a.Field<string>("GroupKey").Split('~')[0].Trim() == "Consensus Model"
             && a.Field<string>("GroupKey").Split('~')[1].Trim() == "Net Revenue"
             && a.Field<string>("GroupKey").Split('~')[3].Trim() == "NBM"
             && a.Field<string>("GroupKey").Split('~')[5].Trim() == "1"
             && a.Field<string>("GroupKey").Split('~')[6].Trim() == "ML"
             ).ToList<DataRow>()
             .ForEach(r =>
             {
                 r["2010 FYA"] = 1200;
             });

        //foreach (var row in rowsToUpdat)
        //{
        //    row.SetField("2010 FYA", "1200");
        //}
    }

SuggestionRe: C# Unable to update data table values Pin
Richard Deeming11-Apr-21 21:23
mveRichard Deeming11-Apr-21 21:23 
GeneralRe: C# Unable to update data table values Pin
Mou_kol12-Apr-21 7:06
MemberMou_kol12-Apr-21 7:06 
QuestionHour and minute slider Pin
Valakik8-Apr-21 9:49
MemberValakik8-Apr-21 9:49 
AnswerRe: Hour and minute slider Pin
OriginalGriff8-Apr-21 22:20
mveOriginalGriff8-Apr-21 22:20 
AnswerRe: Hour and minute slider Pin
BillWoodruff9-Apr-21 4:19
mveBillWoodruff9-Apr-21 4:19 
QuestionC# Linq Get Count of Joined Records Pin
Kevin Marois8-Apr-21 9:34
professionalKevin Marois8-Apr-21 9:34 
AnswerRe: C# Linq Get Count of Joined Records Pin
OriginalGriff8-Apr-21 9:40
mveOriginalGriff8-Apr-21 9:40 
GeneralRe: C# Linq Get Count of Joined Records Pin
Kevin Marois8-Apr-21 9:50
professionalKevin Marois8-Apr-21 9:50 
GeneralRe: C# Linq Get Count of Joined Records Pin
OriginalGriff8-Apr-21 10:05
mveOriginalGriff8-Apr-21 10:05 
QuestionClient Server Pin
Member 141922168-Apr-21 8:18
MemberMember 141922168-Apr-21 8:18 
AnswerRe: Client Server Pin
OriginalGriff8-Apr-21 8:45
mveOriginalGriff8-Apr-21 8:45 
AnswerRe: Client Server Pin
SeanChupas8-Apr-21 9:26
MemberSeanChupas8-Apr-21 9:26 
GeneralRe: Client Server Pin
Member 141922168-Apr-21 10:53
MemberMember 141922168-Apr-21 10:53 
GeneralRe: Client Server Pin
Dave Kreskowiak8-Apr-21 12:12
mveDave Kreskowiak8-Apr-21 12:12 
AnswerRe: Client Server Pin
Dave Kreskowiak8-Apr-21 10:34
mveDave Kreskowiak8-Apr-21 10:34 
AnswerRe: Client Server Pin
Mycroft Holmes8-Apr-21 12:24
professionalMycroft Holmes8-Apr-21 12:24 
GeneralRe: Client Server Pin
jschell9-Apr-21 14:44
Memberjschell9-Apr-21 14:44 

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.