Click here to Skip to main content
15,913,408 members
Home / Discussions / C#
   

C#

 
QuestionSaving an self painted image from a pictureBox Pin
MyPiano3-Oct-07 6:08
MyPiano3-Oct-07 6:08 
AnswerRe: Saving an self painted image from a pictureBox Pin
Ajay.k_Singh3-Oct-07 7:02
Ajay.k_Singh3-Oct-07 7:02 
GeneralRe: Saving an self painted image from a pictureBox Pin
MyPiano5-Oct-07 2:58
MyPiano5-Oct-07 2:58 
QuestionDefault script in dot net is? Pin
GunaChinna3-Oct-07 5:09
GunaChinna3-Oct-07 5:09 
AnswerRe: Default script in dot net is? Pin
Pete O'Hanlon3-Oct-07 5:19
mvePete O'Hanlon3-Oct-07 5:19 
AnswerRe: Default script in dot net is? Pin
DotNetXenon3-Oct-07 8:24
DotNetXenon3-Oct-07 8:24 
AnswerRe: Default script in dot net is? Pin
Abhijit Jana4-Oct-07 4:44
professionalAbhijit Jana4-Oct-07 4:44 
QuestionGet any specific value from this xml [modified] Pin
Bummer83-Oct-07 4:43
Bummer83-Oct-07 4:43 
<?xml version="1.0" standalone="yes"?>
<passwd>
<principal name="ADM" class="Class value" password="+100-70-44+41-220-96-42+100-70+114+163-3-27+33+142+72">
<grant name="store.all.admin" />
<grant name="launch.more" />
<grant name="launch.all" />
<grant name="user-management" />
<grant name="Direction" />
</principal>
<principal name="Archive" class="Class value" password="+100-70-44+41-220-96-42+100-70+114+163-3-27+33+142+73">
<grant name="Archive" />
</principal>
<principal name="Michael" class="Class value" password="+100-70-44+41-220-96-42+100-70+114+163-3-27+33+142+74">
<grant name="launch.all" />
<grant name="launch.more" />
<grant name="Michael" />
</principal>
<principal name="admin" class="Class value" password="+100-70-44+41-220-96-42+100-70+114+163-3-27+33+142+75">
<grant name="store.all.admin" />
<grant name="launch.more" />
<grant name="launch.all" />
<grant name="user-management" />
</principal>
<grant name="Direction" codebase="file:./jars/r/*">
<permission name="Direccao" class="openwfe.org.worklist.auth.StorePermission" rights="read, write, delegate" />
</grant>
<grant name="Archive" codebase="file:./jars/r/*">
<permission name="Archive" class="openwfe.org.worklist.auth.StorePermission" rights="read, write, delegate" />
</grant>
<grant name="Michael" codebase="file:./jars/r/*">
<permission name="Michael" class="openwfe.org.worklist.auth.StorePermission" rights="read, write, delegate" />
</grant>
<grant name="store.all.admin" codebase="file:./jars/r/*">
<permission name="Store.*" class="openwfe.org.worklist.auth.StorePermission" rights="read, write, delegate" />
</grant>
<grant name="launch.more" codebase="file:./jars/r/*">
<permission name="mainEngine::http://localhost:7080/flow-index.jsp" class="openwfe.org.worklist.auth.LaunchPermission" />
</grant>
<grant name="launch.all" codebase="file:./jars/r/*">
<permission name=".*::http://localhost:.*" class="openwfe.org.worklist.auth.LaunchPermission" />
</grant>
<grant name="user-management" codebase="file:./jars/r/*">
<permission name="passwd" class="openwfe.org.auth.UmanPermission" rights="manage" />
</grant>
</passwd>

EDIT: the XML isn't showing (download here: http://rapidshare.com/files/59995138/test.xml.html)

I have this XML.
I use the code below to open the XML and treat it as a DataSet and view it in a datagrid.

