1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
private void Form (object sender, System.EventArgs e)
{
my_form = my_ref_form1 as FormX;
int count_station = 0;
foreach (.element elem in my_form.proj.element_liste)
{
if ( elem.niveau == 1)
{
TreeNode Node = new TreeNode();
Node.Text = elem.nom;
Node.Tag = elem;
treeView1.Nodes.Add(Node);
foreach (fonction func in my_form.proj.fonction_Liste)
{
if (func.niveau == 2)
{
TreeNode SubNode = new TreeNode();
SubNode.Text = func.nom;
SubNode.Tag = func;
treeView1.Nodes[count_station].Nodes.Add(SubNode);
}
}
}
count_station++;
}
}
if (conn != null)
conn.Close();
string connStr = String.Format("server={0};user id={1}; password={2}; database=mysql; pooling=false",
my_form.serveur_name, my_form.login, my_form.password );
try
{
conn = new MySqlConnection( connStr );
conn.Open();
fill_dataGrid();
}
catch (MySqlException ex)
} |
Partager