Click here to Skip to main content
15,905,967 members
Home / Discussions / C#
   

C#

 
GeneralRe: Send command To Printe Pin
Zeyad Jalil12-Jul-14 22:09
professionalZeyad Jalil12-Jul-14 22:09 
GeneralRe: Send command To Printe Pin
Richard MacCutchan12-Jul-14 22:20
mveRichard MacCutchan12-Jul-14 22:20 
GeneralRe: Send command To Printe Pin
Dave Kreskowiak13-Jul-14 4:40
mveDave Kreskowiak13-Jul-14 4:40 
QuestionAdd other component in c# 2008 Pin
KaKoten12-Jul-14 15:30
KaKoten12-Jul-14 15:30 
AnswerRe: Add other component in c# 2008 Pin
Richard MacCutchan12-Jul-14 21:28
mveRichard MacCutchan12-Jul-14 21:28 
QuestionMutliple ResultSet from Stored Procedure using EF 5.0 Pin
meeram3912-Jul-14 12:57
professionalmeeram3912-Jul-14 12:57 
AnswerRe: Mutliple ResultSet from Stored Procedure using EF 5.0 Pin
Dave Kreskowiak13-Jul-14 4:42
mveDave Kreskowiak13-Jul-14 4:42 
GeneralRe: Mutliple ResultSet from Stored Procedure using EF 5.0 Pin
meeram3913-Jul-14 8:39
professionalmeeram3913-Jul-14 8:39 
QuestionTranslate method in Entity framework not found Pin
meeram3912-Jul-14 7:53
professionalmeeram3912-Jul-14 7:53 
AnswerRe: Translate method in Entity framework not found Pin
Pete O'Hanlon12-Jul-14 8:54
mvePete O'Hanlon12-Jul-14 8:54 
GeneralRe: Translate method in Entity framework not found Pin
meeram3912-Jul-14 9:52
professionalmeeram3912-Jul-14 9:52 
QuestionSelf Hosted WCF + REST + CORS Pin
evolcoder11-Jul-14 22:10
evolcoder11-Jul-14 22:10 
AnswerRe: Self Hosted WCF + REST + CORS Pin
OriginalGriff11-Jul-14 22:37
mveOriginalGriff11-Jul-14 22:37 
AnswerRe: Self Hosted WCF + REST + CORS Pin
Rob Philpott11-Jul-14 22:39
Rob Philpott11-Jul-14 22:39 
GeneralRe: Self Hosted WCF + REST + CORS Pin
evolcoder14-Jul-14 17:16
evolcoder14-Jul-14 17:16 
Questionexe of C# file. Pin
Mehmood Ali Biswas11-Jul-14 21:36
Mehmood Ali Biswas11-Jul-14 21:36 
AnswerRe: exe of C# file. Pin
OriginalGriff11-Jul-14 22:36
mveOriginalGriff11-Jul-14 22:36 
AnswerRe: exe of C# file. Pin
Rob Philpott11-Jul-14 22:37
Rob Philpott11-Jul-14 22:37 
QuestionImport XML file without stylesheet Pin
Richard.Berry10011-Jul-14 19:01
Richard.Berry10011-Jul-14 19:01 
Hi
I need to populate a datatable with two fields from an xml file.<partnum> and <actualqtynum>

The file was obtained from a report that opens in a web browser, and the file saved from there.

C#
DataTabel.ReadXml(XMLFilename)
fails (complains about the ':' character in Line 2 of the xml file.)

I thought about using something like below, since I do have a complete list of the <partnum> in another table, but the <actualqtynum> is not a child node of <partnum> , and this also fails (complains about the ':' character in Line 2 of the xml file.)

C#
public string GetKeyValue(string key)
       {
           System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
           xd.Load(_XMLFileName);
           System.Xml.XmlNode Node = xd.DocumentElement.SelectSingleNode("/REPORTTABLE/REPORTTABLEDETAILS/PARTNUM add[@key=\"" + key + "\"]");

           if ((Node != null))
           {
               return Node.Attributes.GetNamedItem("value").Value;
           }
           else
           {
               return null;
           }
       }


Any idea how I can get a list of PARTNUM with the corresponding ACTUALQTYNUM?

XML
<?xml version="1.0" encoding="Shift_JIS" ?>
<?xml:stylesheet type="text/xsl" href="../Bin/KITSCHREPFLEXA.xsl" ?>
<DOCUMENT>
<REPORTHEADER>
<REPORTTIME>2014/07/11 13:36:44</REPORTTIME>
<CREATEBY>Fujiuser</CREATEBY>
<SCHEDULENAME>Week_23_2014</SCHEDULENAME>
</REPORTHEADER>
<REPORTTABLE>
<REPORTTABLEDETAILS>
<JOBNAMES><JOBNAME>260-C536000-PACE - Top_TLine 1 / Line 1 / Top / 1</JOBNAME></JOBNAMES>
<JOBNAMES><JOBNAME>260-C536000-PACE - Top_BLine 2 / VEK Line 2 / Bottom / 1</JOBNAME></JOBNAMES>
<DATANUM>38</DATANUM>
<PARTBARCODE>938-1030507</PARTBARCODE><ORIGINALPARTBARCODE>938-1030507</ORIGINALPARTBARCODE><PARTNUM>938-1030507</PARTNUM>
<SUPPLYNUM>2</SUPPLYNUM>
<ACTUALNUM>2</ACTUALNUM>
<REMAINSNUM>0</REMAINSNUM>
<QTYSUPPLYNUM>4</QTYSUPPLYNUM>
<QTYACTUALNUM>6249</QTYACTUALNUM>
<QTYREMAINSNUM>6245</QTYREMAINSNUM>
</REPORTTABLEDETAILS>
<REPORTTABLEDETAILS>
<DATANUM></DATANUM>
<PARTBARCODE>948-1025627</PARTBARCODE><ORIGINALPARTBARCODE>948-1025627</ORIGINALPARTBARCODE><PARTNUM>948-1025627</PARTNUM>
<SUPPLYNUM>2</SUPPLYNUM>
<ACTUALNUM>1</ACTUALNUM>
<REMAINSNUM>-1</REMAINSNUM>
<QTYSUPPLYNUM>40</QTYSUPPLYNUM>
<QTYACTUALNUM>6720</QTYACTUALNUM>
<QTYREMAINSNUM>6680</QTYREMAINSNUM>
</REPORTTABLEDETAILS>

SuggestionRe: Import XML file without stylesheet Pin
Richard MacCutchan11-Jul-14 21:35
mveRichard MacCutchan11-Jul-14 21:35 
GeneralRe: Import XML file without stylesheet Pin
Richard.Berry10012-Jul-14 18:17
Richard.Berry10012-Jul-14 18:17 
GeneralRe: Import XML file without stylesheet Pin
Bernhard Hiller13-Jul-14 21:40
Bernhard Hiller13-Jul-14 21:40 
QuestionError : Method name expected // how do I fix this error. please Pin
Member 1074342211-Jul-14 17:47
Member 1074342211-Jul-14 17:47 
AnswerRe: Error : Method name expected // how do I fix this error. please Pin
Richard.Berry10011-Jul-14 19:19
Richard.Berry10011-Jul-14 19:19 
SuggestionRe: Error : Method name expected // how do I fix this error. please Pin
Richard MacCutchan11-Jul-14 21:36
mveRichard MacCutchan11-Jul-14 21:36 

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.