<code> try
{
dataset = ReadXML(szPassword);
dataGrid1.DataSource = dataset;
dataGrid1.DataMember = "principal";
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}</code>

put this in a different class, if you wish.


<code> public DataSet ReadXML(string szMyXMLfile)
{
DataSet ds = new DataSet();
try
{
ds.ReadXml(szMyXMLfile);
return ds;
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}</code>

I want to treat The DataSet, NOT the XML, (change values, modify fields) through code.
How Can I get these fields from the dataset's ADM name into an ArrayList? (look at picture) http://bayimg.com/eaHdKAaBg
<code>store.all.admin
launch.more
launch.all
user-management
Direction</code>

Thanks for your replies.

EDiT: here's my current search routine
<code>
foreach(DataRow dr in dataset.Tables["principal"].Rows)
{
if (dr["name"].ToString()=="ADM") // "ADM" (for example)
{
foreach(DataRow dr2 in dataset.Tables["grant"].Rows)
{
textBox1.Text += dr2["name"].ToString() + Environment.NewLine;
aPermissoes.Add(dr2["name"].ToString());
}
if (textBox1.Text.Length>=2) textBox1.Text = textBox1.Text.Remove(textBox1.Text.Length-2,2);
}
}
</code>

-- modified at 12:42 Wednesday 3rd October, 2007
AnswerRe: Get any specific value from this xml Pin
pmarfleet3-Oct-07 4:49
pmarfleet3-Oct-07 4:49 
GeneralRe: Get any specific value from this xml Pin
Bummer83-Oct-07 4:59
Bummer83-Oct-07 4:59 
GeneralRe: Get any specific value from this xml Pin
Dave Kreskowiak3-Oct-07 5:30
mveDave Kreskowiak3-Oct-07 5:30 
GeneralRe: Get any specific value from this xml Pin
Bummer83-Oct-07 23:27
Bummer83-Oct-07 23:27 
QuestionHow To Get the user name while using FileSystemWatcher in C# Pin
Abhijit Jana3-Oct-07 3:41
professionalAbhijit Jana3-Oct-07 3:41 
AnswerRe: How To Get the user name while using FileSystemWatcher in C# Pin
Dave Kreskowiak3-Oct-07 5:29
mveDave Kreskowiak3-Oct-07 5:29 
GeneralRe: How To Get the user name while using FileSystemWatcher in C# Pin
Abhijit Jana5-Oct-07 1:28
professionalAbhijit Jana5-Oct-07 1:28 
GeneralRe: How To Get the user name while using FileSystemWatcher in C# Pin
Dave Kreskowiak5-Oct-07 1:42
mveDave Kreskowiak5-Oct-07 1:42 
QuestionHide Command window Pin
pritesh_patel3-Oct-07 3:34
pritesh_patel3-Oct-07 3:34 
AnswerRe: Hide Command window Pin
Abhijit Jana3-Oct-07 3:55
professionalAbhijit Jana3-Oct-07 3:55 
GeneralRe: Hide Command window Pin
pritesh_patel3-Oct-07 22:21
pritesh_patel3-Oct-07 22:21 
AnswerRe: Hide Command window Pin
PIEBALDconsult3-Oct-07 5:04
mvePIEBALDconsult3-Oct-07 5:04 
GeneralRe: Hide Command window Pin
pritesh_patel3-Oct-07 22:22
pritesh_patel3-Oct-07 22:22 
GeneralRe: Hide Command window Pin
PIEBALDconsult4-Oct-07 14:50
mvePIEBALDconsult4-Oct-07 14:50 
GeneralRe: Hide Command window Pin
pritesh_patel10-Oct-07 20:10
pritesh_patel10-Oct-07 20:10 
QuestionInterface and Abstract Class Pin
.NET- India 3-Oct-07 3:22
.NET- India 3-Oct-07 3:22 
AnswerRe: Interface and Abstract Class Pin
Dave Sexton3-Oct-07 3:31
Dave Sexton3-Oct-07 3:31 

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.