SoFunction
Updated on 2025-03-04

Unlimited Classification Page 1/3

1. Recursive functions

// 'Recursive traversal of self-built directory tree ==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

  private void ShowDir(string sZml,string sIndex)
  {
    sqlCon=new (connectionString);
   string sqlStr="select * from mltable where mlzml=N'"+ sZml +"'";
    sqlAda=new (sqlStr,sqlCon);
    Dt=new DataTable();
   (Dt);
    Node1;
   string sIndex0;
   string sIndex2;
   int theId;

int sIndex1=0;//Record the last bit value of the tree
   foreach( DtDataRow in )
   {
    theId=Convert.ToInt32(DtDataRow["mlid"]);
    Node1=new ();
    =DtDataRow["mlmc"].ToString();
    ="images/trees/";
    ="images/trees/";
    =false;
    ="Admin_Tree_Show.aspx?the&sIndex="+ sIndex+"."+();
    ="";
    ="main";
    if(sIndex=="")
    {
     sIndex2=(Node1).ToString();
     sIndex0=sIndex2;

    }
    else
    {

      pNode=(sIndex);
     (Node1);
     sIndex2=(Node1).ToString();
     sIndex0=sIndex + "." + sIndex2;
sIndex1++;//Record the number of leaves under the current tree, that is, the number of leaves
    }
    ShowDir(DtDataRow["mlid"].ToString(),sIndex0);

   
   }
   ();

  }

123Next pageRead the full text