Click here to Skip to main content
15,922,419 members
Home / Discussions / C#
   

C#

 
QuestionToo many namespaces in a class Pin
Abhinav S9-Dec-09 22:07
Abhinav S9-Dec-09 22:07 
AnswerRe: Too many namespaces in a class Pin
Migounette9-Dec-09 22:17
Migounette9-Dec-09 22:17 
AnswerRe: Too many namespaces in a class Pin
jdkulkarni9-Dec-09 22:20
jdkulkarni9-Dec-09 22:20 
GeneralRe: Too many namespaces in a class Pin
PIEBALDconsult10-Dec-09 3:56
mvePIEBALDconsult10-Dec-09 3:56 
AnswerRe: Too many namespaces in a class Pin
Richard MacCutchan9-Dec-09 23:40
mveRichard MacCutchan9-Dec-09 23:40 
AnswerRe: Too many namespaces in a class Pin
PIEBALDconsult10-Dec-09 4:03
mvePIEBALDconsult10-Dec-09 4:03 
QuestionC# -- Xml child node problem [modified] Pin
<<Tash18>>9-Dec-09 18:55
<<Tash18>>9-Dec-09 18:55 
AnswerRe: C# -- Xml child node problem Pin
Covean9-Dec-09 22:47
Covean9-Dec-09 22:47 
Replace

                    foreach(XmlNode node in nodes)
                    { 
                         if(node.HasChildNodes && node.ChildNodes.Count > 0)
                         {
                              string a_ID = node.ChildNodes[0].InnerText;
                              string a_ApplicationDescription = node.ChildNodes[1].InnerText;
                              string a_Category = node.ChildNodes[2].InnerText;
                              string a_Business_Owner = node.ChildNodes[3].InnerText;
                              string a_CreatedID = node.ChildNodes[4].InnerText;
                              string a_CreatedTimeStamp = node.ChildNodes[5].InnerText;
                              string a_Status = node.ChildNodes[6].InnerText;
                              if(a_ID==app)
                              {
                                   //OdbcCommand cmd = new OdbcCommand("insert into EACS_Application values('"+a_ID+"','"+a_ApplicationDescription+"','"+a_Category+"','"+a_Business_Owner+"','"+a_CreatedID+"',getDate(),'"+a_Status+"','','','','','','','')",con);
                                   //cmd.ExecuteNonQuery();
                                   Console.WriteLine("App Inserted");
                              }
                         }
                    }
;

With something like this:

      foreach(XmlNode node in nodes)
      { 
            if(node.HasChildNodes)
            {
                  string a_ID = string.Empty;
                  string ...
                  ...
                  IEnumerator nodeEnumerator = node.GetEnumerator();
                  while (nodeEnumerator.MoveNext())
                  {
                        XmlNode currentChildNode = (XmlNode)nodeEnumerator.Current;
                        if (currentChildNode.NodeType != XmlNodeType.Element)
                              continue;

                        switch (currentChildNode.Name)
                        {
                              case "AppId": a_ID = currentChildNode.InnerText; break;
                              case "GroupId": ...
                              ...
                        }
                   }
               }
         }
;

Greetings
Covean

QuestionI'm Having Way Too Much Fun (but I have another question...) Pin
Roger Wright9-Dec-09 18:39
professionalRoger Wright9-Dec-09 18:39 
AnswerRe: I'm Having Way Too Much Fun (but I have another question...) Pin
dan!sh 9-Dec-09 20:58
professional dan!sh 9-Dec-09 20:58 
GeneralRe: I'm Having Way Too Much Fun (but I have another question...) Pin
Roger Wright10-Dec-09 18:42
professionalRoger Wright10-Dec-09 18:42 
AnswerRe: I'm Having Way Too Much Fun (but I have another question...) Pin
PIEBALDconsult10-Dec-09 3:50
mvePIEBALDconsult10-Dec-09 3:50 
QuestionDataGridViewColumn can be accessed by multiple threads [modified] Pin
jdkulkarni9-Dec-09 18:33
jdkulkarni9-Dec-09 18:33 
Questionreg creation of multi file assembly Pin
sandhiyaus9-Dec-09 17:50
sandhiyaus9-Dec-09 17:50 
AnswerRe: reg creation of multi file assembly Pin
PIEBALDconsult9-Dec-09 18:10
mvePIEBALDconsult9-Dec-09 18:10 
QuestionTrying to use HashSet<t></t> Pin
BobInNJ9-Dec-09 13:38
BobInNJ9-Dec-09 13:38 
AnswerRe: Trying to use HashSet Pin
N a v a n e e t h9-Dec-09 14:53
N a v a n e e t h9-Dec-09 14:53 
QuestionDelete a word everytime the program see it. Pin
ahlm9-Dec-09 10:54
ahlm9-Dec-09 10:54 
AnswerRe: Delete a word everytime the program see it. Pin
Migounette9-Dec-09 11:56
Migounette9-Dec-09 11:56 
AnswerRe: Delete a word everytime the program see it. Pin
Abhinav S9-Dec-09 17:13
Abhinav S9-Dec-09 17:13 
GeneralRe: Delete a word everytime the program see it. Pin
ahlm9-Dec-09 18:31
ahlm9-Dec-09 18:31 
QuestionSqlCeResultSet Problem [modified] Pin
Stanciu Vlad9-Dec-09 6:25
Stanciu Vlad9-Dec-09 6:25 
AnswerRe: SqlCeResultSet Problem Pin
Migounette9-Dec-09 12:19
Migounette9-Dec-09 12:19 
QuestionRe: SqlCeResultSet Problem Pin
Stanciu Vlad9-Dec-09 20:09
Stanciu Vlad9-Dec-09 20:09 
QuestionUpdate own written TabPage Pin
Tagamoga9-Dec-09 4:18
Tagamoga9-Dec-09 4:18 

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.